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

[FEAT]: Add pixtral vision capabilities #2342

Closed
nekopep opened this issue Sep 21, 2024 · 3 comments · Fixed by #2343
Closed

[FEAT]: Add pixtral vision capabilities #2342

nekopep opened this issue Sep 21, 2024 · 3 comments · Fixed by #2343
Labels
enhancement New feature or request feature request

Comments

@nekopep
Copy link

nekopep commented Sep 21, 2024

What would you like to see?

Currenlty we are able to select new MistralAi Pixtral 12b model.

This model is a multimodal model specialized in image analysis. In latest AnythingLLM 1.2.2 we can upload image but we need the send the image to pixtral in base64 in the request.

messages = [
# Define the messages for the chat
messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "text",
                "text": "What's in this image?"
            },
            {
                "type": "image_url"
                "image_url": f"data:image/jpeg;base64,{base64_image}"
            }
        ]
    }
]

It can be used to transcribe image (OCR) see example in image below. You can even compare two images.

I could be very cool to add this feature to anythingLLM :)

Doc about the feature:
https://docs.mistral.ai/capabilities/vision/#passing-a-base64-encoded-image

@nekopep nekopep added enhancement New feature or request feature request labels Sep 21, 2024
@timothycarambat
Copy link
Member

Are you using the "Mistral" LLM provider using that uses their hosted API service? I am presuming so

@nekopep
Copy link
Author

nekopep commented Sep 22, 2024

Yes, I'm using AnythingLLM as a "proxy" to diverse LLM provider (currently Mistral and ChatGPT)
Thanks for the merge ;)

@nekopep
Copy link
Author

nekopep commented Sep 22, 2024

Hi timothy works perfectly! Thks!

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

Successfully merging a pull request may close this issue.

2 participants