livekit / agents

Build real-time multimodal AI applications 🤖🎙️📹
https://docs.livekit.io/agents
Apache License 2.0
4.04k stars 421 forks source link

Expose usage metrics for Realtime model #1036

Closed yuyuma closed 2 weeks ago

yuyuma commented 2 weeks ago

Handles #1010 to include usage (number of input/output tokens) in the response_done event for realtime model

Conforms to the usage object model as shown at https://platform.openai.com/docs/api-reference/realtime-server-events/response/done at time of submission

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: cf348fd7880a8068655224c3174036caf3de37ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------------- | ----- | | livekit-plugins-openai | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

CLAassistant commented 2 weeks ago

CLA assistant check
All committers have signed the CLA.

theomonnom commented 2 weeks ago

Hey, ruff checks seems to fail.

Can you run ruff format && ruff check --fix?

yuyuma commented 2 weeks ago

ruff checks passing now