Files
openclaw/src/types/node-llama-cpp.d.ts
Peter Steinberger c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00

23 lines
639 B
TypeScript

declare module "node-llama-cpp" {
export enum LlamaLogLevel {
error = 0,
}
export type LlamaEmbedding = { vector: Float32Array | number[] };
export type LlamaEmbeddingContext = {
getEmbeddingFor: (text: string) => Promise<LlamaEmbedding>;
};
export type LlamaModel = {
createEmbeddingContext: () => Promise<LlamaEmbeddingContext>;
};
export type Llama = {
loadModel: (params: { modelPath: string }) => Promise<LlamaModel>;
};
export function getLlama(params: { logLevel: LlamaLogLevel }): Promise<Llama>;
export function resolveModelFile(modelPath: string, cacheDir?: string): Promise<string>;
}