- v1ToV2(v1): {
spec: "chara_card_v2";
spec_version: string;
data: {
name: string;
description: string;
personality: string;
scenario: string;
first_mes: string;
mes_example: string;
creator_notes: string;
system_prompt: string;
post_history_instructions: string;
alternate_greetings: string[];
character_book?: { entries: { keys: string[]; content: string; extensions: Record<string, any>; enabled: boolean; insertion_order: number; case_sensitive?: boolean | undefined; name?: string | undefined; ... 6 more ...; position?: "before_char" | ... 1 more ... | undefined; }[]; ... 5 more ...; recursive_scanning?: boolean | undefin...;
tags: string[];
creator: string;
character_version: string;
extensions: Record<string, any>;
};
}
-
Parameters
-
v1: {
name: string;
description: string;
personality: string;
scenario: string;
first_mes: string;
mes_example: string;
}
-
name: string
-
description: string
-
personality: string
-
scenario: string
-
first_mes: string
-
mes_example: string
Returns {
spec: "chara_card_v2";
spec_version: string;
data: {
name: string;
description: string;
personality: string;
scenario: string;
first_mes: string;
mes_example: string;
creator_notes: string;
system_prompt: string;
post_history_instructions: string;
alternate_greetings: string[];
character_book?: { entries: { keys: string[]; content: string; extensions: Record<string, any>; enabled: boolean; insertion_order: number; case_sensitive?: boolean | undefined; name?: string | undefined; ... 6 more ...; position?: "before_char" | ... 1 more ... | undefined; }[]; ... 5 more ...; recursive_scanning?: boolean | undefin...;
tags: string[];
creator: string;
character_version: string;
extensions: Record<string, any>;
};
}
-
spec: "chara_card_v2"
-
spec_version: string
-
data: {
name: string;
description: string;
personality: string;
scenario: string;
first_mes: string;
mes_example: string;
creator_notes: string;
system_prompt: string;
post_history_instructions: string;
alternate_greetings: string[];
character_book?: { entries: { keys: string[]; content: string; extensions: Record<string, any>; enabled: boolean; insertion_order: number; case_sensitive?: boolean | undefined; name?: string | undefined; ... 6 more ...; position?: "before_char" | ... 1 more ... | undefined; }[]; ... 5 more ...; recursive_scanning?: boolean | undefin...;
tags: string[];
creator: string;
character_version: string;
extensions: Record<string, any>;
}
-
name: string
-
description: string
-
personality: string
-
scenario: string
-
first_mes: string
-
mes_example: string
-
creator_notes: string
-
system_prompt: string
-
post_history_instructions: string
-
alternate_greetings: string[]
-
Optional
character_book?: { entries: { keys: string[]; content: string; extensions: Record<string, any>; enabled: boolean; insertion_order: number; case_sensitive?: boolean | undefined; name?: string | undefined; ... 6 more ...; position?: "before_char" | ... 1 more ... | undefined; }[]; ... 5 more ...; recursive_scanning?: boolean | undefin...
-
tags: string[]
-
creator: string
-
character_version: string
-
extensions: Record<string, any>
Converts a
Cards.V1
to aCards.V2
, populating V2 fields with appropriate defaults.Example