Closed thucpn closed 4 days ago
Latest commit: c9c9f18620f13d44625fd573899834277500174b
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
[!CAUTION]
Review failed
The pull request is closed.
The changes in this pull request involve modifications to the chat
function in two files: chat.controller.ts
and route.ts
. The primary alteration is in how the chatHistory
variable is assigned; it now slices the messages
array to exclude the last message, rather than including the entire array. This change affects the context of the chat history used in the chat engine's processing, while other aspects of the functions, such as error handling and response streaming, remain unchanged.
File Path | Change Summary |
---|---|
templates/types/streaming/express/src/controllers/chat.controller.ts | Modified chatHistory to exclude the last message from the messages array. |
templates/types/streaming/nextjs/app/api/chat/route.ts | Modified chatHistory to exclude the last message from the messages array. |
.changeset/brave-pears-reflect.md | Introduced a patch to prevent user messages from being included in chat history. |
chatHistory
variable in a similar manner, slicing the messages
array to exclude the last message, which directly relates to the handling of chat history in the main PR.LlamaIndexAdapter
in this PR modifies how chat responses are handled, which could be relevant to the changes in the chat history management in the main PR.In the chat where messages flow,
A slice of history, now we know.
The last one's gone, a fresh new start,
For clearer context, it plays its part.
With every chat, we hop and cheer,
For changes made, let’s spread the cheer! 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes