Share image input across agent vendors
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user