Fixed tool calls
All checks were successful
Publish Library / Build NPM Project (push) Successful in 39s
Publish Library / Tag Version (push) Successful in 8s

This commit is contained in:
2025-12-27 17:27:53 -05:00
parent 98dd0bb323
commit 6dce0e8954
6 changed files with 29 additions and 15 deletions

View File

@@ -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);