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

Correct bad URL in token_counter #1042

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Correct bad URL in token_counter #1042

merged 1 commit into from
Mar 19, 2024

Conversation

jinchihe
Copy link
Contributor

Features

Fix bug:

2024-03-19 14:52:18.433 | WARNING  | metagpt.provider.openai_api:_calc_usage:250 - usage calculation failed: num_tokens_from_messages() is not implemented for model gpt4. See https://github.com/openai/openai-python/blob/main/chatml.md for information on how messages are converted to tokens.

In fact the link https://github.com/openai/openai-python/blob/main/chatml.md as been removed long time, that mislead users. The PR is correct the link.

With the changes, the output as following:

2024-03-19 15:59:26.193 | WARNING  | metagpt.provider.openai_api:_calc_usage:247 - usage calculation failed: num_tokens_from_messages() is not implemented for model gpt4. See https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken for information on how messages are converted to tokens.

Feature Docs

Influence

Result

Other

Copy link
Owner

@geekan geekan left a comment

Choose a reason for hiding this comment

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

lgtm

@geekan geekan merged commit b2bbf83 into geekan:main Mar 19, 2024
0 of 2 checks passed
@jinchihe jinchihe deleted the update_url branch March 20, 2024 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants