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
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