open-webui / pipelines

Pipelines: Versatile, UI-Agnostic OpenAI-Compatible Plugin Framework
MIT License
956 stars 300 forks source link

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

Closed Wenlin88 closed 3 weeks ago

Wenlin88 commented 3 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.