Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cortex engines init api with empty body should init default options #962

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cortex-js/src/usecases/engines/engines.usecase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { CommonResponseDto } from '@/infrastructure/dtos/common/common-response.
import { EngineStatus } from '@/domain/abstracts/engine.abstract';
import { ConfigsUsecases } from '../configs/configs.usecase';
import { defaultInstallationOptions } from '@/utils/init';

import { isEmpty } from "lodash"
@Injectable()
export class EnginesUsecases {
constructor(
Expand Down Expand Up @@ -79,7 +79,7 @@ export class EnginesUsecases {
): Promise<any> => {
// Use default option if not defined

if (!options && engine === Engines.llamaCPP) {
if ((!options || isEmpty(options)) && engine === Engines.llamaCPP) {
options = await defaultInstallationOptions();
}
const installPackages = [];
Expand Down
Loading