Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions packages/react/src/lib/useVoiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ type SessionSettingsOnConnect = Omit<
>;
type SessionSettingsPostConnect = Pick<
Hume.empathicVoice.SessionSettings,
'builtinTools' | 'tools' | 'metadata' | 'type'
'builtinTools' | 'tools' | 'metadata' | 'type' | 'systemPrompt'
>;
/**
* Some session settings can be sent as query params when the websocket connects.
* This is preferred because it eliminates a race condition of the session settings being applied slightly after the conversation starts.
*
* `tools` and `builtinTools` are not yet supported in the query string. We can remove
* `tools`, `builtinTools`, and `systemPrompt` are not yet supported in the query string. We can remove
* this and send everything in the query string once this changes. For the time being
* we send as many settings as possible in the query string, and then a complete session
* settings message shortly after.
Expand All @@ -52,8 +52,9 @@ const getSessionSettingsOnConnect = (
return {};
}

const { builtinTools, tools, metadata, type, ...onConnect } = sessionSettings;
if (builtinTools || tools || metadata) {
const { builtinTools, tools, metadata, type, systemPrompt, ...onConnect } =
sessionSettings;
if (builtinTools || tools || metadata || systemPrompt) {
return {
onConnect,
postConnect: sessionSettings,
Expand Down