support ultravox send user_input_message (#1100)

This commit is contained in:
Hoan Luu Huu
2025-02-27 07:50:09 +07:00
committed by GitHub
parent af475cbea4
commit cd2563ce17

View File

@@ -214,6 +214,23 @@ class TaskLlmUltravox_S2S extends Task {
}
}
async processLlmUpdate(ep, data, _callSid) {
try {
this.logger.debug({data, _callSid}, 'TaskLlmUltravox_S2S:processLlmUpdate');
if (!data.type || ![
'input_text_message'
].includes(data.type)) {
this.logger.info({data}, 'TaskLlmUltravox_S2S:processLlmUpdate - invalid mid-call request');
}
else {
await this._api(ep, [ep.uuid, ClientEvent, JSON.stringify(data)]);
}
} catch (err) {
this.logger.info({err}, 'TaskLlmUltravox_S2S:processLlmUpdate');
}
}
async processToolOutput(ep, tool_call_id, data) {
try {
this.logger.debug({tool_call_id, data}, 'TaskLlmUltravox_S2S:processToolOutput');