Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix snippet name. #432

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

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samples/count_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def test_tokens_multimodal_image_file_api(self):
print(model.count_tokens(["Tell me about this instrument", organ_upload]))
# [END tokens_multimodal_image_file_api]

def test_tokens_video_audio_file_api(self):
# [START tokens_video_audio_file_api]
def test_tokens_multimodal_video_audio_file_api(self):
# [START tokens_multimodal_video_audio_file_api]
model = genai.GenerativeModel("models/gemini-1.5-flash")
audio_upload = genai.upload_file(media / "sample.mp3")
print(model.count_tokens(audio_upload))
Expand Down
Loading