wip: 客服Agent + RAG + 画像收尾(基于 6516ccb)
This commit is contained in:
@@ -18,6 +18,10 @@ from app.service.agent.governance import PlatformGovernance
|
||||
from app.service.agent.implementations.customer_service import CustomerServiceAgent
|
||||
from app.service.agent.implementations.fund_query_demo import FundQueryDemoAgent
|
||||
from app.service.agent.implementations.risk_agent import RiskAgent
|
||||
from app.service.customer_profile_service import (
|
||||
CustomerProfileQuery,
|
||||
query_customer_profile_tool,
|
||||
)
|
||||
from app.service.fund_quote_service import query_fund_quote_tool
|
||||
from app.service.intent_classifier import IntentClassifier
|
||||
from app.service.knowledge_search_service import KnowledgeSearchService
|
||||
@@ -191,6 +195,16 @@ def get_agent_factory() -> AgentFactory:
|
||||
# (12s)与重试预算,多代码查询必然先撞工具超时。
|
||||
timeout_seconds=15,
|
||||
))
|
||||
registry.register(ToolDefinition(
|
||||
name="query_customer_profile",
|
||||
input_model=CustomerProfileQuery,
|
||||
handler=cast(Any, query_customer_profile_tool),
|
||||
# 复用既有权限码:`memory:read:self` 表示"只读本人画像",客服 Agent 用它在
|
||||
# 确定性识别出画像问题后取权威字段;读他人画像需要 `memory:read:customer`,
|
||||
# 由服务内部按数据范围二次校验(`self` / `own_customers` / `all`)。
|
||||
required_permission="memory:read:self",
|
||||
allowed_roles=("customer", "advisor", "operator", "risk_operator", "admin"),
|
||||
))
|
||||
registry.register(ToolDefinition(
|
||||
name="search_knowledge",
|
||||
input_model=KnowledgeSearchInput,
|
||||
|
||||
Reference in New Issue
Block a user