WeLe Agentic AI with Docker deployment
This commit is contained in:
@@ -17,6 +17,7 @@ import { ensureDir, sweep } from './output/artifactStore.js';
|
||||
import crmApi from './tools/http/crmApi.js';
|
||||
import { describeChains } from './orchestration/llm.js';
|
||||
import { attachVoice } from './gateway/voice.js';
|
||||
import { warmup as warmSpeech, speechStatus } from './speech/index.js';
|
||||
|
||||
const app = express();
|
||||
|
||||
@@ -40,6 +41,7 @@ app.get('/health', async (_req, res) => {
|
||||
redis: redisOk ? redisMode() : 'unavailable',
|
||||
crm_api: crm.reachable ? 'reachable' : `unreachable (${crm.error || crm.status})`,
|
||||
models: describeChains(),
|
||||
speech: speechStatus(),
|
||||
uptime_s: Math.round(process.uptime()),
|
||||
});
|
||||
});
|
||||
@@ -83,6 +85,11 @@ async function start() {
|
||||
// second origin and the CRM token works unchanged.
|
||||
attachVoice(server);
|
||||
|
||||
// Speech models load lazily on the first voice turn (~10 s). Set
|
||||
// SPEECH_WARMUP=true to pay that at boot instead — worth it in production,
|
||||
// wasteful in development where most restarts never use voice.
|
||||
if (process.env.SPEECH_WARMUP === 'true') warmSpeech(['ta', 'en']);
|
||||
|
||||
const shutdown = (sig) => {
|
||||
logger.info(`${sig} — shutting down`);
|
||||
server.close(() => process.exit(0));
|
||||
|
||||
Reference in New Issue
Block a user