refac/fix: inherit request form data

This commit is contained in:
Timothy Jaeryang Baek 2025-10-11 14:54:07 -05:00
parent e14430daa8
commit 5064506de4

View file

@ -2667,8 +2667,6 @@ async def process_chat_response(
results = []
for tool_call in response_tool_calls:
print("tool_call", tool_call)
tool_call_id = tool_call.get("id", "")
tool_function_name = tool_call.get("function", {}).get(
"name", ""
@ -2799,9 +2797,9 @@ async def process_chat_response(
try:
new_form_data = {
**form_data,
"model": model_id,
"stream": True,
"tools": form_data["tools"],
"messages": [
*form_data["messages"],
*convert_content_blocks_to_messages(
@ -2975,6 +2973,7 @@ async def process_chat_response(
try:
new_form_data = {
**form_data,
"model": model_id,
"stream": True,
"messages": [