fix: tool calling by mapping tools and tool_choice to root payload instead of toolConfig
This commit is contained in:
@@ -971,7 +971,10 @@ class LingmaGatewayClient:
|
||||
},
|
||||
}
|
||||
if tool_config is not None:
|
||||
payload["toolConfig"] = tool_config
|
||||
if "tools" in tool_config and tool_config["tools"]:
|
||||
payload["tools"] = tool_config["tools"]
|
||||
if "tool_choice" in tool_config and tool_config["tool_choice"]:
|
||||
payload["tool_choice"] = tool_config["tool_choice"]
|
||||
logger.info(
|
||||
"lingma payload request_id=%s session_id=%s mode=%s tool_config=%s",
|
||||
request_id,
|
||||
|
||||
Reference in New Issue
Block a user