From 4506a7d2ba03e2787c25952932819cbdc35491c0 Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Fri, 26 Jul 2024 08:53:28 -0400 Subject: [PATCH] genai: add explicit MIME type CreateCachedContent example The model seems to require it (even though it correctly infers that the MIME type is text/plain). --- genai/example_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/genai/example_test.go b/genai/example_test.go index 6e87dbb..97073d8 100644 --- a/genai/example_test.go +++ b/genai/example_test.go @@ -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) }