Skip to content

Commit

Permalink
genai: update comment in one of the samples (#195)
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Jul 23, 2024
1 parent 817706e commit a0252ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion genai/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion genai/internal/samples/docs-snippets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit a0252ef

Please sign in to comment.