open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
1.04k stars 324 forks source link

schemas.py fix to support image input with latest open WebUI version #172

Closed Wenlin88 closed 1 month ago

Wenlin88 commented 4 months ago

With latest Open WebUI version it is not any more needed to split content to image and text content:

class ImageContent(BaseModel):
    type: str
    image_url: dict

class TextContent(BaseModel):
    type: str
    text: str

Old implementation can be again used. Tested with Azure OpenAI service GPT-4o model.