diff --git a/ui/src/components/upload-dialog.tsx b/ui/src/components/upload-dialog.tsx index 37e5548..f264a3e 100644 --- a/ui/src/components/upload-dialog.tsx +++ b/ui/src/components/upload-dialog.tsx @@ -97,6 +97,22 @@ const UploadDialog = ({ ); } }); + } else if (selectedType === "Kura") { + file.text().then((text) => { + try { + const jsonData = JSON.parse(text); + const conversations = jsonData; + const parsedConversations = ConversationsSchema.parse(conversations); + addConversations({ + type: "Kura", + file_name: file.name, + conversations: parsedConversations, + }); + setIsDialogOpen(false); + } catch (error) { + console.log(error); + } + }); } else { setError("OpenAI conversations are not supported yet"); }