RTVIClient Migration Guide
A Guide to migrating from RTVIClient to PipecatClient
This guide will cover the high-level changes between the old RTVIClient
and the new PipecatClient
. For specific code updates, refer to the platform-specific migration guides.
Key changes
- Client Name: The class name has changed from
RTVIClient
toPipecatClient
. - Pipeline Connection: Previously, the client expected a REST endpoint for gathering connection information as part of the constructor and was difficult to update or bipass. The new client expects connection information to be provided directly as part of the
connect()
method and can either be provided as an object with details your Transport requires or as an object with REST endpoint details for acquiring them. - Actions and helpers: These have gone away in favor of some built-in methods for doing common actions like function call handling and appending to the llm context or in the case of custom actions, a simple set of methods for sending messages to the bot and handling responses. See
registerFunctionCallHandler()
,appendToContext()
,sendClientMessage()
, andsendClientRequest()
for more details. - Bot Configuration: This functionality as been removed as a security measure, so that a client cannot inherently have the ability to override a bot configuration and use credentials to its own whims. If you need the client to initialize or update the bot configuration, you will need to do so through an API call to your backend or building on top of the client-server messaging, which has now been made easier.
The Client SDKs are currently in the process of making these changes. At this time, only the JavaScript and React libraries have been updated and released. Their corresponding documentation along with this top-level documentation has been updated to reflect the latest changes. The React Native, iOS, and Android SDKs are still in the process of being updated and their documentation will be updated and a migration guide provided once the new versions are released. If you have any questions or need assistance, please reach out to us on Discord.