Skip to content

Commit

Permalink
fix: add supp for kura style conversations
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanleomk committed Jan 19, 2025
1 parent 7a87301 commit 0fd2c54
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ui/src/components/upload-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down

0 comments on commit 0fd2c54

Please sign in to comment.