feat: support import and export with prompts (#330)

* feat: support import and export prompts

* test: update importExports.test.ts

* Delete .gitpod.yml
This commit is contained in:
Superman
2023-04-02 12:59:51 +08:00
committed by GitHub
parent 462ca9bb04
commit d68f77867d
4 changed files with 146 additions and 13 deletions
+11 -2
View File
@@ -1,12 +1,14 @@
import { Conversation, Message } from './chat';
import { Folder } from './folder';
import { OpenAIModel } from './openai';
import { Prompt } from './prompt';
export type SupportedExportFormats =
| ExportFormatV1
| ExportFormatV2
| ExportFormatV3;
export type LatestExportFormat = ExportFormatV3;
| ExportFormatV3
| ExportFormatV4;
export type LatestExportFormat = ExportFormatV4;
////////////////////////////////////////////////////////////////////////////////////////////
interface ConversationV1 {
@@ -34,3 +36,10 @@ export interface ExportFormatV3 {
history: Conversation[];
folders: Folder[];
}
export interface ExportFormatV4 {
version: 4;
history: Conversation[];
folders: Folder[];
prompts: Prompt[]
}