@@ -13,6 +13,7 @@ import { SmsAuthEventRepository } from './repositories/smsAuthEventRepository.js
|
||||
import { UserRepository } from './repositories/userRepository.js';
|
||||
import { UserSessionRepository } from './repositories/userSessionRepository.js';
|
||||
import { CaptchaChallengeStore } from './services/captchaChallengeStore.js';
|
||||
import { CustomWorldAgentAutoAssetService } from './services/customWorldAgentAutoAssetService.js';
|
||||
import { CustomWorldAgentOrchestrator } from './services/customWorldAgentOrchestrator.js';
|
||||
import { CustomWorldAgentSessionStore } from './services/customWorldAgentSessionStore.js';
|
||||
import { CustomWorldSessionStore } from './services/customWorldSessionStore.js';
|
||||
@@ -83,6 +84,23 @@ export async function createAppContext(config: AppConfig = loadConfig()) {
|
||||
const customWorldAgentSessions = new CustomWorldAgentSessionStore(
|
||||
runtimeRepository,
|
||||
);
|
||||
const autoAssetService = new CustomWorldAgentAutoAssetService(
|
||||
config,
|
||||
config.dashScope.apiKey.trim()
|
||||
? CustomWorldAgentAutoAssetService.createDashScopeCharacterVisualGenerator(
|
||||
config,
|
||||
)
|
||||
: CustomWorldAgentAutoAssetService.createFallbackCharacterVisualGenerator(
|
||||
config,
|
||||
),
|
||||
config.dashScope.apiKey.trim()
|
||||
? CustomWorldAgentAutoAssetService.createDashScopeSceneActBackgroundGenerator(
|
||||
config,
|
||||
)
|
||||
: CustomWorldAgentAutoAssetService.createFallbackSceneActBackgroundGenerator(
|
||||
config,
|
||||
),
|
||||
);
|
||||
const context: AppContext = {
|
||||
config,
|
||||
logger,
|
||||
@@ -102,6 +120,9 @@ export async function createAppContext(config: AppConfig = loadConfig()) {
|
||||
config.llm.apiKey.trim()
|
||||
? new UpstreamLlmClient(config, logger)
|
||||
: null,
|
||||
{
|
||||
autoAssetService,
|
||||
},
|
||||
),
|
||||
smsVerificationService: createSmsVerificationService(config, logger),
|
||||
wechatAuthService: createWechatAuthService(config, logger),
|
||||
|
||||
Reference in New Issue
Block a user