mirror of
https://github.com/meta-llama/llama-stack.git
synced 2026-01-03 11:32:16 +00:00
fix: non-llama tool extraction
Summary: Test Plan: Summary: Test Plan: Summary: Test Plan:
This commit is contained in:
parent
60ae7455f6
commit
71db8cd074
4 changed files with 161 additions and 125 deletions
|
|
@ -192,7 +192,11 @@ class LiteLLMOpenAIMixin(
|
|||
if request.tools:
|
||||
input_dict["tools"] = [convert_tooldef_to_openai_tool(tool) for tool in request.tools]
|
||||
if request.tool_config.tool_choice:
|
||||
input_dict["tool_choice"] = request.tool_config.tool_choice.value
|
||||
input_dict["tool_choice"] = (
|
||||
request.tool_config.tool_choice.value
|
||||
if isinstance(request.tool_config.tool_choice, ToolChoice)
|
||||
else request.tool_config.tool_choice
|
||||
)
|
||||
|
||||
provider_data = self.get_request_provider_data()
|
||||
key_field = self.provider_data_api_key_field
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue