Closed kouloumos closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
chat-btc | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Apr 3, 2024 1:07pm |
:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Issue Currently, we only use the first
N
messages of the chat history instead of the lastN
.Details In the
constructMessageHistory
function, the loop incorrectly iterates over indexes based on the originalmessages
array rather than themessageWindow
slice. To fix this and correctly process the lastN
messages, the loop should iterate overmessageWindow
instead.Fix That's what I fix with 81ca8bf55f0b07dca405fd72f819f3652ca1154f. Then, with a16fb258d15cfc994a5d8a8e7084d672b445d7e7, I refactored the related code to make it less error-prone, potentially avoiding issues as the one described here.