serverless-chat-langchainjs icon indicating copy to clipboard operation
serverless-chat-langchainjs copied to clipboard

Add chat memory

Open sinedied opened this issue 10 months ago • 3 comments

Currently only the last chat message with the user question is fed to the chat model. However, the complete chat history is sent to the server. We should use LangChain's Memory component to integrate the previous messages in the model invocation, with a limit set.

Tasks

  • [ ] Add BufferMemory with the last 5 messages to the existing chain in /chat endpoint
  • [ ] Extract the 5 message window value in constants.ts

sinedied avatar Apr 04 '24 17:04 sinedied

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Jun 09 '24 01:06 github-actions[bot]

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.

github-actions[bot] avatar Aug 10 '24 01:08 github-actions[bot]