-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix #968 by upgrading openai package to the latest #1034
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
base: main
Are you sure you want to change the base?
Conversation
Will fix this too:
|
@@ -303,10 +303,19 @@ class ConvertedTools: | |||
class Converter: | |||
@classmethod | |||
def convert_tool_choice( | |||
cls, tool_choice: Literal["auto", "required", "none"] | str | None | |||
cls, tool_choice: Literal["auto", "required", "none"] | str | dict[str, Any] | None |
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 dictionary parameter is not yet used, but for future enhancement
@@ -335,6 +344,7 @@ def convert_tool_choice( | |||
} | |||
elif tool_choice == "mcp": | |||
return { | |||
"server_label": "mcp", |
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.
this is not correct, but just for backward and type compat
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.
This feels like it could be a breaking change (you used to set tool choice to mcp, now the server will error because the server with label mcp
doesnt exist)
can we do something smarter here?
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.
quick q
@@ -335,6 +344,7 @@ def convert_tool_choice( | |||
} | |||
elif tool_choice == "mcp": | |||
return { | |||
"server_label": "mcp", |
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.
This feels like it could be a breaking change (you used to set tool choice to mcp, now the server will error because the server with label mcp
doesnt exist)
can we do something smarter here?
This pull request resolves #968