Skip to content

Commit 393be3c

Browse files
committed
feat(agents): can get instructor's encoder in agent
1 parent a0815d1 commit 393be3c

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

agents/agent.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,10 @@ func (a *Agent[I, O]) Client() instructor.Instructor {
136136
return a.client
137137
}
138138

139+
func (a *Agent[I, O]) Encoder() instructor.Encoder {
140+
return a.Client().Encoder()
141+
}
142+
139143
func (a *Agent[I, O]) SetMemory(m components.MemoryStore) {
140144
a.memory = m
141145
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ require (
88
github.com/PuerkitoBio/goquery v1.10.2
99
github.com/aws/aws-sdk-go-v2 v1.36.3
1010
github.com/aws/aws-sdk-go-v2/service/s3 v1.78.2
11-
github.com/bububa/instructor-go v1.2.6
11+
github.com/bububa/instructor-go v1.2.7
1212
github.com/bububa/mdencoder v1.0.1
1313
github.com/clipperhouse/uax29 v1.14.3
1414
github.com/cohere-ai/cohere-go/v2 v2.13.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ github.com/bahlo/generic-list-go v0.2.0/go.mod h1:2KvAjgMlE5NNynlg/5iLrrCCZ2+5xW
5151
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
5252
github.com/brianvoe/gofakeit/v7 v7.2.1 h1:AGojgaaCdgq4Adzrd2uWdbGNDyX6MWNhHdQBraNfOHI=
5353
github.com/brianvoe/gofakeit/v7 v7.2.1/go.mod h1:QXuPeBw164PJCzCUZVmgpgHJ3Llj49jSLVkKPMtxtxA=
54-
github.com/bububa/instructor-go v1.2.6 h1:tpsFFm0FaX5K7lQVLkwtRBFs1GTTcSS4W9/KDwM0+ZY=
55-
github.com/bububa/instructor-go v1.2.6/go.mod h1:6D+sWUfdlnhIc/bfzpg+1eXofF2g5Y4vks7hdpZOBlk=
54+
github.com/bububa/instructor-go v1.2.7 h1:k6yau4f2eUpEv96JLUoxmaeBRQQkAXvJuwWBT5nEuMY=
55+
github.com/bububa/instructor-go v1.2.7/go.mod h1:6D+sWUfdlnhIc/bfzpg+1eXofF2g5Y4vks7hdpZOBlk=
5656
github.com/bububa/ljson v1.0.1 h1:KyymkUrbsKQtd9yDYNQ6BIiupievR/7Ol1MPK3VVLgc=
5757
github.com/bububa/ljson v1.0.1/go.mod h1:V0iyqxoher3R2bQKk7uIpNkbogt8MAqe+hyS8WLlYsc=
5858
github.com/bububa/mdencoder v1.0.1 h1:RN9T4MZlauww1gTzHKcagWtO8p6JVvvUUCRqxqvkhkE=

0 commit comments

Comments
 (0)