Feat/llm update (#936)

* add support for llm:update during LLM session

* make sure to end openai session when Llm task is killed

* wip

* wip

* wip

* wip

* wip

* wip

* wip
This commit is contained in:
Dave Horton
2024-10-16 09:27:51 -04:00
committed by GitHub
parent da5f51e8e0
commit c79a6aaf8a
3 changed files with 82 additions and 10 deletions

View File

@@ -79,7 +79,18 @@ class TaskLlm extends Task {
this.llm.processToolOutput(this.ep, tool_call_id, data);
}
async processLlmUpdate(data, callSid) {
if (this.ep.connected) {
if (typeof this.llm.processLlmUpdate === 'function') {
this.llm.processLlmUpdate(this.ep, data, callSid);
}
else {
const {vendor, model} = this.llm;
this.logger.info({data, callSid},
`TaskLlm:_processLlmUpdate: LLM ${vendor}:${model} does not support llm:update`);
}
}
}
}
module.exports = TaskLlm;