capabilities

What a bot does in a session, reported so clients can configure themselves.

PipelineWorker derives a BotCapabilities from its pipeline’s transports and parameters, and RTVI sends it to the client in the bot-ready message.

class pipecat.pipeline.capabilities.BotCapabilities(*, audio_in: bool | None = None, audio_out: bool | None = None, video_in: bool | None = None, screen_in: bool | None = None, video_out: bool | None = None, metrics: bool | None = None)[source]

Bases: BaseModel

What a bot does in a session.

Every field is optional: None means unknown, and a client should keep its default behavior for it. False means the bot does not do it, so a client can hide the matching UI.

Parameters:
  • audio_in – Whether the bot receives the user’s audio.

  • audio_out – Whether the bot sends audio to the user.

  • video_in – Whether the bot receives the user’s video.

  • screen_in – Whether the bot receives the user’s screen share. Known when the transport captures its video sources from video_in_sources; unknown when the application captures them itself.

  • video_out – Whether the bot sends video to the user.

  • metrics – Whether the bot reports metrics.

combine(other: BotCapabilities) → BotCapabilities[source]

Combine the capabilities of two parts of the same bot.

A field is True if either side is True, False if either side is False and neither is True, and None if both are unknown.

Parameters:

other – The capabilities to combine with these.

Returns:

The combined capabilities.

override(other: BotCapabilities) → BotCapabilities[source]

Apply the fields other knows on top of these capabilities.

Parameters:

other – The capabilities whose known (non-None) fields win.

Returns:

These capabilities with other’s known fields applied.