From a0252ef7d8cc6e6dd200a6805e92b5bf2670c471 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Tue, 23 Jul 2024 08:08:12 -0600 Subject: [PATCH] genai: update comment in one of the samples (#195) --- genai/example_test.go | 3 ++- genai/internal/samples/docs-snippets_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/genai/example_test.go b/genai/example_test.go index c740882..6e87dbb 100644 --- a/genai/example_test.go +++ b/genai/example_test.go @@ -604,7 +604,8 @@ func ExampleGenerativeModel_CountTokens_videoUploadFile() { fd := genai.FileData{URI: file.URI} // Call `CountTokens` to get the input token count // of the combined text and file (`total_tokens`). - // An image's display or file size does not affect its token count. + // A video or audio file is converted to tokens at a fixed rate of tokens per + // second. // Optionally, you can call `count_tokens` for the text and file separately. tokResp, err := model.CountTokens(ctx, genai.Text(prompt), fd) if err != nil { diff --git a/genai/internal/samples/docs-snippets_test.go b/genai/internal/samples/docs-snippets_test.go index c91df8b..4c76ce2 100644 --- a/genai/internal/samples/docs-snippets_test.go +++ b/genai/internal/samples/docs-snippets_test.go @@ -623,7 +623,8 @@ func ExampleGenerativeModel_CountTokens_videoUploadFile() { fd := genai.FileData{URI: file.URI} // Call `CountTokens` to get the input token count // of the combined text and file (`total_tokens`). - // An image's display or file size does not affect its token count. + // A video or audio file is converted to tokens at a fixed rate of tokens per + // second. // Optionally, you can call `count_tokens` for the text and file separately. tokResp, err := model.CountTokens(ctx, genai.Text(prompt), fd) if err != nil {