-
Notifications
You must be signed in to change notification settings - Fork 432
[Conversational snippet] Fix, refactor, & add tests #1003
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
makes it look nicer for streaming text from inference api
@@ -128,6 +128,7 @@ const modelInputSnippets: { | |||
"tabular-classification": inputsTabularPrediction, | |||
"text-classification": inputsTextClassification, | |||
"text-generation": inputsTextGeneration, | |||
"image-text-to-text": inputsTextGeneration, |
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 fix was needed, which caused an error on the hub. slack context.
I've created tests files for snippets that test the snippets for both LLMs & VLMs
}); | ||
|
||
return opts.start + messagesStringified.join(opts.sep) + opts.end; | ||
export function stringifyMessages( |
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.
redo stringifyMessages
function to be cleaner
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.
lgtm from a very very superficial glance, but i didn't look in detail so i'll let someone else review
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.
lgtm from a very very superficial glance, but i didn't look in detail so i'll let someone else review
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! Looks good, I think we can merge it + make a patch release. Glad we now have tests for the snippets 👍
Supersedes #994. This PR adds an `huggingface_hub` snippet for `text-to-image` inference in Python. I added a test as done in #1003. Once this one is approved and merged, I'll move on with all other tasks that the `InferenceClient` supports. --------- Co-authored-by: Mishig <[email protected]>
Description
[Conversational snippet] Fix, refactor, & add tests
closes #1010