-
Notifications
You must be signed in to change notification settings - Fork 775
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
Extend OpenAI finish_reason
handling
#1985
base: master
Are you sure you want to change the base?
Extend OpenAI finish_reason
handling
#1985
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, I left some comments here and there.
- Replace all uses of choices[0] with output
@MaartenGr, I made the following updates based on your feedback:
Open questions: |
@steven-solomon Apologies for the delay, last few weeks were busy. It seems that there are some conflicts with the main branch. Other than that, I just ran the pipeline but expect this to run without any issues. Moreover, it seems there might be an issue with selecting the correct |
I think I see what you mean. The definition of I am planning on adding the change to use the model's logger in the next day or two. |
@steven-solomon I think I see what you mean. The definition of output on L221 should be up another level so it is accessible in L243. Is that correct or is there something else amiss? No, I meant that the output variable if self.exponential_backoff:
response = completions_with_backoff(self.client, model=self.model, prompt=prompt, **self.generator_kwargs)
else:
response = self.client.completions.create(model=self.model, prompt=prompt, **self.generator_kwargs) since they are not accessed on L243: label = output.text.strip() |
@MaartenGr I have made the switch the pull the logger from the |
@steven-solomon There is no |
As part of #1979, I added:
finish_reason
values:length
,content_filter
, andstop
finish_reason
for any unspecified casesrepr_doc_ids
in all error cases to improve debuggingFixes #1979