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

Message Attachment Image Recognition #118

Merged
merged 5 commits into from
Sep 19, 2024
Merged

Conversation

kevinthedang
Copy link
Owner

Changes

  • Allows Image Recognition for the Llava Model and other models alike that allow image recognition.
  • Normal queries can be made without attachments.
  • Important Note: The Application is likely to provide hallucinations for back-to-back image queries.
    • Workaround: Reducing the Message Capacity can help prevent these hallucinations. Probably 2 or 3 max messages?

@kevinthedang kevinthedang added the enhancement New feature or request label Sep 19, 2024
@kevinthedang kevinthedang self-assigned this Sep 19, 2024
@kevinthedang kevinthedang linked an issue Sep 19, 2024 that may be closed by this pull request
JT2M0L3Y
JT2M0L3Y previously approved these changes Sep 19, 2024
Copy link
Collaborator

@JT2M0L3Y JT2M0L3Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the testing environment, this appears to work.

Can you speak a bit more to the need to store the response from the image url in a buffer and then convert it to Base64 before passing it to Ollama?

In other words, was this a requirement of discord for image processing or required to send to llava for interpretation?

@kevinthedang
Copy link
Owner Author

kevinthedang commented Sep 19, 2024

The requirements are for Ollama in general for chat generations.

I thought the URL would be taken but it rejects it. It won't even take Uint8Array[] either. So base64 strings were all that I could use.

Also there are some Logs that need to be taken out before merging.

cc: @JT2M0L3Y

Copy link
Collaborator

@JT2M0L3Y JT2M0L3Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaner! 👍

@kevinthedang kevinthedang merged commit e3b0c9a into master Sep 19, 2024
1 check passed
@kevinthedang kevinthedang deleted the feature/image-recognition branch September 19, 2024 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image recognition from messages with attachments with Llava
2 participants