fix import (#242)
* 🐛 fix import (#224) * 🐛 fix import of corrupted history see https://github.com/mckaywrigley/chatbot-ui/issues/224#issuecomment-1486080888 * add the run-test-suite github action
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { Conversation, Message } from './chat';
|
||||
import { Folder } from './folder';
|
||||
import { OpenAIModel } from './openai';
|
||||
|
||||
export type SupportedExportFormats =
|
||||
| ExportFormatV1
|
||||
| ExportFormatV2
|
||||
| ExportFormatV3;
|
||||
export type LatestExportFormat = ExportFormatV3;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
interface ConversationV1 {
|
||||
id: number;
|
||||
name: string;
|
||||
messages: Message[];
|
||||
}
|
||||
|
||||
export type ExportFormatV1 = ConversationV1[];
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
interface ChatFolder {
|
||||
id: number;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface ExportFormatV2 {
|
||||
history: Conversation[] | null;
|
||||
folders: ChatFolder[] | null;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
export interface ExportFormatV3 {
|
||||
version: 3;
|
||||
history: Conversation[];
|
||||
folders: Folder[];
|
||||
}
|
||||
Reference in New Issue
Block a user