mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-04 23:37:32 +00:00
fix(billing): 当 knowledge.graph.enabled=false 时:所有知识图谱相关的 Bean 都不会被创建Neo4j 配置不会被加载即使没有配置 Neo4j 连接信息,默认禁用了知识图谱功能
This commit is contained in:
@@ -303,6 +303,10 @@ management:
|
||||
show-details: ALWAYS
|
||||
logfile:
|
||||
external-file: ./logs/sys-console.log
|
||||
health:
|
||||
# 禁用 Neo4j 健康检查(当知识图谱功能未启用时)
|
||||
neo4j:
|
||||
enabled: false
|
||||
|
||||
# websocket
|
||||
# websocket
|
||||
@@ -346,3 +350,55 @@ vector-store:
|
||||
url: http://localhost:19530
|
||||
collectionname: LocalKnowledge
|
||||
|
||||
|
||||
--- # Neo4j 知识图谱配置
|
||||
#neo4j:
|
||||
# uri: bolt://117.72.192.162:7687
|
||||
# username: neo4j
|
||||
# password: MySecurePass123!
|
||||
# database: neo4j
|
||||
# max-connection-pool-size: 50
|
||||
# connection-timeout-seconds: 30
|
||||
|
||||
# 知识图谱配置
|
||||
knowledge:
|
||||
graph:
|
||||
# 是否启用知识图谱功能
|
||||
enabled: false
|
||||
# 图数据库类型: neo4j 或 apache-age
|
||||
database-type: neo4j
|
||||
# 是否自动创建索引
|
||||
auto-create-index: true
|
||||
# 批量处理大小
|
||||
batch-size: 1000
|
||||
# 最大重试次数
|
||||
max-retry-count: 3
|
||||
|
||||
# 实体抽取配置
|
||||
extraction:
|
||||
# 置信度阈值(低于此值的实体将被过滤)
|
||||
confidence-threshold: 0.7
|
||||
# 最大实体数量(每个文档)
|
||||
max-entities-per-doc: 100
|
||||
# 最大关系数量(每个文档)
|
||||
max-relations-per-doc: 200
|
||||
# 文本分片大小(用于长文档)
|
||||
chunk-size: 2000
|
||||
# 分片重叠大小
|
||||
chunk-overlap: 200
|
||||
|
||||
# 查询配置
|
||||
query:
|
||||
# 默认查询限制数量
|
||||
default-limit: 100
|
||||
# 最大查询限制数量
|
||||
max-limit: 1000
|
||||
# 路径查询最大深度
|
||||
max-path-depth: 5
|
||||
# 查询超时时间(秒)
|
||||
timeout-seconds: 30
|
||||
# 是否启用查询缓存
|
||||
cache-enabled: true
|
||||
# 缓存过期时间(分钟)
|
||||
cache-expire-minutes: 60
|
||||
|
||||
|
||||
Reference in New Issue
Block a user