This commit is contained in:
Bagatur 2025-03-12 02:42:05 -07:00
parent c2dedd45e7
commit e8c4787430

View File

@ -538,7 +538,7 @@ def convert_to_openai_tool(
any dict with "type" in "file_search", "function", "computer_use_preview", any dict with "type" in "file_search", "function", "computer_use_preview",
"web_search_preview". "web_search_preview".
""" """
if isinstance(tool, dict) : if isinstance(tool, dict):
if tool.get("type") in ("function", "file_search", "computer_use_preview"): if tool.get("type") in ("function", "file_search", "computer_use_preview"):
return tool return tool
# As of 03.12.25 can be "web_search_preview" or "web_search_preview_2025_03_11" # As of 03.12.25 can be "web_search_preview" or "web_search_preview_2025_03_11"