| 1 | type TavernCardV2 = { |
| 2 | spec: 'chara_card_v2'; |
| 3 | spec_version: '2.0'; |
| 4 | data: { |
| 5 | name: string; |
| 6 | description: string; |
| 7 | personality: string; |
| 8 | scenario: string; |
| 9 | first_mes: string; |
| 10 | mes_example: string; |
| 11 | |
| 12 | creator_notes: string; |
| 13 | system_prompt: string; |
| 14 | post_history_instructions: string; |
| 15 | alternate_greetings: Array<string>; |
| 16 | character_book?: CharacterBook; |
| 17 | |
| 18 | tags: Array<string>; |
| 19 | creator: string; |
| 20 | character_version: string; |
| 21 | extensions: Record<string, any>; |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | type CharacterBook = { |
| 26 | name?: string; |
| 27 | description?: string; |
| 28 | scan_depth?: number; |
| 29 | token_budget?: number; |
| 30 | recursive_scanning?: boolean; |
| 31 | extensions: Record<string, any>; |
| 32 | entries: Array<CharacterBookEntry>; |
| 33 | } |
| 34 | |
| 35 | type CharacterBookEntry = { |
| 36 | keys: Array<string>; |
| 37 | content: string; |
| 38 | extensions: Record<string, any>; |
| 39 | enabled: boolean; |
| 40 | insertion_order: number; |
| 41 | case_sensitive?: boolean; |
| 42 | |
| 43 | name?: string; |
| 44 | priority?: number; |
| 45 | |
| 46 | id?: number; |
| 47 | comment?: string; |
| 48 | selective?: boolean; |
| 49 | secondary_keys?: Array<string>; |
| 50 | constant?: boolean; |
| 51 | position?: 'before_char' | 'after_char'; |
| 52 | }; |