-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
promote empty chunk tolerance param into ChatCompletionClient #5210
base: main
Are you sure you want to change the base?
promote empty chunk tolerance param into ChatCompletionClient #5210
Conversation
Signed-off-by: Mohammad Mazraeh <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5210 +/- ##
=======================================
Coverage 70.08% 70.08%
=======================================
Files 179 179
Lines 11619 11619
=======================================
Hits 8143 8143
Misses 3476 3476
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Do we need to have this or is it to address the peculiarity of open AI API.
This was just for the OpenAI, and my understanding of this message was that we need to make this fix first. I personally lean towards making sure all of the implementations of ChatCompletionClient have exact same signature. |
Won't other new model clients such as Ollama and Azure AI will have their own version of keyword arguments to address different types of issues? Generally we would like to keep the base class method as lean as possible. |
Makes sense and I agree. Maybe I misunderstood this message. If you can clarify, I can update/close this PR and do the next part of streaming integration with the UI. |
Sorry for the confusion. I meant the keyword arguments should go after a * in the base class's abstract method. |
Why are these changes needed?
The
max_consecutive_empty_chunk_tolerance
param was implemented for open ai client, this PR properly promotes it to theChatCompletionClient
protocol to enforce it to all of the implementations.Didn't update the docs as another contributor is helping with the updates.
Related issue number
Related #5078
Checks