fix(model_providers/ollama): Fix OllamaLargeLanguageModel to correctly set the stop option (#5217)

This commit is contained in:
-LAN- 2024-06-14 18:26:14 +08:00 committed by GitHub
parent b7ff765d8d
commit 7f44e88eda
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -195,7 +195,7 @@ class OllamaLargeLanguageModel(LargeLanguageModel):
data["options"] = model_parameters or {}
if stop:
data["stop"] = "\n".join(stop)
data["options"]["stop"] = stop
completion_type = LLMMode.value_of(credentials["mode"])