How can I achieve streaming responses with Node-llama-cpp and Langchain? #97
-
How do I implement streaming responses in Langchain when integrating it with Node-llama-cpp? Are there specific features or configurations in Node-llama-cpp or Langchain that support and facilitate streaming behavior when used in conjunction? Thank you in advance for your help and support! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
I'm not sure about the implementation details of the langjs module. |
Beta Was this translation helpful? Give feedback.
-
OK PR #3394 submitted on Langchain.JS to add streaming to the LLM and Chat modules, hopefully it will be in a release soon. |
Beta Was this translation helpful? Give feedback.
-
Note the first PR only supported single string submissions, I just updated it to handle multiple messages, examples will be in the updated docs. See PR# 3463. |
Beta Was this translation helpful? Give feedback.
-
I find There used to be a https://withcatai.github.io/node-llama-cpp/api/classes/LlamaContext#decode , but I didn't find it in beta.
|
Beta Was this translation helpful? Give feedback.
OK PR #3394 submitted on Langchain.JS to add streaming to the LLM and Chat modules, hopefully it will be in a release soon.