Spaces:
Runtime error
Runtime error
File size: 1,137 Bytes
13095e0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
import { Conversation, Message } from './chat';
import { FolderInterface } from './folder';
import { OpenAIModel } from './openai';
import { Prompt } from './prompt';
export type SupportedExportFormats =
| ExportFormatV1
| ExportFormatV2
| ExportFormatV3
| ExportFormatV4;
export type LatestExportFormat = ExportFormatV4;
////////////////////////////////////////////////////////////////////////////////////////////
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: FolderInterface[];
}
export interface ExportFormatV4 {
version: 4;
history: Conversation[];
folders: FolderInterface[];
prompts: Prompt[];
}
|