-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat[openai]: responses API #7831
base: main
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
|
call_id: toolCall.id!, | ||
id: toolCall.id!, |
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.
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.
'call_id' maps to what we store as toolCall.id
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.
for now was thinking of throwing the new 'id' for all tool calls in AIMessage.additionalKwargs['openai_tool_call_ids'] or something like that. and it'd be a map from call_id -> id
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.
smth like
if tool_calls := lc_msg.tool_calls:
if not lc_msg.additional_kwargs.get("__openai_function_call_ids__"):
raise ValueError(...)
function_call_ids = lc_msg.additional_kwargs["__openai_function_call_ids__"]
for tool_call in tool_calls:
function_call = {
"type": "function_call",
"name": tool_call["name"],
"arguments": tool_call["arguments"],
"call_id": tool_call["id"],
"id": function_call_ids[tool_call["id"]],
}
updated_payload["input"].append(function_call)
Fixes # (issue)