feat: file attachment input

This commit is contained in:
Acbox
2026-02-06 16:09:11 +08:00
parent 5a35ef34ac
commit fe71e7d36d
5 changed files with 28 additions and 8 deletions
+3 -2
View File
@@ -37,14 +37,15 @@ export const createAgent = ({
})
const generateUserPrompt = (input: AgentInput) => {
const images = input.attachments.filter(attachment => attachment.type === 'image')
const files = input.attachments.filter(attachment => attachment.type === 'file')
const text = user(input.query, {
contactId: identity.contactId,
contactName: identity.contactName,
platform: currentPlatform,
date: new Date(),
attachments: files,
})
const images = input.attachments.filter(attachment => attachment.type === 'image')
// const files = input.attachments.filter(attachment => attachment.type === 'file')
const userMessage: UserModelMessage = {
role: 'user',
content: [