MapsTools
trait MapsTools
Methods
array
mapProviderTool(ProviderTool $tool, Provider $provider)
Map a provider tool to an xAI provider tool definition.
array
mapCodeExecutionTool(CodeExecution $tool, Provider $provider)
Map a code execution tool to an xAI code interpreter definition.
array
mapFileSearchTool(FileSearch $tool, Provider $provider)
Map a file search tool to an xAI file search definition.
array
mapWebSearchTool(WebSearch $tool, Provider $provider)
Map a web search tool to an xAI web search definition.
Details
at line 27
protected array
mapTools(array $tools, Provider $provider)
Map the given tools to xAI function definitions.
at line 45
protected array
mapProviderTool(ProviderTool $tool, Provider $provider)
Map a provider tool to an xAI provider tool definition.
at line 58
protected array
mapCodeExecutionTool(CodeExecution $tool, Provider $provider)
Map a code execution tool to an xAI code interpreter definition.
at line 73
protected array
mapFileSearchTool(FileSearch $tool, Provider $provider)
Map a file search tool to an xAI file search definition.
at line 88
protected array
mapWebSearchTool(WebSearch $tool, Provider $provider)
Map a web search tool to an xAI web search definition.
at line 103
protected array
mapTool(Tool $tool)
Map a regular tool to an xAI function definition.