Skip to content

Commit

Permalink
refactor: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
LF112 committed Sep 23, 2024
1 parent 91b03ff commit 9387693
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions src/modules/assets/assets.marketplace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class AssetsMarketplaceService {
private readonly assetsCommonRepository: AssetsCommonRepository,
) {}

public async initWorfklowMarketplace() {
public async initWorkflowMarketplace() {
// Init workflow marketplace
const data = BUILT_IN_WORKFLOW_MARKETPLACE_LIST;
const allTags = data.map((x) => x.tags || []).flat();
Expand All @@ -34,14 +34,13 @@ export class AssetsMarketplaceService {
}

public async initBuiltInLLMMarketplace() {
const data = ONEAPI_CHANNELS;
for (const item of data) {
for (const item of ONEAPI_CHANNELS) {
await this.llmChannelAssetRepository.initBuiltInMarketPlace('llm-channel', item);
}
}

public async initBuiltInMarketplace() {
await this.initWorfklowMarketplace();
await this.initWorkflowMarketplace();
if (config.oneapi.enabled) {
await this.initBuiltInLLMMarketplace();
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/bootstrap/bootstrap.service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Injectable } from '@nestjs/common';
import { SystemConfigurationRepository } from '../../database/repositories/system-configuration.repository';
import { SystemConfigurationRepository } from '@/database/repositories/system-configuration.repository';
import { AssetsMarketplaceService } from '../assets/assets.marketplace.service';
import { ToolsRegistryService } from '../tools/tools.registry.service';

Expand All @@ -13,7 +13,7 @@ export class BootstrapService {

public async bootstrap() {
// Register built in tools
this.toolsRegistryService.initBuiltInTools();
await this.toolsRegistryService.initBuiltInTools();
await this.systemConfigurationRepository.initAesKey();
await this.systemConfigurationRepository.initOneApiRootUserToken();
await this.marketplaceService.initBuiltInMarketplace();
Expand Down

0 comments on commit 9387693

Please sign in to comment.