mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 04:25:54 +08:00
fix:deepseek tool call not working correctly (#12437)
This commit is contained in:
parent
15797c556f
commit
9677144015
@ -377,6 +377,9 @@ class OAIAPICompatLargeLanguageModel(_CommonOaiApiCompat, LargeLanguageModel):
|
||||
for tool in tools:
|
||||
formatted_tools.append(helper.dump_model(PromptMessageFunction(function=tool)))
|
||||
|
||||
if prompt_messages[-1].role.value == "tool":
|
||||
data["tools"] = None
|
||||
else:
|
||||
data["tools"] = formatted_tools
|
||||
|
||||
if stop:
|
||||
|
Loading…
x
Reference in New Issue
Block a user