Skip to content

Commit

Permalink
Merge pull request #30 from BCG-X-Official/fix-full-llm-chat-history
Browse files Browse the repository at this point in the history
Fix: full llm chat history for the agent
  • Loading branch information
kaikun213 committed Mar 5, 2024
2 parents 730f322 + 628253c commit aa36d22
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/ConversationView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ const ConversationView = () => {
let formatedMessageList = []
for (let i = messageList.length - 1; i >= 0; i--) {
const message = messageList[i] as Message
const llmEvents = message.events.filter((event) => event.data_type === "llm")
formatedMessageList.unshift({
role: message.creatorRole,
content: `${message.content}`,
content: `${message.content}${llmEvents.map((event) => event.data).join("/n")}`,
})
}

Expand Down

0 comments on commit aa36d22

Please sign in to comment.