diff --git a/manage_services.sh b/manage_services.sh index 4880976..2f8b9a9 100755 --- a/manage_services.sh +++ b/manage_services.sh @@ -37,9 +37,9 @@ session_name() { start_command() { case "$1" in intent) - echo "cd \"$SCRIPT_DIR\" && uv run uvicorn rag2_0.api.intent_recognition_api:app --host 0.0.0.0 --port 8001 --workers 25" ;; + echo "cd \"$SCRIPT_DIR\" && uv run uvicorn rag2_0.api.intent_recognition_api:app --host 0.0.0.0 --port 8001 --workers 4" ;; dify) - echo "cd \"$SCRIPT_DIR\" && uv run uvicorn rag2_0.api.DifyQueryRetrieval_api:app --host 0.0.0.0 --port 8002 --workers 25" ;; + echo "cd \"$SCRIPT_DIR\" && uv run uvicorn rag2_0.api.DifyQueryRetrieval_api:app --host 0.0.0.0 --port 8002 --workers 4" ;; answertype) echo "cd \"$SCRIPT_DIR\" && uv run uvicorn rag2_0.api.AnswerType_api:app --host 0.0.0.0 --port 8003 --workers 1" ;; qingdan) diff --git a/rag2_0/api/DifyQueryRetrieval_api.py b/rag2_0/api/DifyQueryRetrieval_api.py index 966a999..45ec50b 100644 --- a/rag2_0/api/DifyQueryRetrieval_api.py +++ b/rag2_0/api/DifyQueryRetrieval_api.py @@ -88,6 +88,25 @@ async def retrieve(request: RetrieveRequest): Returns: 检索结果 + + examples: + body: { + "data_set_list": "主网造价知识(new)", + "original_query": "钻孔灌注桩防沉台、承台基础适用于什么定额", + "query_expand_dict": "{}", + "query_list": "钻孔灌注桩防沉台、承台基础适用于什么定额", + "topk": 20, + "metadata_filtering_conditions": { + "logical_operator": "and", + "conditions": [ + { + "name": "doc_class", + "comparison_operator": "is", + "value": "定额章节说明" + } + ] + } + } """ try: # 解析查询列表和数据集列表