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 to PipecatClient.
  • Pipeline Connection: Previously, the client expected a REST endpoint for gathering connection information as part of the constructor and was difficult to update or bypass. The new client expects connection information to be provided directly as part of the connect() method. For convenience in typical setups where the connection information is obtained from an API endpoint that also launches the server-side bot, we’ve introduced startBot() for hitting the endpoint and returning the response as well as startBotAndConnect() which does both the fetching and connecting and assumes the response contains the necessary connection details.
  • 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(), and sendClientRequest() 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.

Migration guides