I need to add trace_id's to LLM responses for feedback annotation purposes in my web application. It is not currently possible to add any information to Custom LLM responses. See https://dev.hume.ai/docs/empathic-voice-interface-evi/guides/custom-language-model#clm-outgoing-message-data-format
I propose adding metadata to the assistant_message responses that would be passed through to the client.
type OutgoingCLMMessage = AssistantInputMessage | AssistantEndMessage;
interface AssistantInputMessage {
type: "assistant_input";
text: string;
metadata?: { [key: string]: any }; // 👈🏼 Add
}
interface AssistantEndMessage {
type: "assistant_end";
metadata?: { [key: string]: any }; // 👈🏼 Add
}