All notable changes to Pipecat Client Web will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Screen media sharing methods implemented:
- Added
startScreenShare
andstopScreenShare
methods toRTVIClient
andTransport
. - Added
isSharingScreen
getter toRTVIClient
andTransport
.
- Added
baseUrl
andendpoints
are now optional parameters in theRTVIClient
constructor (RTVIClientParams
), allowing developers to connect directly to a transport without requiring a handshake auth bundle.- Note: Most transport services require an API key for secure operation, and setting these keys dangerously on the client is not recommended for production. This change intends to simplify testing and local developement where running a server-side connect method can be cumbersome.
- Incorrect package.lock version resulted in types being omitted from the previous build. This has been fixed (0.3.0 has been unpublished).
- The RTVI client web libraries are now part of Pipecat. Repo and directory names have changed from RTVI to Pipecat.
- Package names have also been updated:
realtime-ai
is now@pipecat-ai/client-js
realtime-ai-react
is now@pipecat-ai/client-react
Please update your imports to the new package names.
- Added initial callback for
onSpeakerUpdated
event - Fixed event name typo -
TrackedStopped
should beTrackStopped
disconnectBot()
method added toRTVIClient
that disconnects the bot from the session, but keeps the session alive for the connected user.logger
singleton added and used within allRTVIClient
files. This aims to provide more granular control over console output - with verbose logging enabled, RTVI can be a little noisy.setLogLevel
method added toRTVIClient
to allow developers to set the log level.disconnectBot()
method added toRTVIMessage
to allow developers to tell the bot to leave a session.
realtime-ai-daily
has been moved to @daily-co/realtime-ai-daily to align to being a provider agnostic codebase. The last release for the Daily transport package is0.2.0
, which is still available withnpm install realtime-ai-daily
(https://www.npmjs.com/package/realtime-ai-daily). Please update your project imports to the new package install.
onBotText
callback renamed toonBotLlmText
for consistency.onBotText
has been marked as deprecated.onUserText
callback and events removed as unused.onBotLlmText
callback correctly accepts atext:BotLLMTextData
typed parameter.onBotTranscript
callback correctly accepts atext:BotLLMTextData
typed parameter (previouslyTranscriptData
)botLlmStarted
,botLlmStopped
,botTtsStarted
,botTtsStopped
,onBotStartedSpeaking
andonBotStoppedSpeaking
pass no parameters. Previously, these callbacks were given a participant object which was unused.TTSTextData
type renamed toBotTTSTextData
for consistency.
endpoints
is redefined as a partial, meaning you no longer receive a linting error when you only want to override a single endpoint.
RTVI 0.2.0 removes client-side configuration, ensuring that state management is handled exclusively by the bot or the developer’s application logic. Clients no longer maintain an internal config array that can be modified outside of a ready state. Developers who require stateful configuration before a session starts should implement it independently.
This change reinforces a key design principle of the RTVI standard: the bot should always be the single source of truth for configuration, and RTVI clients should remain stateless.
Additionally, this release expands action capabilities, enabling disconnected action dispatch, and renames key classes and types from VoiceClientX
to RTVIClientX
. Where possible, we have left deprecated aliases to maintain backward compatibility.
params
client constructor option, a partial object that will be sent as JSON stringified body params atconnect()
to your hosted endpoint. If you want to declare initial configuration in your client, or specify start services on the client, you can declare them here.- baseUrl: string;
- headers?: Headers;
- endpoints?: connect | action;
- requestData?: object;
- config?: RTVIClientConfigOption[];
- Any additional request params for all fetch requests, e.g.
[key: string]: unknown;
endpoints
(as part ofparams
) declares two default endpoints that are appended to yourbaseUrl
.connect/
(start a realtime bot session) and/action
(for disconnect actions).onConfig
andRTVIEvent.Config
callback & event added, triggered bygetConfig
voice message.@transportReady
decorator added to methods that should only be called at runtime. Note: decorator support required several Parcel configuration changes and additional dev dependencies.@getIfTransportInState
getter decorator added to getter methods that should only be called in a specified transport state.rtvi_client_version
is now sent as a body parameter to theconnect
fetch request, enabling bot <> client compatibility checks.action()
will now function when in a disconnected state. When not connected, this method expects a HTTP streamed response from theaction
endpoint declared in your params.- New callbacks and events:
onBotTtsText
Bot TTS text outputonBotTtsStarted
Bot TTS response startsonBotTtsStopped
Bot TTS response stopsonBotText
Streaming chunk/word, directly after LLMonBotLlmStarted
Bot LLM response startsonBotLlmStopped
Bot LLM response stopsonUserText
Aggregated user text which is sent to LLMonStorageItemStored
Item was stored to storage
start()
has been renamed toconnect()
.- Client no longer expects a
services
map as a constructor param (note: remains in place but flagged as deprecated.) If you want to pass a services map to your endpoint, please useparams
. customHeaders
has been renamed toheaders
.- Config getter and setter methods (
getConfig
andupdateConfig
) are only supported at runtime. updateConfig
promise is typed toPromise<VoiceMessage>
(previouslyunknown
to support offline updates.)getConfig
promise is typed toPromise<VoiceClientOptions[]>
(previouslyunknown
to support offline updates.)services
getter and setter methods have been deprecated.getServiceOptionsFromConfig
,getServiceOptionValueFromConfig
,setConfigOptions
andsetServiceOptionInConfig
are now async to supportgetConfig
at runtime and accept an optionalconfig
param for working with local config arrays.registerHelper
no longer checks for a registered service and instead relies on string matching.- LLM Helper
getContext()
now accepts optionalconfig
param for working with local configs. customAuthHandler
updated to receivestartParams
as second dependency.- jest tests updated to reflect changes.
VoiceClientOptions
is nowRTVIClientOptions
.VoiceClientConfigOption
is nowRTVIClientConfigOption
.VoiceEvent
is nowRTVIEvent
.
RTVIMessageType.CONFIG
message now correctly callsonConfig
andRTIEvents.Config
.
getBotConfig
has been renamed togetConfig
to match the bot action name / for consistency.- voiceClient.config getter is deprecated.
config
andservices
constructor params should now be set inside ofparams
and are optional.customBodyParams
andcustomHeaders
have been marked as deprecated. Useparams
instead.
RTVIClient.partialToConfig
removed (unused)nanoid
dependency removed.
- LLMContextMessage content not types to
unknown
to support broader LLM use-cases.
voiceClient.action()
now returns a new typeVoiceMessageActionResponse
that aligns to RTVI's action response shape. Dispatching an action is the same as dispatching aVoiceMessage
except the messageDispatcher will type the response accordingly.action-response
will resolve or reject as aVoiceMessageActionResponse
, whereas any other message type is typed as aVoiceMessage
. This change makes it less verbose to handle action responses, where thedata
blob will always contain aresult
property.- LLM Helper
getContext
returns a valid promise return type (Promise<LLMContext>
). - LLMHelper
getContext
resolves with the action result (not the data object). - LLMHelper
setContext
returns a valid promise return type (Promise<boolean>
). - LLMHelper
setContext
resolves with the action result boolean (not the data object). - LLMHelper
appendToMessages
returns a valid promise return type (Promise<boolean>
). - LLMHelper
appendToMessages
resolves with the action result boolean (not the data object).
customAuthHandler
is now provided with the timeout object, allowing developers to manually clear it (if set) in response to their custom auth logic.getServiceOptionsFromConfig
returnsunknown | undefined
when a service option is not found in the config definition.getServiceOptionsValueFromConfig
returnsunknown | undefined
when a service option or value is not found in the config definition.getServiceOptionValueFromConfig
returns a deep clone of the value, to avoid nested references.VoiceMessageType.CONFIG_AVAILABLE
resolves the dispatched action, allowingdescribeConfig()
to be awaited.VoiceMessageType.ACTIONS_AVAILABLE
resolves the dispatched action, allowingdescribeActions()
to be awaited.
- Action dispatch tests
getServiceOptionsFromConfig
andgetServiceOptionValueFromConfig
return a deep clone of property to avoid references in returned values.- LLM Helper
getContext
now returns a new instance of context when not in ready state.
updateConfig
now calls theonConfigUpdated
callback (and event) when not in ready state.
- All config mutation methods (getServiceOptionsFromConfig, getServiceOptionValueFromConfig, setServiceOptionInConfig) now work when not in a ready state.
- New config method:
getServiceOptionValueFromConfig
. Returns value of config service option with passed service key and option name. - setServiceOptionInConfig now accepts either one or many ConfigOption arguments (and will set or update all)
- setServiceOptionInConfig now accepts an optional 'config' param, which it will use over the default VoiceClient config. Useful if you want to mutate an existing config option across multiple services before calling
updateConfig
. - New config method
setConfigOptions
updates multiple service options by running each item throughsetServiceOptionInConfig
.
- "@daily-co/daily-js" should not be included in the
rtvi-client-js
package.json. This dependency is only necessary forrtvi-client-js-daily
. - Jest unit tests added for config manipulation within
rtvi-client-js
(yarn run test
)
getServiceOptionsFromConfig
should return a new object, not an instance of the config. This prevents methods likesetContext
from mutating local config unintentionally.
- Client now sends a
client-ready
message once it receives a track start event from the transport. This avoids scenarios where the bot starts speaking too soon, before the client has had a change to subscribe to the audio track.
- VoiceClientVideo component added to
rtvi-client-react
for rendering local or remote video tracks - partialToConfig voice client method that returns a new VoiceClientConfigOption[] from provided partial. Does not update config.
- Fixes an issue when re-creating a DailyVoiceClient. Doing so will no longer result in throwing an error. Note: Simultaneous DailyVoiceClient instances is not supported. Creating a new DailyVoiceClient will invalidate any pre-existing ones.
setServiceOptionsInConfig
Returns mutated / merged config for specified key and service config option- Voice client constructor
customBodyParams:object
. Add custom request parameters to send with the POST request to baseUrl - Set voice client services object (when client has not yet connected)
- Pass timeout to customAuthHandler
- API refactor to align to RTVI 0.1