feat: add WeChat media analysis adapters
This commit is contained in:
@@ -81,6 +81,20 @@ export function buildWechatAgentPrompt(intent, { grantedSkills = [] } = {}) {
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
}
|
||||
if (msgType === 'file') {
|
||||
const attachment = intent?.attachment ?? {};
|
||||
return [
|
||||
currentTimeHint,
|
||||
'【微信服务号文件消息】用户发送了需要解析的 Office 文件。',
|
||||
attachment.filename ? `文件名:${attachment.filename}` : '',
|
||||
attachment.publicUrl ? `文件链接:${attachment.publicUrl}` : '',
|
||||
'请复用 H5 附件分析结果回答;Excel 在专用工具可用时必须优先使用 Excel 工具读取完整工作簿。',
|
||||
'',
|
||||
String(agentText).trim(),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join('\n');
|
||||
}
|
||||
if (msgType === 'location') {
|
||||
const location = intent?.location ?? {};
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user