Skip to content

Commit

Permalink
genai: add explicit MIME type CreateCachedContent example
Browse files Browse the repository at this point in the history
The model seems to require it (even though it correctly infers
that the MIME type is text/plain).
  • Loading branch information
jba committed Jul 26, 2024
1 parent a0252ef commit 4506a7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion genai/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ func ExampleCachedContent_create() {
}
defer client.Close()

file, err := uploadFile(ctx, client, filepath.Join(testDataDir, "a11.txt"), "")
file, err := uploadFile(ctx, client, filepath.Join(testDataDir, "a11.txt"), "text/plain")
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 4506a7d

Please sign in to comment.