livekit / agents

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

Feature request: data_received event listener #532

Closed willsmanley closed 3 months ago

willsmanley commented 3 months ago

The reason this would be really nice is if you want your client application to send other arbitrary data up that the LLM can use (non-audio, non-video).

davidzhao commented 3 months ago

I think you can already do this today, the room object is available to access within the context:

async def entrypoint(ctx: JobContext):
  @ctx.room.on("data_received")
  def on_data_received(...):
    pass
davidzhao commented 3 months ago

all RTC events should be directly accessible within this framework

willsmanley commented 3 months ago

oh nice! thanks for the tip