-
Notifications
You must be signed in to change notification settings - Fork 333
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
OAI compat endpoint w/ Images? #1008
Comments
Hmm maybe this example gives the hint that I need to include https://github.com/EricLBuehler/mistral.rs/blob/master/examples/server/phi3v_base64.py#L61 |
Yep, it works if I include |
Found the error line:
|
So I am thinking that mllama expects those image tokens within the text section. So my expectation for what I'd want out of this is to inject the necessary token at the oai payload processing step (rather than within this mllama processing step) if the token is not already present when an image content is provided. This would accommodate how I have seen the schema not require the image token in the text content (which is necessary for a vanilla oai compat consumption by open web UI). And it would also accommodate existing users that already include the token. I have never messed with rust but if someone doesn't beat me to it I might try my hand at what I'm suggesting. |
I think I worked this out with Claude. Will attempt to add a step in here to detect and inject image tokens to the text part if not present.
|
Opened a PR with a minimal check-inject addition. Hope you can make use of it. It meets at least my own needs for using naturally in OpenWebUI. |
Describe the bug
I finally got llama 3.2 11b working and
/image
works great with-i
but using it as an OAI compat endpoint doesn't seem to accept b64 images. I get this error:With this
messages
payload:I see no mention of
image_url
support in theHTTP.md
so maybe this is not supported for OAI compat endpoint?https://github.com/EricLBuehler/mistral.rs/blob/master/docs/HTTP.md
Latest commit or version
Using docker:
ghcr.io/ericlbuehler/mistral.rs:cuda-86-sha-b38c72c
The text was updated successfully, but these errors were encountered: