/** * 数字人直播系统 - API 配置中心(生产环境) * * 架构说明: * - 前端 CDN: https://console.duoweiying.cn/digital-human-live/ * - API 网关: https://api-gateway.duoweiying.cn/smart-processor/command * - ECS 后端: http://124.70.146.192:8000(通过网关代理) * * 调用模式: * 所有API通过 smart-processor 统一入口,scene='digital_human_live' + action 路由 */ const DIGITAL_HUMAN_API_CONFIG = { // 生产环境网关 gatewayURL: 'https://api-gateway.duoweiying.cn', // 智能处理器入口 smartProcessorURL: 'https://api-gateway.duoweiying.cn/smart-processor/command', // 场景名称(对应ECS configs/digital_human_live.json) scene: 'digital_human_live', // 超时配置 timeout: { default: 15000, // 默认15秒 processComment: 60000, // 评论处理60秒(9智能体协同耗时较长) startLive: 30000, // 开始直播30秒 generateVideo: 60000 // 视频生成60秒 }, // 重试配置 retry: { count: 2, delay: 1000 }, // 动作映射(热水器模式:通过 action 名称路由到后端API) actions: { healthCheck: 'health_check', getScenes: 'get_scenes', getTalkTemplates: 'get_talk_templates', startLive: 'start_live', stopLive: 'stop_live', switchStream: 'switch_stream', complianceCheck: 'compliance_check', detectSensitive: 'detect_sensitive', syncData: 'sync_data', processComment: 'process_comment', avatarInitialize: 'avatar_initialize', avatarSetEmotion: 'avatar_set_emotion', avatarExecuteAction: 'avatar_execute_action', avatarStatus: 'avatar_status', generateVideo: 'generate_video_content', getSandboxConfigs: 'get_sandbox_configs', getSandboxConfig: 'get_sandbox_config', getPlatformInsights: 'get_platform_insights', createLiveStream: 'create_live_stream', selectMaterials: 'select_materials', processQuery: 'process_query' }, // 认证 auth: { tokenKey: 'digital_human_auth_token', tokenExpiryKey: 'digital_human_token_expiry' } }; if (typeof window !== 'undefined') { window.DIGITAL_HUMAN_API_CONFIG = DIGITAL_HUMAN_API_CONFIG; } if (typeof module !== 'undefined' && module.exports) { module.exports = DIGITAL_HUMAN_API_CONFIG; } console.log('[数字人直播] 生产环境API配置已加载,网关:', DIGITAL_HUMAN_API_CONFIG.gatewayURL);