50 lines
1.6 KiB
Python
50 lines
1.6 KiB
Python
# app/model_config.py
|
||
|
||
import os
|
||
|
||
# ==================== 大模型配置 ====================
|
||
LLM_CONFIG = {
|
||
"model": "46-qwen3.5-35B",
|
||
"base_url": "https://openai.zkzdht.com/v1",
|
||
"api_key": "gpustack_dee9ca823290886c_5edfc86aeeeceb1e9ee5162941cb2cb5",
|
||
"temperature": 0.1,
|
||
"max_tokens": 25096,
|
||
"timeout": 30
|
||
}
|
||
|
||
# ==================== 嵌入模型配置 ====================
|
||
EMBEDDING_CONFIG = {
|
||
"model": "bge-m3",
|
||
"base_url": "http://embedding:9700/v1/embeddings",
|
||
"api_key": "gpustack_dee9ca823290886c_5edfc86aeeeceb1e9ee5162941cb2cb5",
|
||
"base_url_v2": "http://embedding:9700/v1",
|
||
}
|
||
|
||
# ==================== Neo4j 图数据库配置 ====================
|
||
NEO4J_CONFIG = {
|
||
# 优先读取环境变量,如果没有则使用默认值
|
||
# 注意:本地开发通常用 localhost,部署时用服务名 neo4j
|
||
"uri": "bolt://neo4j:7687",
|
||
"username": "neo4j",
|
||
"password": "zdht123@",
|
||
"database": "neo4j", # 新增 database 配置
|
||
}
|
||
|
||
# ==================== 检索与索引配置 ====================
|
||
SEARCH_CONFIG = {
|
||
"name_property": "名称",
|
||
"fulltext_property": "fulltext",
|
||
"embedding_property": "embedding",
|
||
"search_label": "Searchable",
|
||
"vector_index_name": "global_searchable_embedding",
|
||
"fulltext_index_name": "global_searchable_content_search",
|
||
"fulltext_field_index_name": "searchable_fulltext",
|
||
"excluded_business_labels": [
|
||
"Entity", "Chunk", "Document", "_Bloom_Perspective_", "Searchable"
|
||
],
|
||
"vector_dimension": 1024,
|
||
"jieba_pos_whitelist": ["n", "nr", "ns", "nt", "nz", "vn", "eng"],
|
||
}
|
||
|
||
|