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

How can I accurately determine the length of the message that was sent to ChatGPT? #82

Open
brunsky opened this issue Sep 12, 2023 · 0 comments

Comments

@brunsky
Copy link

brunsky commented Sep 12, 2023

How can I accurately determine the length of the message that was sent to ChatGPT? (I received the following error message:)

'No AI generation: {'error': {'message': "This model's maximum context length is 4097 tokens. However, you requested 4103 tokens (3079 in the messages, 1024 in the completion). Please reduce the length of the messages or completion.", 'type': 'invalid_request_error', 'param': 'messages', 'code': 'context_length_exceeded'}}'"

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

No branches or pull requests

1 participant