First upload version 0.0.1

This commit is contained in:
Neyra
2026-02-05 15:27:49 +08:00
commit 8e9b7201ed
4182 changed files with 593136 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import type { LlamaGrammar } from "./LlamaGrammar.js";
import type { LlamaModel } from "./LlamaModel/LlamaModel.js";
export type LlamaGrammarEvaluationStateOptions = {
model: LlamaModel;
grammar: LlamaGrammar;
};
/**
* Grammar evaluation state is used to track the model response to determine the next allowed characters for the model to generate.
*
* Create a new grammar evaluation state for every response you generate with the model.
*
* This is only needed when using the `LlamaContext` class directly, since `LlamaChatSession` already handles this for you.
*/
export declare class LlamaGrammarEvaluationState {
constructor(options: LlamaGrammarEvaluationStateOptions);
constructor(existingState: LlamaGrammarEvaluationState);
/** Clone the grammar evaluation state */
clone(): LlamaGrammarEvaluationState;
}