-
Notifications
You must be signed in to change notification settings - Fork 432
[Inference snippets] VLM hf_hub, oai snippets #985
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mishig25!
model.pipeline_tag === "text-generation" | ||
? [{ role: "user", content: "What is the capital of France?" }] | ||
: [ | ||
{ | ||
role: "user", | ||
content: [ | ||
{ | ||
type: "image_url", | ||
image_url: { | ||
url: "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg", | ||
}, | ||
}, | ||
{ type: "text", text: "Describe this image in one sentence." }, | ||
], | ||
}, | ||
]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels like these example messages should be in inputs.ts. I can do it in a later PR if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 - This is amazing!
Refactor conversational input to getModelInputSnippet. Follow up to comment #985 (comment) @Wauplin
Thanks to #976, now we can show
hf_hub
,oai
snippets for VLMs ("conversational image-text-to-text" models).