rtvi

Google RTVI processor and observer implementation.

This module provides integration with Google’s services through the RTVI framework, including models for search responses and an observer for handling Google-specific frame types.

class pipecat.services.google.rtvi.RTVISearchResponseMessageData(*, search_result: str | None, rendered_content: str | None, origins: list[LLMSearchOrigin])[source]

Bases: BaseModel

Data payload for search response messages in RTVI protocol.

Parameters:
  • search_result – The search result text, if available.

  • rendered_content – The rendered content from the search, if available.

  • origins – List of search result origins with metadata.

search_result: str | None
rendered_content: str | None
origins: list[LLMSearchOrigin]
class pipecat.services.google.rtvi.RTVIBotLLMSearchResponseMessage(*, label: Literal['rtvi-ai'] = 'rtvi-ai', type: Literal['bot-llm-search-response'] = 'bot-llm-search-response', data: RTVISearchResponseMessageData)[source]

Bases: BaseModel

RTVI message for bot LLM search responses.

Parameters:
  • label – Always “rtvi-ai” for RTVI protocol messages.

  • type – Always “bot-llm-search-response” for this message type.

  • data – The search response data payload.

label: Literal['rtvi-ai']
type: Literal['bot-llm-search-response']
data: RTVISearchResponseMessageData
class pipecat.services.google.rtvi.GoogleRTVIObserver(rtvi: RTVIProcessor)[source]

Bases: RTVIObserver

RTVI observer for Google service integration.

Extends the base RTVIObserver to handle Google-specific frame types, particularly LLM search response frames from Google services.

__init__(rtvi: RTVIProcessor)[source]

Initialize the Google RTVI observer.

Parameters:

rtvi – The RTVI processor to send messages through.

async on_push_frame(data: FramePushed)[source]

Process frames being pushed through the pipeline.

Handles Google-specific frames in addition to the base RTVI frame types.

Parameters:

data – Frame push event data containing frame and metadata.

class pipecat.services.google.rtvi.GoogleRTVIProcessor(*, transport: BaseTransport | None = None, **kwargs)[source]

Bases: RTVIProcessor

RTVI processor for Google service integration.

Creates a specific Google RTVI Observer.

create_rtvi_observer(*, params: RTVIObserverParams | None = None, **kwargs)[source]

Creates a new RTVI Observer.

Parameters:
  • params – Settings to enable/disable specific messages.

  • **kwargs – Additional arguments passed to the observer.

Returns:

A new RTVI observer.