We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e15fb4e commit 7161685Copy full SHA for 7161685
src/App/src/components/Chat/Chat.tsx
@@ -558,7 +558,11 @@ const Chat: React.FC<ChatProps> = ({
558
scrollChatToBottom();
559
} else if (isChartQuery(userMessage)) {
560
try {
561
- const parsedChartResponse = JSON.parse(runningText);
+
562
+ const splitRunningText= runningText.split("}{")
563
+ let parsedChartResponse:any = {};
564
+ parsedChartResponse["object"] = JSON.parse(JSON.parse("{" + splitRunningText[splitRunningText.length-1])?.choices[0]?.messages[0]?.content)?.answer;
565
566
if (
567
"object" in parsedChartResponse &&
568
parsedChartResponse?.object?.type &&
0 commit comments