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 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 introducedstartBot()
for hitting the endpoint and returning the response as well asstartBotAndConnect()
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()
, 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.
Migration guides
JavaScript
Migrate your JavaScript client code to the new
PipecatClient
React
Update your React components to use the new
PipecatClient
iOS
Update your iOS components to use the new
PipecatClient
Android
Migrate your Android client code to the new
PipecatClient
React Native
Update your React Native components to use the new
PipecatClient