refactor(backend): update services and register OCR router
- router.py: register ocr_router with OCR tag - ontology.py: update ontology service logic - orchestrator.py: update orchestrator service logic - user_agent.py: update user agent schema and service - schemas/user_agent.py: update user agent data schemas
This commit is contained in:
@@ -666,6 +666,8 @@ class SemanticOntologyService:
|
||||
"entry_source": payload.context_json.get("entry_source"),
|
||||
"attachment_names": payload.context_json.get("attachment_names", []),
|
||||
"attachment_count": payload.context_json.get("attachment_count", 0),
|
||||
"ocr_summary": payload.context_json.get("ocr_summary", ""),
|
||||
"ocr_documents": payload.context_json.get("ocr_documents", []),
|
||||
"request_context": payload.context_json.get("request_context"),
|
||||
"role_codes": payload.context_json.get("role_codes", []),
|
||||
},
|
||||
@@ -690,6 +692,7 @@ class SemanticOntologyService:
|
||||
"即使没有明确说“生成草稿”,也优先使用 expense + draft。"
|
||||
"出现“客户”不等于应收,出现“供应商”不等于应付,必须结合动作词和业务目标判断。"
|
||||
"只有明确查询、统计、列出、多少、明细、对比时才优先使用 query 或 compare。"
|
||||
"附件名称和 OCR 摘要只作为辅助证据,不能编造未出现的事实。"
|
||||
"信息不足时 clarification_required=true,并给出一句简短中文追问。"
|
||||
"missing_slots 使用简短 snake_case,例如 expense_type, amount, "
|
||||
"customer_name, participants, attachments。"
|
||||
|
||||
Reference in New Issue
Block a user