- Add VITE_OCR_URL environment variable with fallback URL construction - Define IMAGE_NODE_TYPES constant to support 'image', 'image-block', and 'imageBlock' node types - Add helper functions for safer image attribute access (getImageSrc, isImageNodeWithSrc, getImageLabel) - Improve OCR error handling with HTTP status checking and error details - Wrap OCR context in HTML comments to prevent prompt injection issues - Update MilkdownEditor to use centralized OCR_URL configuration
12 lines
317 B
Plaintext
12 lines
317 B
Plaintext
VITE_API_URL=http://localhost:8000/v1/completions
|
||
VITE_OCR_URL=http://localhost:8000/v1/ocr
|
||
|
||
# Ollama 配置
|
||
OLLAMA_HOST=http://192.168.0.120:11434
|
||
OLLAMA_MODEL=gpt-oss:120b
|
||
|
||
# 可选:其他配置
|
||
# 如果ollama需要认证,可以使用以下变量
|
||
# OLLAMA_USERNAME=your_username
|
||
# OLLAMA_PASSWORD=your_password
|