aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ChatBox/ChatBox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes/ChatBox/ChatBox.tsx')
-rw-r--r--src/client/views/nodes/ChatBox/ChatBox.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/ChatBox/ChatBox.tsx b/src/client/views/nodes/ChatBox/ChatBox.tsx
index 8b4a7bd0a..e3a164b3e 100644
--- a/src/client/views/nodes/ChatBox/ChatBox.tsx
+++ b/src/client/views/nodes/ChatBox/ChatBox.tsx
@@ -54,7 +54,6 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
constructor(props: FieldViewProps) {
super(props);
makeObservable(this);
- this.history = [{ role: ASSISTANT_ROLE.ASSISTANT, text_content: 'Welcome to the Document Analyser Assistant! Link a document or ask questions to get started.' }];
this.openai = this.initializeOpenAI();
if (StrCast(this.dataDoc.vectorstore_id) == '') {
console.log('new_id');
@@ -278,6 +277,8 @@ export class ChatBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
} catch (e) {
console.error('Failed to parse history from dataDoc:', e);
}
+ } else {
+ this.history = [{ role: ASSISTANT_ROLE.ASSISTANT, text_content: 'Welcome to the Document Analyser Assistant! Link a document or ask questions to get started.' }];
}
reaction(
() => {