1、调整规费相关问题的分类
2、意图识别增加清单、定额字段
This commit is contained in:
@@ -67,6 +67,7 @@ class IntentRecognizeResponse(BaseModel):
|
||||
has_slot_filling: bool = False
|
||||
slot_filling: SlotFillingResponse = Field(default_factory=SlotFillingResponse)
|
||||
query_expand: QueryExpandResponse = Field(default_factory=QueryExpandResponse)
|
||||
dinge_qingdan_info: Dict[str, Any] = Field(default_factory=dict)
|
||||
|
||||
# 创建FastAPI应用
|
||||
app = FastAPI(
|
||||
@@ -118,6 +119,7 @@ async def intent_recognize(request: IntentRecognizeRequest):
|
||||
enable_query_expansion=enable_query_expansion,
|
||||
cur_soft_name=current_softname
|
||||
)
|
||||
dinge_qingdan_info = result["dinge_qingdan_info"]
|
||||
|
||||
end_time = time.time()
|
||||
current_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S %z")
|
||||
@@ -152,7 +154,8 @@ async def intent_recognize(request: IntentRecognizeRequest):
|
||||
missing_slots=slot_filling.get("missing_slots", {}),
|
||||
filled_data=slot_filling.get("filled_data", {})
|
||||
),
|
||||
query_expand=QueryExpandResponse(**result["query_expand"])
|
||||
query_expand=QueryExpandResponse(**result["query_expand"]),
|
||||
dinge_qingdan_info=dinge_qingdan_info
|
||||
)
|
||||
|
||||
return response
|
||||
@@ -174,7 +177,7 @@ if __name__ == "__main__":
|
||||
uvicorn.run(
|
||||
"rag2_0.dify.intent_recognition_api:app",
|
||||
host="0.0.0.0",
|
||||
port=8001,
|
||||
port=9001,
|
||||
reload=True, # 开发环境启用热重载
|
||||
workers=1 # 生产环境可以增加worker数量
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user