Overview
TheGoogleRTVIObserver 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 useGoogleRTVIObserver, install the required dependencies:
GoogleLLMService is properly configured.
Frame Translation
The observer maps theLLMSearchResponseFrame 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. TheOrigin Objectfollows this structure:
-
search_result:
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 useGoogleRTVIObserver, pass a GoogleRTVIProcessor to your PipelineWorker. This automatically creates and attaches the Google-specific observer: