Fixed tool calls
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as os from 'node:os';
|
||||
import {LLM, LLMOptions} from './llm';
|
||||
import { Audio } from './audio.ts';
|
||||
import {Vision} from './vision.ts';
|
||||
@@ -10,13 +11,10 @@ export type AiOptions = LLMOptions & {
|
||||
model: string;
|
||||
}
|
||||
/** Path to models */
|
||||
path: string;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
export class Ai {
|
||||
private downloads: {[key: string]: Promise<string>} = {};
|
||||
private whisperModel!: string;
|
||||
|
||||
/** Audio processing AI */
|
||||
audio!: Audio;
|
||||
/** Language processing AI */
|
||||
@@ -25,6 +23,7 @@ export class Ai {
|
||||
vision!: Vision;
|
||||
|
||||
constructor(public readonly options: AiOptions) {
|
||||
if(!options.path) options.path = os.tmpdir();
|
||||
process.env.TRANSFORMERS_CACHE = options.path;
|
||||
this.audio = new Audio(this);
|
||||
this.language = new LLM(this);
|
||||
|
||||
Reference in New Issue
Block a user