Fix structured response of tool call

This commit is contained in:
Sameer Kankute
2026-02-09 13:36:01 +05:30
parent f12875bd42
commit 3d49388d8e
2 changed files with 2 additions and 3 deletions
@@ -3,7 +3,7 @@ WebSearch Tool Transformation
Transforms between Anthropic/OpenAI tool_use format and LiteLLM search format.
"""
import json
from typing import Any, Dict, List, Tuple
from litellm._logging import verbose_logger
@@ -301,7 +301,7 @@ class WebSearchTransformation:
"type": "function",
"function": {
"name": tc["name"],
"arguments": str(tc["input"]),
"arguments": json.dumps(tc["input"]) if isinstance(tc["input"], dict) else str(tc["input"]),
},
}
for tc in tool_calls
-1
View File
@@ -926,7 +926,6 @@ class OpenAIChatCompletion(BaseLLM, BaseOpenAILLM):
logging_obj=logging_obj,
)
stringified_response = response.model_dump()
print(f"🔥stringified_response: {stringified_response}")
logging_obj.post_call(
input=data["messages"],
api_key=api_key,