Configure model path for all libraries
This commit is contained in:
@@ -8,9 +8,9 @@ export type AiOptions = LLMOptions & {
|
||||
binary: string;
|
||||
/** Model: `ggml-base.en.bin` */
|
||||
model: string;
|
||||
/** Path to models */
|
||||
path: string;
|
||||
}
|
||||
/** Path to models */
|
||||
path: string;
|
||||
}
|
||||
|
||||
export class Ai {
|
||||
@@ -25,6 +25,7 @@ export class Ai {
|
||||
vision!: Vision;
|
||||
|
||||
constructor(public readonly options: AiOptions) {
|
||||
process.env.TRANSFORMERS_CACHE = options.path;
|
||||
this.audio = new Audio(this);
|
||||
this.language = new LLM(this);
|
||||
this.vision = new Vision(this);
|
||||
|
||||
Reference in New Issue
Block a user