Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 4b6523c

Browse files
authored
fix: cortex engines init api with empty body should init default options (#962)
1 parent 37cbc02 commit 4b6523c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cortex-js/src/usecases/engines/engines.usecase.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { CommonResponseDto } from '@/infrastructure/dtos/common/common-response.
2323
import { EngineStatus } from '@/domain/abstracts/engine.abstract';
2424
import { ConfigsUsecases } from '../configs/configs.usecase';
2525
import { defaultInstallationOptions } from '@/utils/init';
26-
26+
import { isEmpty } from "lodash"
2727
@Injectable()
2828
export class EnginesUsecases {
2929
constructor(
@@ -79,7 +79,7 @@ export class EnginesUsecases {
7979
): Promise<any> => {
8080
// Use default option if not defined
8181

82-
if (!options && engine === Engines.llamaCPP) {
82+
if ((!options || isEmpty(options)) && engine === Engines.llamaCPP) {
8383
options = await defaultInstallationOptions();
8484
}
8585
const installPackages = [];

0 commit comments

Comments
 (0)