-
Notifications
You must be signed in to change notification settings - Fork 17.7k
openai[patch]: propagate computer use actions to .tool_calls #30329
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: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
|
||
Currently supported values are ``"concise"`` or ``"detailed"``. | ||
|
||
.. versionadded:: 0.3.9 |
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.
.. versionadded:: 0.3.9 | |
.. versionadded:: 0.3.10 |
"""Truncation strategy (Responses API). Can be ``"auto"`` or ``"disabled"`` | ||
(default). If ``"auto"``, model may drop input items from the middle of the | ||
message sequence to fit the context window. | ||
|
||
.. versionadded:: 0.3.9 |
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.
.. versionadded:: 0.3.9 | |
.. versionadded:: 0.3.10 |
@@ -2877,8 +2895,13 @@ def _construct_responses_api_payload( | |||
for legacy_token_param in ["max_tokens", "max_completion_tokens"]: | |||
if legacy_token_param in payload: | |||
payload["max_output_tokens"] = payload.pop(legacy_token_param) | |||
if "reasoning_effort" in payload: | |||
payload["reasoning"] = {"effort": payload.pop("reasoning_effort")} | |||
if "reasoning_effort" in payload or "reasoning_summary" in payload: |
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.
wonder if it'd be less confusing to have a single reasoning
param that matches openais
@@ -3127,6 +3150,17 @@ def _construct_lc_result_from_responses_api( | |||
if _FUNCTION_CALL_IDS_MAP_KEY not in additional_kwargs: | |||
additional_kwargs[_FUNCTION_CALL_IDS_MAP_KEY] = {} | |||
additional_kwargs[_FUNCTION_CALL_IDS_MAP_KEY][output.call_id] = output.id | |||
elif output.type == "computer_call": | |||
tool_call = { |
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 drop these tool calls when sending back messages?
No description provided.