Events
- class pipecat.services.openai_realtime_beta.events.InputAudioTranscription(model='gpt-4o-transcribe', language=None, prompt=None)[source]
Bases:
BaseModel
Configuration for audio transcription settings.
- Parameters:
model (str)
language (str | None)
prompt (str | None)
- model
Transcription model to use (e.g., “gpt-4o-transcribe”, “whisper-1”).
- Type:
str
- language
Optional language code for transcription.
- Type:
str | None
- prompt
Optional transcription hint text.
- Type:
str | None
- model: str
- language: str | None
- prompt: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.TurnDetection(*, type='server_vad', threshold=0.5, prefix_padding_ms=300, silence_duration_ms=800)[source]
Bases:
BaseModel
- Parameters:
type (Literal['server_vad'] | None)
threshold (float | None)
prefix_padding_ms (int | None)
silence_duration_ms (int | None)
- type: Literal['server_vad'] | None
- threshold: float | None
- prefix_padding_ms: int | None
- silence_duration_ms: int | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.SemanticTurnDetection(*, type='semantic_vad', eagerness=None, create_response=None, interrupt_response=None)[source]
Bases:
BaseModel
- Parameters:
type (Literal['semantic_vad'] | None)
eagerness (Literal['low', 'medium', 'high', 'auto'] | None)
create_response (bool | None)
interrupt_response (bool | None)
- type: Literal['semantic_vad'] | None
- eagerness: Literal['low', 'medium', 'high', 'auto'] | None
- create_response: bool | None
- interrupt_response: bool | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioNoiseReduction(*, type)[source]
Bases:
BaseModel
- Parameters:
type (Literal['near_field', 'far_field'] | None)
- type: Literal['near_field', 'far_field'] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.SessionProperties(*, modalities=None, instructions=None, voice=None, input_audio_format=None, output_audio_format=None, input_audio_transcription=None, input_audio_noise_reduction=None, turn_detection=None, tools=None, tool_choice=None, temperature=None, max_response_output_tokens=None)[source]
Bases:
BaseModel
- Parameters:
modalities (List[Literal['text', 'audio']] | None)
instructions (str | None)
voice (str | None)
input_audio_format (Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None)
output_audio_format (Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None)
input_audio_transcription (InputAudioTranscription | None)
input_audio_noise_reduction (InputAudioNoiseReduction | None)
turn_detection (TurnDetection | SemanticTurnDetection | bool | None)
tools (List[Dict] | None)
tool_choice (Literal['auto', 'none', 'required'] | None)
temperature (float | None)
max_response_output_tokens (int | Literal['inf'] | None)
- modalities: List[Literal['text', 'audio']] | None
- instructions: str | None
- voice: str | None
- input_audio_format: Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None
- output_audio_format: Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None
- input_audio_transcription: InputAudioTranscription | None
- input_audio_noise_reduction: InputAudioNoiseReduction | None
- turn_detection: TurnDetection | SemanticTurnDetection | bool | None
- tools: List[Dict] | None
- tool_choice: Literal['auto', 'none', 'required'] | None
- temperature: float | None
- max_response_output_tokens: int | Literal['inf'] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ItemContent(*, type, text=None, audio=None, transcript=None)[source]
Bases:
BaseModel
- Parameters:
type (Literal['text', 'audio', 'input_text', 'input_audio'])
text (str | None)
audio (str | None)
transcript (str | None)
- type: Literal['text', 'audio', 'input_text', 'input_audio']
- text: str | None
- audio: str | None
- transcript: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItem(*, id=<factory>, object=None, type, status=None, role=None, content=None, call_id=None, name=None, arguments=None, output=None)[source]
Bases:
BaseModel
- Parameters:
id (str)
object (Literal['realtime.item'] | None)
type (Literal['message', 'function_call', 'function_call_output'])
status (Literal['completed', 'in_progress', 'incomplete'] | None)
role (Literal['user', 'assistant', 'system'] | None)
content (List[ItemContent] | None)
call_id (str | None)
name (str | None)
arguments (str | None)
output (str | None)
- id: str
- object: Literal['realtime.item'] | None
- type: Literal['message', 'function_call', 'function_call_output']
- status: Literal['completed', 'in_progress', 'incomplete'] | None
- role: Literal['user', 'assistant', 'system'] | None
- content: List[ItemContent] | None
- call_id: str | None
- name: str | None
- arguments: str | None
- output: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.RealtimeConversation(*, id, object)[source]
Bases:
BaseModel
- Parameters:
id (str)
object (Literal['realtime.conversation'])
- id: str
- object: Literal['realtime.conversation']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseProperties(*, modalities=['audio', 'text'], instructions=None, voice=None, output_audio_format=None, tools=<factory>, tool_choice=None, temperature=None, max_response_output_tokens=None)[source]
Bases:
BaseModel
- Parameters:
modalities (List[Literal['text', 'audio']] | None)
instructions (str | None)
voice (str | None)
output_audio_format (Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None)
tools (List[Dict] | None)
tool_choice (Literal['auto', 'none', 'required'] | None)
temperature (float | None)
max_response_output_tokens (int | Literal['inf'] | None)
- modalities: List[Literal['text', 'audio']] | None
- instructions: str | None
- voice: str | None
- output_audio_format: Literal['pcm16', 'g711_ulaw', 'g711_alaw'] | None
- tools: List[Dict] | None
- tool_choice: Literal['auto', 'none', 'required'] | None
- temperature: float | None
- max_response_output_tokens: int | Literal['inf'] | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.RealtimeError(*, type, code='', message, param=None, event_id=None)[source]
Bases:
BaseModel
- Parameters:
type (str)
code (str | None)
message (str)
param (str | None)
event_id (str | None)
- type: str
- code: str | None
- message: str
- param: str | None
- event_id: str | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ClientEvent(*, event_id=<factory>)[source]
Bases:
BaseModel
- Parameters:
event_id (str)
- event_id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.SessionUpdateEvent(*, event_id=<factory>, type='session.update', session)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['session.update'])
session (SessionProperties)
- type: Literal['session.update']
- session: SessionProperties
- model_dump(*args, **kwargs)[source]
Usage docs: https://docs.pydantic.dev/2.10/concepts/serialization/#modelmodel_dump
Generate a dictionary representation of the model, optionally specifying which fields to include or exclude.
- Parameters:
mode – The mode in which to_python should run. If mode is ‘json’, the output will only contain JSON serializable types. If mode is ‘python’, the output may contain non-JSON-serializable Python objects.
include – A set of fields to include in the output.
exclude – A set of fields to exclude from the output.
context – Additional context to pass to the serializer.
by_alias – Whether to use the field’s alias in the dictionary key if defined.
exclude_unset – Whether to exclude fields that have not been explicitly set.
exclude_defaults – Whether to exclude fields that are set to their default value.
exclude_none – Whether to exclude fields that have a value of None.
round_trip – If True, dumped values should be valid as input for non-idempotent types such as Json[T].
warnings – How to handle serialization errors. False/”none” ignores them, True/”warn” logs errors, “error” raises a [PydanticSerializationError][pydantic_core.PydanticSerializationError].
serialize_as_any – Whether to serialize fields with duck-typing serialization behavior.
- Returns:
A dictionary representation of the model.
- Return type:
Dict[str, Any]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferAppendEvent(*, event_id=<factory>, type='input_audio_buffer.append', audio)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.append'])
audio (str)
- type: Literal['input_audio_buffer.append']
- audio: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferCommitEvent(*, event_id=<factory>, type='input_audio_buffer.commit')[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.commit'])
- type: Literal['input_audio_buffer.commit']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferClearEvent(*, event_id=<factory>, type='input_audio_buffer.clear')[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.clear'])
- type: Literal['input_audio_buffer.clear']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemCreateEvent(*, event_id=<factory>, type='conversation.item.create', previous_item_id=None, item)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.create'])
previous_item_id (str | None)
item (ConversationItem)
- type: Literal['conversation.item.create']
- previous_item_id: str | None
- item: ConversationItem
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemTruncateEvent(*, event_id=<factory>, type='conversation.item.truncate', item_id, content_index, audio_end_ms)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.truncate'])
item_id (str)
content_index (int)
audio_end_ms (int)
- type: Literal['conversation.item.truncate']
- item_id: str
- content_index: int
- audio_end_ms: int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemDeleteEvent(*, event_id=<factory>, type='conversation.item.delete', item_id)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.delete'])
item_id (str)
- type: Literal['conversation.item.delete']
- item_id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemRetrieveEvent(*, event_id=<factory>, type='conversation.item.retrieve', item_id)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.retrieve'])
item_id (str)
- type: Literal['conversation.item.retrieve']
- item_id: str
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseCreateEvent(*, event_id=<factory>, type='response.create', response=None)[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['response.create'])
response (ResponseProperties | None)
- type: Literal['response.create']
- response: ResponseProperties | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseCancelEvent(*, event_id=<factory>, type='response.cancel')[source]
Bases:
ClientEvent
- Parameters:
event_id (str)
type (Literal['response.cancel'])
- type: Literal['response.cancel']
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ServerEvent(*, event_id, type)[source]
Bases:
BaseModel
- Parameters:
event_id (str)
type (str)
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- event_id: str
- type: str
- class pipecat.services.openai_realtime_beta.events.SessionCreatedEvent(*, event_id, type, session)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['session.created'])
session (SessionProperties)
- type: Literal['session.created']
- session: SessionProperties
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.SessionUpdatedEvent(*, event_id, type, session)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['session.updated'])
session (SessionProperties)
- type: Literal['session.updated']
- session: SessionProperties
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationCreated(*, event_id, type, conversation)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.created'])
conversation (RealtimeConversation)
- type: Literal['conversation.created']
- conversation: RealtimeConversation
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemCreated(*, event_id, type, previous_item_id=None, item)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.created'])
previous_item_id (str | None)
item (ConversationItem)
- type: Literal['conversation.item.created']
- previous_item_id: str | None
- item: ConversationItem
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemInputAudioTranscriptionDelta(*, event_id, type, item_id, content_index, delta)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.input_audio_transcription.delta'])
item_id (str)
content_index (int)
delta (str)
- type: Literal['conversation.item.input_audio_transcription.delta']
- item_id: str
- content_index: int
- delta: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemInputAudioTranscriptionCompleted(*, event_id, type, item_id, content_index, transcript)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.input_audio_transcription.completed'])
item_id (str)
content_index (int)
transcript (str)
- type: Literal['conversation.item.input_audio_transcription.completed']
- item_id: str
- content_index: int
- transcript: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemInputAudioTranscriptionFailed(*, event_id, type, item_id, content_index, error)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.input_audio_transcription.failed'])
item_id (str)
content_index (int)
error (RealtimeError)
- type: Literal['conversation.item.input_audio_transcription.failed']
- item_id: str
- content_index: int
- error: RealtimeError
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemTruncated(*, event_id, type, item_id, content_index, audio_end_ms)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.truncated'])
item_id (str)
content_index (int)
audio_end_ms (int)
- type: Literal['conversation.item.truncated']
- item_id: str
- content_index: int
- audio_end_ms: int
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemDeleted(*, event_id, type, item_id)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.deleted'])
item_id (str)
- type: Literal['conversation.item.deleted']
- item_id: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ConversationItemRetrieved(*, event_id, type, item)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['conversation.item.retrieved'])
item (ConversationItem)
- type: Literal['conversation.item.retrieved']
- item: ConversationItem
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseCreated(*, event_id, type)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (str)
- type: Literal['response.created']
- response: Response
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseDone(*, event_id, type)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (str)
- type: Literal['response.done']
- response: Response
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseOutputItemAdded(*, event_id, type, response_id, output_index, item)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.output_item.added'])
response_id (str)
output_index (int)
item (ConversationItem)
- type: Literal['response.output_item.added']
- response_id: str
- output_index: int
- item: ConversationItem
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseOutputItemDone(*, event_id, type, response_id, output_index, item)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.output_item.done'])
response_id (str)
output_index (int)
item (ConversationItem)
- type: Literal['response.output_item.done']
- response_id: str
- output_index: int
- item: ConversationItem
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseContentPartAdded(*, event_id, type, response_id, item_id, output_index, content_index, part)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.content_part.added'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
part (ItemContent)
- type: Literal['response.content_part.added']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- part: ItemContent
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseContentPartDone(*, event_id, type, response_id, item_id, output_index, content_index, part)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.content_part.done'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
part (ItemContent)
- type: Literal['response.content_part.done']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- part: ItemContent
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseTextDelta(*, event_id, type, response_id, item_id, output_index, content_index, delta)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.text.delta'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
delta (str)
- type: Literal['response.text.delta']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- delta: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseTextDone(*, event_id, type, response_id, item_id, output_index, content_index, text)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.text.done'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
text (str)
- type: Literal['response.text.done']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- text: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseAudioTranscriptDelta(*, event_id, type, response_id, item_id, output_index, content_index, delta)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.audio_transcript.delta'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
delta (str)
- type: Literal['response.audio_transcript.delta']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- delta: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseAudioTranscriptDone(*, event_id, type, response_id, item_id, output_index, content_index, transcript)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.audio_transcript.done'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
transcript (str)
- type: Literal['response.audio_transcript.done']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- transcript: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseAudioDelta(*, event_id, type, response_id, item_id, output_index, content_index, delta)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.audio.delta'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
delta (str)
- type: Literal['response.audio.delta']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- delta: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseAudioDone(*, event_id, type, response_id, item_id, output_index, content_index)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.audio.done'])
response_id (str)
item_id (str)
output_index (int)
content_index (int)
- type: Literal['response.audio.done']
- response_id: str
- item_id: str
- output_index: int
- content_index: int
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseFunctionCallArgumentsDelta(*, event_id, type, response_id, item_id, output_index, call_id, delta)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.function_call_arguments.delta'])
response_id (str)
item_id (str)
output_index (int)
call_id (str)
delta (str)
- type: Literal['response.function_call_arguments.delta']
- response_id: str
- item_id: str
- output_index: int
- call_id: str
- delta: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ResponseFunctionCallArgumentsDone(*, event_id, type, response_id, item_id, output_index, call_id, arguments)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['response.function_call_arguments.done'])
response_id (str)
item_id (str)
output_index (int)
call_id (str)
arguments (str)
- type: Literal['response.function_call_arguments.done']
- response_id: str
- item_id: str
- output_index: int
- call_id: str
- arguments: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferSpeechStarted(*, event_id, type, audio_start_ms, item_id)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.speech_started'])
audio_start_ms (int)
item_id (str)
- type: Literal['input_audio_buffer.speech_started']
- audio_start_ms: int
- item_id: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferSpeechStopped(*, event_id, type, audio_end_ms, item_id)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.speech_stopped'])
audio_end_ms (int)
item_id (str)
- type: Literal['input_audio_buffer.speech_stopped']
- audio_end_ms: int
- item_id: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferCommitted(*, event_id, type, previous_item_id=None, item_id)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.committed'])
previous_item_id (str | None)
item_id (str)
- type: Literal['input_audio_buffer.committed']
- previous_item_id: str | None
- item_id: str
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.InputAudioBufferCleared(*, event_id, type)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['input_audio_buffer.cleared'])
- type: Literal['input_audio_buffer.cleared']
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.ErrorEvent(*, event_id, type, error)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['error'])
error (RealtimeError)
- type: Literal['error']
- error: RealtimeError
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.RateLimitsUpdated(*, event_id, type, rate_limits)[source]
Bases:
ServerEvent
- Parameters:
event_id (str)
type (Literal['rate_limits.updated'])
rate_limits (List[Dict[str, Any]])
- type: Literal['rate_limits.updated']
- rate_limits: List[Dict[str, Any]]
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.TokenDetails(*, cached_tokens=0, text_tokens=0, audio_tokens=0, **extra_data)[source]
Bases:
BaseModel
- Parameters:
cached_tokens (int | None)
text_tokens (int | None)
audio_tokens (int | None)
extra_data (Any)
- cached_tokens: int | None
- text_tokens: int | None
- audio_tokens: int | None
- class Config[source]
Bases:
object
- extra = 'allow'
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.Usage(*, total_tokens, input_tokens, output_tokens, input_token_details, output_token_details)[source]
Bases:
BaseModel
- Parameters:
total_tokens (int)
input_tokens (int)
output_tokens (int)
input_token_details (TokenDetails)
output_token_details (TokenDetails)
- total_tokens: int
- input_tokens: int
- output_tokens: int
- input_token_details: TokenDetails
- output_token_details: TokenDetails
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class pipecat.services.openai_realtime_beta.events.Response(*, id, object, status, status_details, output, usage=None)[source]
Bases:
BaseModel
- Parameters:
id (str)
object (Literal['realtime.response'])
status (Literal['completed', 'in_progress', 'incomplete', 'cancelled', 'failed'])
status_details (Any)
output (List[ConversationItem])
usage (Usage | None)
- id: str
- object: Literal['realtime.response']
- status: Literal['completed', 'in_progress', 'incomplete', 'cancelled', 'failed']
- status_details: Any
- output: List[ConversationItem]
- usage: Usage | None
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- pipecat.services.openai_realtime_beta.events.parse_server_event(str)[source]