From 01e4a001d1515b9c2491a20a2bb51018d051a884 Mon Sep 17 00:00:00 2001 From: mutugiii Date: Fri, 21 Jul 2023 21:58:24 +0300 Subject: [PATCH] Formatting the data structure --- src/app/chat/chat.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/chat/chat.component.ts b/src/app/chat/chat.component.ts index d8e36cbb19..daad3b0a2b 100644 --- a/src/app/chat/chat.component.ts +++ b/src/app/chat/chat.component.ts @@ -64,10 +64,10 @@ export class ChatComponent implements OnInit { this.messages.push({ role: 'user', content }); this.chatService.getPrompt(content).subscribe( - (completion: string) => { + (completion: any) => { this.conversations.push({ query: content, - response: completion, + response: completion?.chat, }); this.spinnerOn = false; this.changeDetectorRef.detectChanges();