Skip to content

Conversation

RobertCraigie
Copy link
Collaborator

@RobertCraigie RobertCraigie commented Sep 10, 2024

closes #1700

The error we raise now looks like this

openai.LengthFinishReasonError: Could not parse response content as the length limit was reached - CompletionUsage(completion_tokens=1, prompt_tokens=127, total_tokens=128)

Before it was:

openai.LengthFinishReasonError: Could not parse response content as the length limit was reached

@stainless-bot stainless-bot force-pushed the robert/length-error-usage branch from 7c6e413 to 38bc8e4 Compare September 10, 2024 12:02
@RobertCraigie RobertCraigie marked this pull request as ready for review September 10, 2024 15:27
@RobertCraigie RobertCraigie requested a review from a team as a code owner September 10, 2024 15:27
@RobertCraigie RobertCraigie changed the base branch from main to next September 10, 2024 15:46
@RobertCraigie RobertCraigie merged commit b0e3256 into next Sep 10, 2024
2 checks passed
@RobertCraigie RobertCraigie deleted the robert/length-error-usage branch September 10, 2024 15:46
@stainless-app stainless-app bot mentioned this pull request Sep 10, 2024
cgayapr pushed a commit to cgayapr/openai-python that referenced this pull request Dec 14, 2024
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.

Include usage information in LengthFinishReasonError

2 participants