Share image input across agent vendors

This commit is contained in:
Ian Gulliver
2026-10-21 15:48:21 -07:00
parent 06987c1989
commit 8e865e69b2
6 changed files with 27 additions and 48 deletions
+2 -6
View File
@@ -17,6 +17,7 @@ import (
"sync/atomic"
"time"
"g.fc.run/ai/byre/internal/agentinput"
"g.fc.run/ai/byre/internal/mcp"
"g.fc.run/ai/byre/internal/procgroup"
)
@@ -58,11 +59,6 @@ func (e Event) Decode() (any, error) {
return v, nil
}
type Image struct {
MediaType string
Data []byte
}
type RPCError struct {
Code int64 `json:"code"`
Message string `json:"message"`
@@ -368,7 +364,7 @@ func (s *Session) SetModel(model string) {
s.stateMu.Unlock()
}
func (s *Session) Send(ctx context.Context, text string, images ...Image) (Turn, error) {
func (s *Session) Send(ctx context.Context, text string, images ...agentinput.Image) (Turn, error) {
input := []UserInput{}
for _, img := range images {
input = append(input, UserInput{