Skip to main content

Overview

The GoogleRTVIObserver extends the base RTVIObserver type, to add support for the bot-llm-search-response message type and providing clients with the search results from the GoogleLLMService.

API Reference

Complete API documentation and method details

Gemini Docs

Official Google Gemini API documentation and features

Installation

To use GoogleRTVIObserver, install the required dependencies:
You’ll also need to follow setup instructions for the Google LLM Service to ensure the GoogleLLMService is properly configured.

Frame Translation

The observer maps the LLMSearchResponseFrame to the RTVIBotLLMSearchResponseMessage, sent to the client as a bot-llm-search-response message.

Search Response Message

bot-llm-search-response carries the search results from the LLM’s knowledge base. Only Google’s observer sends it, so it isn’t part of the RTVI specification.
  • type: 'bot-llm-search-response'
  • data:
    • search_result: string (optional) Raw search result text.
    • rendered_content: string (optional) Formatted version of the search results.
    • origins: Array<Origin Object> Source information and confidence scores for search results. The Origin Object follows this structure:
Example:
The RTVIObserverParams you pass to GoogleRTVIProcessor.create_rtvi_observer() are given to the GoogleRTVIObserver it creates, so you can choose which messages the observer sends. GoogleRTVIObserver also accepts params directly.

Usage Example

To use GoogleRTVIObserver, pass a GoogleRTVIProcessor to your PipelineWorker. This automatically creates and attaches the Google-specific observer: