fix: keep image sanitizer scoped

This commit is contained in:
Peter Steinberger
2026-01-12 17:55:33 +00:00
parent 8ff09f8337
commit 44e1f271c8
2 changed files with 26 additions and 4 deletions

25
src/types/node-llama-cpp.d.ts vendored Normal file
View File

@@ -0,0 +1,25 @@
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>;
}