aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/ChatBox.tsx
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2024-08-29 21:01:29 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2024-08-29 21:01:29 -0400
commit3a1d859359b462fc9a9f1c001d6681a8d886f2b6 (patch)
treea0969bee2375be2c2d795dcd046de60ed67a3ad5 /src/client/views/nodes/ChatBox/ChatBox.tsx
parent9be434cddc30baada63aff0c5dae6dbf606f2590 (diff)
added loop summary and updated type for RAG tool output
Diffstat (limited to 'src/client/views/nodes/ChatBox/ChatBox.tsx')
-rw-r--r--src/client/views/nodes/ChatBox/ChatBox.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/ChatBox/ChatBox.tsx b/src/client/views/nodes/ChatBox/ChatBox.tsx
index ffede6901..345bfd8d1 100644
--- a/src/client/views/nodes/ChatBox/ChatBox.tsx
+++ b/src/client/views/nodes/ChatBox/ChatBox.tsx
@@ -445,7 +445,11 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
get formattedHistory(): string {
let history = '<chat_history>\n';
for (const message of this.history) {
- history += `<${message.role}>${message.content.map(content => content.text).join(' ')}</${message.role}>\n`;
+ history += `<${message.role}>${message.content.map(content => content.text).join(' ')}`;
+ if (message.loop_summary) {
+ history += `<loop_summary>${message.loop_summary}</loop_summary>`;
+ }
+ history += `</${message.role}>\n`;
}
history += '</chat_history>';
return history;