mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
_get_file_search_tool_call
This commit is contained in:
parent
4d4e0d8a6d
commit
ded612563d
1 changed files with 4 additions and 0 deletions
|
|
@ -137,6 +137,8 @@ class StandardBuiltInToolCostTracking:
|
|||
return WebSearchOptions(**kwargs.get("web_search_options", {}))
|
||||
if "tools" in kwargs:
|
||||
tools = kwargs.get("tools", [])
|
||||
if tools is None:
|
||||
return None
|
||||
# Look for web search tool in the tools array
|
||||
for tool in tools:
|
||||
if isinstance(tool, dict):
|
||||
|
|
@ -148,6 +150,8 @@ class StandardBuiltInToolCostTracking:
|
|||
def _get_file_search_tool_call(kwargs: Dict) -> Optional[FileSearchTool]:
|
||||
if "tools" in kwargs:
|
||||
tools = kwargs.get("tools", [])
|
||||
if tools is None:
|
||||
return None
|
||||
# Look for web search tool in the tools array
|
||||
for tool in tools:
|
||||
if isinstance(tool, dict):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue