Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
nicolay-rΒ 
posted an update 6 days ago
Post
1477
πŸ“’ If you're around Replicate AI models and wish to use them in streaming mode via JS, then this snippet might be a quick way to experiment with streaming API usage:
https://gist.github.com/nicolay-r/86fc212086c0955d541244253ec0564b

Why it matters? The original docs has:
🟒 No the relate support for JS rather only Python/HTTP and NodeJS by using the replicate package.
🟒 Mixture of NodeJS and bash curl snippets:
https://replicate.com/docs/topics/predictions/streaming

Special thanks to the reated template for accessing APIs of other vendors like Claude / OpenAI by Simon Willson in the following post:
https://til.simonwillison.net/llms/streaming-llm-apis

Default model: meta-llama/Meta-Llama-3-70B

PS: I am happy and open for your comments related to this solution
In this post