fix:deepseek tool call not working correctly (#12437)
This commit is contained in:
parent
15797c556f
commit
9677144015
1 changed files with 4 additions and 1 deletions
|
|
@ -377,7 +377,10 @@ class OAIAPICompatLargeLanguageModel(_CommonOaiApiCompat, LargeLanguageModel):
|
|||
for tool in tools:
|
||||
formatted_tools.append(helper.dump_model(PromptMessageFunction(function=tool)))
|
||||
|
||||
data["tools"] = formatted_tools
|
||||
if prompt_messages[-1].role.value == "tool":
|
||||
data["tools"] = None
|
||||
else:
|
||||
data["tools"] = formatted_tools
|
||||
|
||||
if stop:
|
||||
data["stop"] = stop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue