Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: Error Code 422 When Sending Chat Messages Containing Images in Azure OpenAI Pipeline #103

Closed
Wenlin88 opened this issue Jun 20, 2024 · 3 comments

Comments

@Wenlin88
Copy link
Contributor

When using the Azure OpenAI pipeline, attempting to send a chat message that contains an image results in a 422 Un processable Entity error. This issue occurs most probably because the current OpenAIChatMessage schema does not support image inputs, leading to validation failures.

Open WebUI Version
v0.3.5

Pipelines
commit df2124e

@justinh-rahb
Copy link
Collaborator

Vision can be disabled per model in Workspace > Models:

Screenshot_20240620-052430.png

@Wenlin88
Copy link
Contributor Author

My current understanding is that it is not coming from this, but more from the fact that image content is in dictionary from WebUI side.

Due that I added to schemas.py:

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

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

class MessageContent(RootModel):
    root: Union[TextContent, ImageContent]

@Wenlin88
Copy link
Contributor Author

#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants