Post
1548
๐ข For those who start to work with LLM streaming in web, here is a minimalistic example in JS for accessing server hosted by FastAPI via REST:
https://gist.github.com/nicolay-r/840425749cf6d3e397da3d329e894d59
The code above is a revised verison for accessing Replicate API posted earlier
https://huggingface.co./posts/nicolay-r/390307941200307
The key difference from Replicate API:
- using only POST for passing a body with parameters and fetching the reader.
https://gist.github.com/nicolay-r/840425749cf6d3e397da3d329e894d59
The code above is a revised verison for accessing Replicate API posted earlier
https://huggingface.co./posts/nicolay-r/390307941200307
The key difference from Replicate API:
- using only POST for passing a body with parameters and fetching the reader.