Class ExportLLMAbstract
Methods
StaticcardDB
- cardDB(
options: {
db: CardDB.Stream.Reader;
filepath: string;
oracleText?: boolean;
streamOptions?: CardDB.Stream.StreamOptions;
},
): Promise<number>Exports a single Scrydex CardDB to a reduced LLMDB JSON file.
Parameters
- options: {
db: CardDB.Stream.Reader;
filepath: string;
oracleText?: boolean;
streamOptions?: CardDB.Stream.StreamOptions;
}Options.
db: CardDB.Stream.Reader
Source CardDB stream reader instance.
filepath: string
Output file path for simplified LLM export JSON file.
OptionaloracleText?: booleanWhen false, card rules oracle text is removed.
OptionalstreamOptions?: CardDB.Stream.StreamOptionsOptional stream options for potentially filtering the CardDB.
Returns Promise<number>
Estimated token count for LLM consumption of output LLMDB.
- options: {
Statictypes
Writes the TypeScript declaration file describing the LLMDB JSON schema.
The generated types provide structural context for LLMs and tooling and correspond exactly to the data produced by ExportLLM.cardDB.
Parameters
- options: { filepath: string }
Options
filepath: string
Output file path. Must end in
.d.tsfile extension.
Returns Promise<number>
Estimated token count for LLM consumption of type declaration file.
- options: { filepath: string }
Provides a mechanism to reduce a Scrydex CardDB to a simplified form suitable for AI / LLM consumption. This process removes the CardDB metadata and outputs a LLMDB which is a basic JSON array of LLMCard entries that has just necessary data about the card to reduce token count / costs enabling more reliable parsing by LLMs.