RAG/.env.example

64 lines
2.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================
# RAG API 环境变量配置文件
# ============================================
# 复制此文件为 .env 并根据实际情况修改
# 所有配置都可以通过此文件统一管理,方便不同机器之间移植
# docker-compose.yml 会自动读取此文件中的配置
# ============================================
# API 配置
# ============================================
API_HOST=0.0.0.0
API_PORT=8001
API_TITLE=RAG API
API_VERSION=1.0.0
# 文件上传大小限制单位MB默认5MB
MAX_UPLOAD_SIZE_MB=5
# LibreOffice soffice service port (used by docker/soffice service)
SOFFICE_HOST=rag-soffice #localhost
SOFFICE_PORT=8003
# ============================================
# ChromaDB 配置
# ============================================
# CHROMA_SERVER_HOST: ChromaDB 服务器地址
# - 使用 host 网络模式: localhost
# - 远程服务器: 192.168.1.100 或 chromadb.example.com
CHROMA_SERVER_HOST=rag-chromadb #localhost
CHROMA_SERVER_PORT=8000 #8002
CHROMA_COLLECTION_NAME=rag_collection
# ============================================
# Ollama 配置
# ============================================
# OLLAMA_BASE_URL: Ollama 服务地址
OLLAMA_BASE_URL=http://host.docker.internal:11434
OLLAMA_MODEL=qwen3:8b
OLLAMA_EMBEDDING_MODEL=qwen3-embedding:0.6b
# OLLAMA_SMALL_MODEL: 小型模型,用于代码问题判断(硬编码在 rag_engine.py 中)
# 如需更改,请修改 rag/rag_engine.py 中的 model 参数
# OLLAMA_SMALL_MODEL=qwen3:0.6b
# ============================================
# RAG 配置
# ============================================
EMBEDDING_DIMENSION=768
CHUNK_SIZE=1024
CHUNK_OVERLAP=200
TOP_K=5
# ============================================
# 同步配置
# ============================================
SYNC_INTERVAL=300
AUTO_SYNC=true
# ============================================
# NLTK 配置
# 推荐:如果你已在仓库内保存了 NLTK 数据(离线使用),可以设置为相对路径。例如:
# ./nltk_data/
# 或者使用本地绝对路径: /path/to/nltk_data
# ============================================
NLTK_DATA=./nltk_data/