feat(knowdge-base): 知识库-dify配置增加一些top-k等参数
This commit is contained in:
1 parent
9722de1621
commit
7736a6991e
14 files changed
+587
-292
No files matched your search
@@ -16,7 +16,7 @@ from app.models import KbGroup, ScheduleTask
|
||||
from app.services.knowledge_cleaning.dify_sync_service import KbDifySyncError, KbDifySyncService
|
||||
|
||||
DEFAULT_TOP_K = 5
|
||||
MAX_TOP_K = 20
|
||||
MAX_TOP_K = 10
|
||||
MIN_TOP_K = 1
|
||||
DEFAULT_SCORE_THRESHOLD = 0.3
|
||||
|
||||
@@ -178,7 +178,7 @@ def search_file_check_history(
|
||||
Args:
|
||||
task_id: ScheduleTask.id(Agent 绑定的 schedule_task_id)。
|
||||
query: 用户自然语言检索问题。
|
||||
top_k: 返回片段数,默认 5,最大 20。
|
||||
top_k: 返回片段数,默认 5,最大 10。
|
||||
score_threshold: 相似度阈值,默认 0.3。
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -702,7 +702,7 @@
|
||||
"top_k": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 20,
|
||||
"maximum": 10,
|
||||
"default": 5,
|
||||
"description": "返回片段数,默认 5"
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user