Files
Ai/config/rag_config.yaml
T
sajad-dev 2c42ebe01c Refactor user data handling and enhance chat functionality
- Removed deprecated user_info files and paths from configuration.
- Added user soil data integration in chat context to improve response accuracy.
- Updated build_rag_context and chat_rag_stream functions to include sensor_uuid for user-specific data retrieval.
- Enhanced load_sources function to load user data from the database.
- Implemented filtering in search_with_query and QdrantVectorStore to isolate user data based on sensor_uuid.
- Introduced Celery Beat schedule for periodic user data ingestion.
2026-02-27 20:06:46 +03:30

29 lines
773 B
YAML

# تنظیمات RAG برای پایگاه دانش CropLogic
embedding:
provider: "avalai" # Avalai API (OpenAI-compatible)
model: "text-embedding-3-small"
base_url: "https://api.avalai.ir/v1"
api_key_env: "AVALAI_API_KEY"
batch_size: 32
# فاز یک: Qdrant به‌عنوان vector store
qdrant:
host: "localhost" # یا qdrant در Docker
port: 6333
collection_name: "croplogic_kb"
vector_size: 1536 # متناسب با text-embedding-3-small
chunking:
max_chunk_tokens: 500
overlap_tokens: 50
# تنظیمات مدل چت (LLM) — Avalai
llm:
model: "gpt-4o"
base_url: "https://api.avalai.ir/v1"
api_key_env: "AVALAI_API_KEY"
tone_file: "config/tone.txt"
knowledge_base_path: "config/knowledge_base"