Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add multiple modalities: tools, functions, json_mode #218
Add multiple modalities: tools, functions, json_mode #218
Changes from 1 commit
2c7942f
de9dcd0
ae47bcd
fe1828d
2305586
649357c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
The import of
PatchMode
and thelogging
module are correctly added as per the change summary. However, ensure that thelogging
module is used consistently throughout the file instead ofprint
statements for logging purposes.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.
The
retry_async
function attempts to append a message tokwargs["messages"]
after catching an exception. However, this assumes thatkwargs
will always contain amessages
key with a list value, which may not be the case. This could raise aKeyError
orTypeError
ifmessages
is not present or not a list. The code should check for the existence and type ofmessages
before appending.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.
The same issue as in
retry_async
applies toretry_sync
. There should be a check for the existence and type ofkwargs["messages"]
before appending to it.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.
The
wrap_chatcompletion
function is missing a docstring. It's important to maintain consistency and provide documentation for all public functions, especially when they are part of a significant update to the codebase.