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

Neater OpenAI API error messages #15

Closed
simonw opened this issue Jun 13, 2023 · 1 comment
Closed

Neater OpenAI API error messages #15

simonw opened this issue Jun 13, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@simonw
Copy link
Owner

simonw commented Jun 13, 2023

CleanShot 2023-06-13 at 18 53 55@2x

Displaying the traceback isn't useful for this tool.

@simonw simonw added the enhancement New feature or request label Jun 13, 2023
@simonw simonw changed the title Less ugly error. messages Neater OpenAI API error messages Jun 13, 2023
@simonw simonw closed this as completed in 11edecd Jun 13, 2023
@simonw
Copy link
Owner Author

simonw commented Jun 13, 2023

Now looks like this:

% curl -s 'https://simonwillison.net/' | llm --system 'summarize'                              
Error: This model's maximum context length is 4097 tokens. However, your messages resulted in 27770 tokens. Please reduce the length of the messages.

simonw added a commit that referenced this issue Jun 17, 2023
simonw added a commit that referenced this issue Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant