diff --git a/packages/backend/src/managers/modelsManager.ts b/packages/backend/src/managers/modelsManager.ts index 855edef90..b080dde8d 100644 --- a/packages/backend/src/managers/modelsManager.ts +++ b/packages/backend/src/managers/modelsManager.ts @@ -58,6 +58,10 @@ export class ModelsManager { }); } + getModelsDirectory(): string { + return this.#modelsDir; + } + getLocalModelsFromDisk(): void { if (!fs.existsSync(this.#modelsDir)) { return; diff --git a/packages/backend/src/studio-api-impl.ts b/packages/backend/src/studio-api-impl.ts index d1521db75..f6742e6b8 100644 --- a/packages/backend/src/studio-api-impl.ts +++ b/packages/backend/src/studio-api-impl.ts @@ -118,4 +118,8 @@ export class StudioApiImpl implements StudioAPI { async deleteLocalModel(modelId: string): Promise { await this.modelsManager.deleteLocalModel(modelId); } + + async getModelsDirectory(): Promise { + return this.modelsManager.getModelsDirectory(); + } } diff --git a/packages/shared/src/StudioAPI.ts b/packages/shared/src/StudioAPI.ts index 7e406b63a..07c81f97b 100644 --- a/packages/shared/src/StudioAPI.ts +++ b/packages/shared/src/StudioAPI.ts @@ -25,4 +25,6 @@ export abstract class StudioAPI { abstract askPlayground(modelId: string, prompt: string): Promise; abstract getPlaygroundQueriesState(): Promise; abstract getPlaygroundsState(): Promise; + + abstract getModelsDirectory(): Promise; }