From ec3435de001c25b645fad189f0d5f811bb5d22f0 Mon Sep 17 00:00:00 2001 From: Florian Kick Date: Fri, 4 Apr 2025 13:30:51 +0200 Subject: [PATCH] make content parameter optional in OpenAI chat completion API endpoint --- backend/open_webui/routers/ollama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/routers/ollama.py b/backend/open_webui/routers/ollama.py index fcb263d1e..775cd0446 100644 --- a/backend/open_webui/routers/ollama.py +++ b/backend/open_webui/routers/ollama.py @@ -1197,7 +1197,7 @@ class OpenAIChatMessageContent(BaseModel): class OpenAIChatMessage(BaseModel): role: str - content: Union[str, list[OpenAIChatMessageContent]] + content: Union[Optional[str], list[OpenAIChatMessageContent]] model_config = ConfigDict(extra="allow")