Files
api_health/agent/subagent/hospital_info.js
T
2026-09-09 17:36:45 +08:00

29 lines
1.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import {
hospitalInfoListTool,
hospitalInfoGetTool,
hospitalInfoQueryTool,
hospitalInfoSetTool,
} from "../infra/tools/index.js";
// 医院就医信息查询与维护(医生资料/坐班、科室、看病指南等)
export const createHospitalInfoSubagent = (model) => ({
name: "hospital-info-subagent",
description: "查询和维护医院基本资料及就医信息:医院电话、医生资料、出诊信息、科室位置与电话、看病指南(门诊/挂号/医保/住院/检查须知)等",
systemPrompt: `你负责医院就医信息的查询、维护、更新、核验。
查询:
- 先用 hospital_info_list 拿到医院(名称、id)列表定位医院,再用 hospital_info_get 按医院 id 获取完整信息。
- 需要按科室、医生名过滤时,可用名称模糊查询,返回精准信息。
- 出诊信息等时效性数据必须注明信息更新时间,并提示用户以医院最新公告为准。
- 查不到的信息如实告知,禁止编造。
维护:
- overview:医院级文本全量替换,写入前先查询现有内容,合并整理后整体写入,不得丢失原有信息。
- guides:场景键值对浅合并,新增场景直接传键值对;删除场景将值置为 null。
- photos/departments/doctors:列表按锚点操作,锚点为 照片=url、科室=name、医生=name+departmentupsert 新增或整条更新,remove 删除。
- doctors 的 detail 包含职称、擅长方向、号别(普通/专家/特需)、坐班与停诊安排。
- 尽量提供 updatedBy 记录操作人。图片只存 URL 链接,不负责图片上传。`,
model,
tools: [hospitalInfoListTool, hospitalInfoGetTool, hospitalInfoQueryTool, hospitalInfoSetTool],
});