Skip to content

Commit d38c193

Browse files
authored
fix(go): use GeminiConfig in cache live tests (#2730)
1 parent 90f7874 commit d38c193

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

go/plugins/googlegenai/googleai_live_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func TestGoogleAILive(t *testing.T) {
197197
ai.NewUserTextMessage(string(textContent)).WithCacheTTL(360),
198198
),
199199
ai.WithPrompt("write a summary of the content"),
200-
ai.WithConfig(&ai.GenerationCommonConfig{
200+
ai.WithConfig(&googlegenai.GeminiConfig{
201201
Version: "gemini-1.5-flash-001",
202202
}))
203203
if err != nil {
@@ -221,7 +221,7 @@ func TestGoogleAILive(t *testing.T) {
221221
}
222222

223223
resp, err = genkit.Generate(ctx, g,
224-
ai.WithConfig(&ai.GenerationCommonConfig{
224+
ai.WithConfig(&googlegenai.GeminiConfig{
225225
Version: "gemini-1.5-flash-001",
226226
}),
227227
ai.WithMessages(resp.History()...),

go/plugins/googlegenai/vertexai_live_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ func TestVertexAILive(t *testing.T) {
161161
ai.NewUserTextMessage(string(textContent)).WithCacheTTL(360),
162162
),
163163
ai.WithPrompt("write a summary of the content"),
164-
ai.WithConfig(&ai.GenerationCommonConfig{
164+
ai.WithConfig(&googlegenai.GeminiConfig{
165165
Version: "gemini-1.5-flash-001",
166166
}))
167167
if err != nil {
@@ -183,7 +183,7 @@ func TestVertexAILive(t *testing.T) {
183183
t.Fatalf("cache name should be a map but got %T", cache)
184184
}
185185
resp, err = genkit.Generate(ctx, g,
186-
ai.WithConfig(&ai.GenerationCommonConfig{
186+
ai.WithConfig(&googlegenai.GeminiConfig{
187187
Version: "gemini-1.5-flash-001",
188188
}),
189189
ai.WithMessages(resp.History()...),

go/samples/menu/s05.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Answer this customer's question:
6464
ai.WithModel(model),
6565
ai.WithInputType(textMenuQuestionInput{}),
6666
ai.WithOutputFormat(ai.OutputFormatText),
67-
ai.WithConfig(&ai.GenerationCommonConfig{
67+
ai.WithConfig(&googlegenai.GeminiConfig{
6868
Temperature: 0.3,
6969
}),
7070
)

0 commit comments

Comments
 (0)