Open svapnil opened 1 week ago
Hey folks,
For measuring usage of the OpenAI Realtime API it's important to measure tokens used. Unfortunately, the conversation.updated event doesn't contain token counts, for reference, you can receive it in the response.done event in the API: https://platform.openai.com/docs/api-reference/realtime-server-events/response-done
conversation.updated
response.done
Is there a recommendation around this? AFAIK conversation.updated is built from these events. Wondering if people have alternative ways of getting this information from this library.
You can use;
client.realtime.on('server.response.done', (event) => { // track usage });
Did you need something more deeply integrated?
Hey folks,
For measuring usage of the OpenAI Realtime API it's important to measure tokens used. Unfortunately, the
conversation.updated
event doesn't contain token counts, for reference, you can receive it in theresponse.done
event in the API: https://platform.openai.com/docs/api-reference/realtime-server-events/response-doneIs there a recommendation around this? AFAIK conversation.updated is built from these events. Wondering if people have alternative ways of getting this information from this library.