-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(genai sdk): count and compute tokens #5155
base: main
Are you sure you want to change the base?
Conversation
Here is the summary of changes. You are about to add 8 region tags.
This comment is generated by snippet-bot.
|
// Package count_tokens shows examples of counting tokens using the GenAI SDK. | ||
package count_tokens | ||
|
||
// TODO[[email protected],[email protected]]: Remove `count_tokens` region tags after Feb 2025 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the same comment in the Python repo.
Description
Adds samples for counting and computing tokens using the new GenAI SDK. Added region tags:
googlegenaisdk_counttokens_with_txt
googlegenaisdk_counttokens_with_txt_vid
googlegenaisdk_counttokens_resp_with_txt
googlegenaisdk_counttokens_compute_with_txt
Checklist
go test -v ./..
(see Testing)gofmt
(see Formatting)go vet
(see Formatting)