| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| admin | ||
| agent | ||
| ai | ||
| assistant | ||
| auth | ||
| clinical-gap | ||
| facts | ||
| mcp | ||
| patient | ||
| persona | ||
| plan | ||
| plan-aggregate | ||
| realtime-coach | ||
| sync |
独立 assistant 模块(不复用 AiCall 单发框架),实现 model-driven tool-calling agent loop: - McpClientService:极简 HTTP MCP 客户端(raw JSON-RPC),助手作为外部 agent 真连 PAC 自己的 /mcp(dogfood),转发用户 Bearer → 工具在该用户 tenant scope 执行。 - AssistantService:动态拉 MCP 工具 → 包成 AI SDK tool(execute=回调 MCP)→ streamText 多步循环(模型自主决定调哪些工具,stopWhen=stepCountIs(8))→ provider 可切换 (deepseek/gemini/qwen,复用 AiProviderService)。 - AssistantController:POST /assistant/chat(JWT)→ fullStream 部件转 SSE (text / tool_call / tool_result / error / done),供前端流式渲染 + 工具调用可视化。 本地端到端验证(:3101):问"孙柯画像+召回计划"→ 模型自主 find_patient→get_patient_overview, 流式产出基于真实数据的答案(价值分群/画像/召回 3 条),手机号掩码。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| admin | Loading commit data... | |
| agent | Loading commit data... | |
| ai | Loading commit data... | |
| assistant | Loading commit data... | |
| auth | Loading commit data... | |
| clinical-gap | Loading commit data... | |
| facts | Loading commit data... | |
| mcp | Loading commit data... | |
| patient | Loading commit data... | |
| persona | Loading commit data... | |
| plan | Loading commit data... | |
| plan-aggregate | Loading commit data... | |
| realtime-coach | Loading commit data... | |
| sync | Loading commit data... |