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

[InferenceSnippet] Improve JS snippets (import fs, don't instanciate client) #1294

Open
Wauplin opened this issue Mar 18, 2025 · 0 comments
Open

Comments

@Wauplin
Copy link
Contributor

Wauplin commented Mar 18, 2025

Two orthogonal but related comments:

Originally from @SBrandeis in #1291 (comment) (+see #1291 (comment))

More general remark: the types for stand-alone methods (automaticSpeechRecognition) have a correct typing, while methods on the InferenceClient class (client.automaticSpeechRecognition) do not
Until this is fixed, I would advocate to use the stand-alone functions for better user experience

Originally from @SBrandeis in #1291 (comment)

Maybe let's add an import statement for this
Side note: I think the fs API is only available in a NodeJS context 😅
The equivalent in the Browser is the File Reader API
I think it's fine if the snippets are only compatible with Node, for simplicity - thoughts @julien-c @coyotte508 ?

Let's be sure we align with Python client as well.

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

No branches or pull requests

1 participant