Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def count_tokens() -> int:
print(response)

# Example output:
# total_tokens=10 cached_content_token_count=None
# total_tokens=16252 cached_content_token_count=None

# [END googlegenaisdk_counttoken_with_txt_vid]
# [END googlegenaisdk_count_tokens_with_txt_img_vid]
Expand Down
6 changes: 3 additions & 3 deletions genai/count_tokens/test_count_tokens_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import counttoken_compute_with_txt
import counttoken_resp_with_txt
import counttoken_with_txt
import counttoken_with_txt_img_vid
import counttoken_with_txt_vid

os.environ["GOOGLE_GENAI_USE_VERTEXAI"] = "True"
os.environ["GOOGLE_CLOUD_LOCATION"] = "us-central1"
Expand All @@ -41,5 +41,5 @@ def test_counttoken_with_txt() -> None:
assert counttoken_with_txt.count_tokens()


def test_counttoken_with_txt_img_vid() -> None:
assert counttoken_with_txt_img_vid.count_tokens()
def test_counttoken_with_txt_vid() -> None:
assert counttoken_with_txt_vid.count_tokens()