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

Adding count_tokens for rest #444

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

shilpakancharla
Copy link
Collaborator

No description provided.

@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 Jul 8, 2024
Copy link
Collaborator

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For count tokens we should keep the examples in sync with the plan from the doc:

#445

Since they want to use the same snippets in the guides.

Copy link
Collaborator

@MarkDaoust MarkDaoust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please test your samples, this is failing:

$ bash samples/rest/count_tokens.sh 
[START tokens_text_only]
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   248    0   137  100   111   1423   1153 --:--:-- --:--:-- --:--:--  2583
[START tokens_chat]
{
  "error": {
    "code": 400,
    "message": "Invalid JSON payload received. Unexpected end of string. Expected , or } after key:value pair.\n\n^",
    "status": "INVALID_ARGUMENT"
  }
}

@MarkDaoust MarkDaoust merged commit 3491bfc into google-gemini:main Jul 17, 2024
7 checks passed
@github-actions github-actions bot removed the status:awaiting review PR awaiting review from a maintainer label Jul 17, 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