Explorar el Código

Revert "fix:deepseek tool call not working correctly" (#12463)

tags/1.0.0-beta.1
crazywoola hace 9 meses
padre
commit
6222179a57
No account linked to committer's email address

+ 1
- 4
api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py Ver fichero

@@ -377,10 +377,7 @@ 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
data["tools"] = formatted_tools

if stop:
data["stop"] = stop

Cargando…
Cancelar
Guardar