Takes a V2 card, and backfills every V1 fields with the obsolescence notice:
"This is a V2 Character Card. Please update your frontend."
To backfill the V1 fields with the actual data, see: backfillV2
Example
import*asCardsfrom'character-card-utils'
constv2Card = { spec:'chara_card_v2', spec_version:'2.0', data: { name:'Mary', description:'{{char}} is a woman.', personality:'generous', scenario:'{{char}} loves {{user}}', first_mes:'Hello!', mes_example:'', creator_notes:'My first card.', system_prompt:'', post_history_instructions:'Your message must start with the word "Sweetie".', alternate_greetings: ['Heeeey!'], character_book:undefined, tags: ['female', 'oc'], creator:'darkpriest', character_version:'', extensions: {}, }, }
constv2CardWithBackfilledObsolescenceNotice: Cards.BackfilledV2 = { name:'This is a V2 Character Card. Please update your frontend.', description:'This is a V2 Character Card. Please update your frontend.', personality:'This is a V2 Character Card. Please update your frontend.', scenario:'This is a V2 Character Card. Please update your frontend.', first_mes:'This is a V2 Character Card. Please update your frontend.', mes_example:'This is a V2 Character Card. Please update your frontend.', spec:'chara_card_v2', spec_version:'2.0', data: { name:'Mary', description:'{{char}} is a woman.', personality:'generous', scenario:'{{char}} loves {{user}}', first_mes:'Hello!', mes_example:'', creator_notes:'My first card.', system_prompt:'', post_history_instructions:'Your message must start with the word "Sweetie".', alternate_greetings: ['Heeeey!'], character_book:undefined, tags: ['female', 'oc'], creator:'darkpriest', character_version:'', extensions: {}, }, }
Takes a V2 card, and backfills every V1 fields with the obsolescence notice: "This is a V2 Character Card. Please update your frontend."
To backfill the V1 fields with the actual data, see: backfillV2
Example