retrievin key from backend

This commit is contained in:
anovazzi1 2023-09-29 10:05:21 -03:00 • committed by anovazzi1
commit 1b5b36a96d
2 changed files with 14 additions and 15 deletions

View file

@ -220,7 +220,6 @@ export default function FormModal({
files?: Array<any>; files?: Array<any>;
}) => { }) => {
if (chatItem.message) { if (chatItem.message) {
let key = Object.keys(chatItem.message)[0];
newChatHistory.push( newChatHistory.push(
chatItem.files chatItem.files
? { ? {
@ -229,14 +228,14 @@ export default function FormModal({
template: chatItem.template, template: chatItem.template,
thought: chatItem.intermediate_steps, thought: chatItem.intermediate_steps,
files: chatItem.files, files: chatItem.files,
chatKey: key, chatKey: chatItem.chatKey,
} }
: { : {
isSend: !chatItem.is_bot, isSend: !chatItem.is_bot,
message: chatItem.message, message: chatItem.message,
template: chatItem.template, template: chatItem.template,
thought: chatItem.intermediate_steps, thought: chatItem.intermediate_steps,
chatKey: key, chatKey: chatItem.chatKey,
} }
); );
} }

View file

@ -136,18 +136,18 @@ export type TooltipComponentType = {
children: ReactElement; children: ReactElement;
title: string | ReactElement; title: string | ReactElement;
placement?: placement?:
| "bottom-end" | "bottom-end"
| "bottom-start" | "bottom-start"
| "bottom" | "bottom"
| "left-end" | "left-end"
| "left-start" | "left-start"
| "left" | "left"
| "right-end" | "right-end"
| "right-start" | "right-start"
| "right" | "right"
| "top-end" | "top-end"
| "top-start" | "top-start"
| "top"; | "top";
}; };
export type ProgressBarType = { export type ProgressBarType = {