Skip to content
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

Count tokens samples #403

Merged
merged 7 commits into from
Jun 28, 2024

Conversation

shilpakancharla
Copy link
Collaborator

Description of the change

Count tokens functions demonstrated for the following use cases.

  • tokens_cached_content
  • tokens_cached_system_instruction
  • tokens_cached_tools
  • tokens_video_audio_file_api
  • tokens_multimodal_image_file_api
  • tokens_multimodal_image_inline
  • tokens_chat
  • tokens_text_only

Also included the sample.mp3 audio and organ.jpg image.

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:python sdk Issue/PR related to Python SDK labels Jun 27, 2024
samples/count_tokens.py Outdated Show resolved Hide resolved
samples/count_tokens.py Outdated Show resolved Hide resolved
samples/count_tokens.py Outdated Show resolved Hide resolved
@MarkDaoust MarkDaoust merged commit b6bd3ca into google-gemini:main Jun 28, 2024
1 check passed
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:python sdk Issue/PR related to Python SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants