import { LlamaText } from "../utils/LlamaText.js";
import { StopGenerationTrigger } from "../utils/StopGenerationDetector.js";
import { Llama } from "../bindings/Llama.js";
export type LlamaGrammarOptions = {
    llama: Llama;
    /** GBNF grammar */
    grammar: string;
    /** print the grammar to stdout */
    printGrammar?: boolean;
    /** Consider any of these as EOS for the generated text. Only supported by `LlamaChat` and `LlamaChatSession` */
    stopGenerationTriggers?: readonly (StopGenerationTrigger | LlamaText)[];
    /** Trim whitespace from the end of the generated text. Only supported by `LlamaChat` and `LlamaChatSession` */
    trimWhitespaceSuffix?: boolean;
};
export declare class LlamaGrammar {
    private readonly _stopGenerationTriggers;
    private readonly _trimWhitespaceSuffix;
    private readonly _grammarText;
    /**
     * > GBNF files are supported.
     * > More info here: [github:ggerganov/llama.cpp:grammars/README.md](
     * > https://github.com/ggerganov/llama.cpp/blob/f5fe98d11bdf9e7797bcfb05c0c3601ffc4b9d26/grammars/README.md)
     * @param options
     */
    constructor({ llama, grammar, stopGenerationTriggers, trimWhitespaceSuffix, printGrammar }: LlamaGrammarOptions);
    get grammar(): string;
    get stopGenerationTriggers(): readonly (StopGenerationTrigger | LlamaText)[];
    get trimWhitespaceSuffix(): boolean;
    static getFor(llama: Llama, type: "json" | "list" | "arithmetic" | "japanese" | "chess"): Promise<LlamaGrammar>;
}
