Add LLM configuration and update URL routing

- Introduced LLM configuration in rag_config.yaml and corresponding LLMConfig class in config.py.
- Updated load_rag_config function to parse LLM settings from the configuration file.
- Added new API route for RAG in urls.py to facilitate access to the chat model.
- Modified QdrantVectorStore to use query_points method for improved functionality.
This commit is contained in:
2026-02-27 19:44:49 +03:30
parent 197f70ee12
commit 94355af62b
8 changed files with 187 additions and 6 deletions
+6
View File
@@ -18,6 +18,12 @@ 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"
user_info_path: "config/user_info"
+1
View File
@@ -3,6 +3,7 @@ from django.urls import include, path
urlpatterns = [
path("admin/", admin.site.urls),
path("api/rag/", include("rag.urls")),
path("api/tasks/", include("tasks.urls")),
path("api/soil-data/", include("soil_data.urls")),
path("api/sensor-data/", include("sensor_data.urls")),