ui
UI bus carriers exchanged between PipelineWorker and UIWorker.
- class pipecat.bus.ui.BusUICommandMessage(command_name: str = '', payload: Any = None, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessageA UI command sent from a server-side worker to the client.
Published by
UIWorker.send_command(name, payload). The client-facing worker translates it into a command on its client’s wire format; over RTVI that is anRTVIUICommandFrame(command=command_name, payload=payload)pushed through the pipeline.- Parameters:
command_name – App-defined command name.
payload – App-defined payload (already a plain dict by the time it lands on the bus).
- class pipecat.bus.ui.BusUIDataMessage(*, source: str, target: str | None = None)[source]
Bases:
BusDataMessageBase for all UI Worker protocol bus carriers.
A client-facing worker dispatches on this type to translate a worker’s outbound UI carriers into its client’s wire format, so every UI bus message below subclasses it.
- class pipecat.bus.ui.BusUIEventMessage(event_name: str = '', payload: Any = None, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessageA UI event sent from the client to a server-side worker.
Emitted by the client-facing worker when the client dispatches an event via
PipecatClient.sendUIEvent(event, payload).UIWorkersubclasses dispatch these to@ui_event(name)handlers.- Parameters:
event_name – App-defined event name.
payload – App-defined payload. Schemaless by design.
- class pipecat.bus.ui.BusUIJobCompletedMessage(job_id: str = '', worker_name: str = '', status: str = '', response: Any = None, at: int = 0, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessageA worker in a user-facing job group has completed.
Forwarded by a
UIWorkerwhen a worker of one of its job groups reaches a terminal state. The client-facing worker forwards it as aui-job-groupenvelope withkind = "job_completed".- Parameters:
job_id – The shared job-group identifier.
worker_name – The worker that produced the response.
status – Completion status as a string (
JobStatusvalue).response – The worker’s response payload.
at – Epoch milliseconds when the response was received.
- class pipecat.bus.ui.BusUIJobGroupCompletedMessage(job_id: str = '', at: int = 0, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessageA user-facing job group has completed.
Published by a
UIWorkeronce every worker in the group has finished, or the group was cancelled. The client-facing worker forwards it as aui-job-groupenvelope withkind = "group_completed".- Parameters:
job_id – The shared job-group identifier.
at – Epoch milliseconds when the group completed.
- class pipecat.bus.ui.BusUIJobGroupStartedMessage(job_id: str = '', workers: list[str] | None = None, label: str | None = None, cancellable: bool = True, at: int = 0, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessageA user-facing job group has been dispatched.
Published by a
UIWorkeras it dispatches the group. The client-facing worker forwards it as aui-job-groupenvelope withkind = "group_started".- Parameters:
job_id – Shared job-group identifier for the group.
workers – Names of the workers the work was dispatched to.
label – Optional human-readable label for the group.
cancellable – Whether the client may request cancellation.
at – Epoch milliseconds when the group started.
- class pipecat.bus.ui.BusUIJobUpdateMessage(job_id: str = '', worker_name: str = '', data: Any = None, at: int = 0, *, source: str, target: str | None = None)[source]
Bases:
BusUIDataMessagePer-worker progress for a user-facing job group.
Forwarded by a
UIWorkerwhenever a worker of one of its job groups emits aBusJobUpdateMessage. The client-facing worker forwards it as aui-job-groupenvelope withkind = "job_update".- Parameters:
job_id – The shared job-group identifier.
worker_name – The worker that produced the update.
data – The worker’s update payload, forwarded verbatim.
at – Epoch milliseconds when the update was emitted on the bus.