Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants