更新 config.py

This commit is contained in:
Defeng 2026-07-08 09:56:49 +08:00
parent ca08759825
commit b0c4dc6fb5

View File

@ -17,6 +17,7 @@ EMBEDDING_CONFIG = {
"model": "bge-m3",
"base_url": "http://192.168.0.46:59700/v1/embeddings",
"api_key": "gpustack_dee9ca823290886c_5edfc86aeeeceb1e9ee5162941cb2cb5",
"base_url_v2" : "http://192.168.0.46:59700/v1",
}
# ==================== Neo4j 图数据库配置 ====================
@ -76,3 +77,86 @@ API_OTHER_URLS = [
SHIP_MODEL_NAME = "E:\ZKYNLP\Hjunproject\project0506\kgrag\ship_xinghao.json"
TREE_JSON_PATH = r"E:\ZKYNLP\Hjunproject\project0506\kgrag\tree_data.json"
root@70964b104c5b:/app# pwd
/app
root@70964b104c5b:/app# vim config.py
root@70964b104c5b:/app# cat config.py
# app/model_config.py
import os
# ==================== 大模型配置 ====================
LLM_CONFIG = {
"model": "46-qwen3.5-35B",
"base_url": "http://192.168.0.46:59800/v1",
"api_key": "gpustack_dee9ca823290886c_5edfc86aeeeceb1e9ee5162941cb2cb5",
"temperature": 0.1,
"max_tokens": 55096,
"timeout": 30
}
# ==================== 嵌入模型配置 ====================
EMBEDDING_CONFIG = {
"model": "bge-m3",
"base_url": "http://192.168.0.46:59700/v1/embeddings",
"api_key": "gpustack_dee9ca823290886c_5edfc86aeeeceb1e9ee5162941cb2cb5",
"base_url_v2" : "http://192.168.0.46:59700/v1",
}
# ==================== Neo4j 图数据库配置 ====================
NEO4J_CONFIG = {
# 优先读取环境变量,如果没有则使用默认值
# 注意:本地开发通常用 localhost部署时用服务名 neo4j
"uri": "neo4j://192.168.0.46:57687",
"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": "global_searchable_fulltext_search",
"global_entity_embedding" : "global_entity_embedding",
"global_entity_content_search": "global_entity_content_search",
"excluded_business_labels": [
"Entity", "Chunk", "Document", "_Bloom_Perspective_", "Searchable"
],
"vector_dimension": 1024,
"jieba_pos_whitelist": ["n", "nr", "ns", "nt", "nz", "vn", "eng"],
"embed_batch_size" : 64,
"embed_thread_num" : 4,
"node_fetch_page" : 10000,
}
INDEXING_ULR = "http://192.168.0.46:59085/neo4j_indexing"
URL = {
"indexing_url" : "http://192.168.0.46:59085/neo4j_indexing",
"prefix_url" : "http://192.168.0.46:59085",
}
API_URLS = [
"http://192.168.0.64:59988/analyze-pdf",
# "http://192.168.0.111:9977/analyze-pdf",
# "http://192.168.0.111:9978/analyze-pdf",
#"http://192.168.0.111:9979/analyze-pdf",
#"http://192.168.0.111:9980/analyze-pdf",
# "http://192.168.0.111:9975/analyze-pdf",
]
API_OTHER_URLS = [
"http://192.168.0.46:59988/analyze-otherfile",
# "http://192.168.0.111:9977/analyze-otherfile",
# "http://192.168.0.111:9978/analyze-otherfile",
#"http://192.168.0.111:9979/analyze-otherfile",
#"http://192.168.0.111:9980/analyze-otherfile",
# "http://192.168.0.111:9975/analyze-otherfile",
]
SHIP_MODEL_NAME = "/app/ship_xinghao.json"
TREE_JSON_PATH = "/app/tree_data.json"