From b596b8f0cbd5efe1b0e55f03563c89c54d4fe392 Mon Sep 17 00:00:00 2001 From: Hugo Haldi <20846785+HaldiH@users.noreply.github.com> Date: Sun, 27 Oct 2024 13:41:50 +0100 Subject: [PATCH] Fix: generate endpoint form model According to the [Ollama documentation] the parameter `context` should be an array of int, if specified. --- backend/open_webui/apps/ollama/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/apps/ollama/main.py b/backend/open_webui/apps/ollama/main.py index 9db96493e..2056a4c03 100644 --- a/backend/open_webui/apps/ollama/main.py +++ b/backend/open_webui/apps/ollama/main.py @@ -692,7 +692,7 @@ class GenerateCompletionForm(BaseModel): options: Optional[dict] = None system: Optional[str] = None template: Optional[str] = None - context: Optional[str] = None + context: Optional[list[int]] = None stream: Optional[bool] = True raw: Optional[bool] = None keep_alive: Optional[Union[int, str]] = None