Skip to content

Commit

Permalink
genai: use different model for tests requiring vision (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Jun 10, 2024
1 parent 9f3bd3b commit 07538e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions genai/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ import (
)

const (
defaultModel = "gemini-1.0-pro"
imageFile = "personWorkingOnComputer.jpg"
defaultModel = "gemini-1.0-pro"
modelForVision = "gemini-1.5-flash"
imageFile = "personWorkingOnComputer.jpg"
)

func TestLive(t *testing.T) {
Expand Down Expand Up @@ -131,7 +132,7 @@ func TestLive(t *testing.T) {
})

t.Run("image", func(t *testing.T) {
vmodel := client.GenerativeModel(defaultModel + "-vision-latest")
vmodel := client.GenerativeModel(modelForVision)
vmodel.Temperature = Ptr[float32](0)

data, err := os.ReadFile(filepath.Join("testdata", imageFile))
Expand Down

0 comments on commit 07538e5

Please sign in to comment.