feat(agent): support native audio input for multimodal LLMs
# Conflicts: # pkg/providers/protocoltypes/types.go
This commit is contained in:
parent
0c0a582559
commit
58ba107af8
2 changed files with 10 additions and 1 deletions
|
|
@ -75,6 +75,14 @@ func resolveMediaRefs(messages []providers.Message, store media.MediaStore, maxS
|
|||
continue
|
||||
}
|
||||
|
||||
if strings.HasPrefix(mime, "audio/") {
|
||||
dataURL := encodeImageToDataURL(localPath, mime, info, maxSize)
|
||||
if dataURL != "" {
|
||||
result[i].Audio = append(result[i].Audio, dataURL)
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
pathTags = append(pathTags, buildPathTag(mime, localPath))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ type Message struct {
|
|||
Content string `json:"content"`
|
||||
Media []string `json:"media,omitempty"`
|
||||
Attachments []Attachment `json:"attachments,omitempty"`
|
||||
Audio []string `json:"audio,omitempty"`
|
||||
ReasoningContent string `json:"reasoning_content,omitempty"`
|
||||
SystemParts []ContentBlock `json:"system_parts,omitempty"` // structured system blocks for cache-aware adapters
|
||||
ToolCalls []ToolCall `json:"tool_calls,omitempty"`
|
||||
|
|
@ -91,4 +92,4 @@ type ToolFunctionDefinition struct {
|
|||
Name string `json:"name"`
|
||||
Description string `json:"description"`
|
||||
Parameters map[string]any `json:"parameters"`
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue