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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement finish_reason in API response #643

Open
frankxu2004 opened this issue Feb 7, 2023 · 0 comments
Open

Implement finish_reason in API response #643

frankxu2004 opened this issue Feb 7, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@frankxu2004
Copy link

馃殌 Feature Request

Implement finish_reason as in the OpenAI API specification. Currently it's default to "length".

Motivation

It is useful for saving generation times and generate only until needed. It is especially useful for interactive prompt-based NLP tasks.

Note that the finish_reason field in the response should be under response["choices"][0]["finish_reason"] instead of response["choices"][0]["logprobs"]["finish_reason"] as implemented now in

"finish_reason": "length", # TODO: implement this

@frankxu2004 frankxu2004 added the enhancement New feature or request label Feb 7, 2023
@punitkoura punitkoura self-assigned this Mar 21, 2023
@punitkoura punitkoura removed their assignment Apr 4, 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

2 participants