kgrag/config.py

75 lines
2.6 KiB
Python
Raw 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.

# 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",
}
# ==================== 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",
]