Open progremir opened 1 year ago
same question
Looking at the code, it seems the biggest difference is that the chat.ts
uses HTTP text/event-stream
, whereas chat-stream.ts
uses websockets.
You can see a difference between the two here: https://stackoverflow.com/a/5326159
But they're both using the same model behind the scenes which has streaming
set:
https://hwchase17.github.io/langchainjs/docs/modules/chat_models/overview#streaming
So yes -- they both will come through as a stream, they're just using different web technologies to do it.
(I'm not a maintainer, but feel free to close this ticket if that answers your question, or ping @sullivan-sean for more 😁 )
Hello! Thanks for all the work! It was so easy to get it up and working! I was wondering what's the difference between
chat.ts
andchat-stream.ts
? I don't seechat-stream
being used anywhere, but the bot's responses seem to come as a stream.Thanks!