-
Notifications
You must be signed in to change notification settings - Fork 230
feat: add image input support for vision models #596
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
base: main
Are you sure you want to change the base?
Conversation
- Add --image/-i flag to include image files in prompts - Support common formats: PNG, JPEG, GIF, WebP (max 5MB, max 10 images) - OpenAI: use content arrays with text and image_url parts - Ollama: use native Images field for vision models like LLaVA - Error gracefully for non-vision APIs (Anthropic, Google, Cohere) - Validate file existence, format, and size limits - Works with any OpenAI-compatible endpoint in config Authored-By: claude, @anuramat, @gy-mate
71bb937 to
5a9d0d1
Compare
|
The linter error refers to a line that is left unchanged by this PR. |
|
@caarlos0 Could you please review this PR? Many thanks in advance! :) |
|
i wonder how much of this is really needed, and how much of it is needed here. afaik fantasy and crush already support passing image attachments, and we already have code handling mime types and stuff like that. shouldn't we maybe have a new API for image models in fantasy? and probably eventually another one for audio etc? maybe @kujtimiihoxha and @andreynering have more thoughts on this |
|
I'd like to use a CLI for this purpose. As far as I understand, crush only has a basic CLI with no piping or follow-up options and fantasy doesn't have one at all. That's why I'd love to see this feature in mods. |
|
Hey @gy-mate, Can you let us know what you miss from Crush that doesn't fit your use case? What do you mean by "follow-up options"? We basically plan to retire Mods in favor of |
|
Hi @andreynering! :)
I meant |
|
@caarlos0 @andreynering Could you please review my PR in light of the above? Many thanks in advance! :) |
|
Hi @gy-mate, We plan to sunset Mods really soon and archive this repository. From now on, Crush is our focus, and we do aknowledge how important non-interactive mode is! In fact, yesterday we pushed a release with If you want to contribute to this feature on Crush, that would be wonderful. Otherwise, we'll eventually do that ourselves. In meantime, if your implementation on Mods works well, you can use your fork. |
Oh, I see. Thanks for the info! :)
Awesome, thank you! :)
Shall I open relevant issues in the Crush repo? Or do they already exist? |
I'm not sure. Worth searching if they exist already. Otherwise, feel free to open new issues. |
|
Great, thanks! I've opened charmbracelet/crush#1982 and charmbracelet/crush#1983. |
|
Awesome, thank you! |
Describe your changes
Authored-By: @claude, @anuramat, @gy-mate
Related issue
Resolves #364.
Checklist before requesting a review
CONTRIBUTING.mdIf this is a feature