Skip to content

fix missing finish_reason #140

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

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Conversation

orangetin
Copy link
Member

No description provided.

@orangetin orangetin requested a review from hsubbaraj June 5, 2024 21:32
@@ -61,7 +61,7 @@ def verify_parameters(self) -> Self:
class CompletionChoicesData(BaseModel):
index: int
logprobs: LogprobsPart | None = None
finish_reason: FinishReason
finish_reason: FinishReason | None = None

Choose a reason for hiding this comment

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

Do we not use Optional types here?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the recommended way Python>3.9. See PEP 604. And related discussion on this topic.

@orangetin orangetin marked this pull request as draft June 6, 2024 05:38
@orangetin orangetin marked this pull request as ready for review June 6, 2024 05:50
@orangetin orangetin merged commit bf222e1 into main Jun 6, 2024
11 checks passed
@orangetin orangetin deleted the orangetin/fix-missing-finishreason branch June 6, 2024 05:50
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