Type alias: LlamaGrammarOptions
ts
type LlamaGrammarOptions: {
grammar: string;
printGrammar: boolean;
stopStrings: string[];
trimWhitespaceSuffix: boolean;
};
type LlamaGrammarOptions: {
grammar: string;
printGrammar: boolean;
stopStrings: string[];
trimWhitespaceSuffix: boolean;
};
Type declaration
grammar
ts
grammar: string;
grammar: string;
GBNF grammar
printGrammar
ts
printGrammar?: boolean;
printGrammar?: boolean;
print the grammar to stdout
stopStrings
ts
stopStrings?: string[];
stopStrings?: string[];
Consider any of these texts as EOS for the generated out. Only supported by LlamaChatSession
trimWhitespaceSuffix
ts
trimWhitespaceSuffix?: boolean;
trimWhitespaceSuffix?: boolean;
Trim whitespace from the end of the generated text. Only supported by LlamaChatSession