Class: LlamaGrammar
Extended By
Constructors
new LlamaGrammar(options)
ts
new LlamaGrammar(options): LlamaGrammar
new LlamaGrammar(options): LlamaGrammar
GBNF files are supported. More info here: github:ggerganov/llama.cpp:grammars/README.md
Parameters
Parameter | Type | Description |
---|---|---|
options | LlamaGrammarOptions |
Source
llamaEvaluator/LlamaGrammar.ts:40
Accessors
grammar
ts
get grammar(): string
get grammar(): string
Source
llamaEvaluator/LlamaGrammar.ts:51
stopStrings
ts
get stopStrings(): readonly string[]
get stopStrings(): readonly string[]
Source
llamaEvaluator/LlamaGrammar.ts:55
trimWhitespaceSuffix
ts
get trimWhitespaceSuffix(): boolean
get trimWhitespaceSuffix(): boolean
Source
llamaEvaluator/LlamaGrammar.ts:59
Methods
getFor()
ts
static getFor(type): Promise<LlamaGrammar>
static getFor(type): Promise<LlamaGrammar>
Parameters
Parameter | Type |
---|---|
type | | "json" | "list" | "arithmetic" | "japanese" | "chess" |