Spaces:
Configuration error
Configuration error
File size: 639 Bytes
3a65265 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
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>;
}
|