sour-pinkS
VAPI7mo ago
sour-pink

serverMessages WebSDK

The new SDK has a bug:

    /**
     * These are the messages that will be sent to your Client SDKs. Default is conversation-update,function-call,hang,model-output,speech-update,status-update,transfer-update,transcript,tool-calls,user-interrupted,voice-input,workflow.node.started. You can check the shape of the messages in ClientMessage schema.
     * @example ["conversation-update","function-call","hang","model-output","speech-update","status-update","transfer-update","transcript","tool-calls","user-interrupted","voice-input","workflow.node.started"]
     */
    clientMessages?: 'conversation-update' | 'function-call' | 'function-call-result' | 'hang' | 'language-changed' | 'metadata' | 'model-output' | 'speech-update' | 'status-update' | 'transcript' | 'tool-calls' | 'tool-calls-result' | 'tool.completed' | 'transfer-update' | 'user-interrupted' | 'voice-input' | 'workflow.node.started';
    /**
     * These are the messages that will be sent to your Server URL. Default is conversation-update,end-of-call-report,function-call,hang,speech-update,status-update,tool-calls,transfer-destination-request,user-interrupted. You can check the shape of the messages in ServerMessage schema.
     * @example ["conversation-update","end-of-call-report","function-call","hang","speech-update","status-update","tool-calls","transfer-destination-request","user-interrupted"]
     */
    serverMessages?: 'conversation-update' | 'end-of-call-report' | 'function-call' | 'hang' | 'language-changed' | 'language-change-detected' | 'model-output' | 'phone-call-control' | 'speech-update' | 'status-update' | 'transcript' | "transcript[transcriptType='final']" | 'tool-calls' | 'transfer-destination-request' | 'transfer-update' | 'user-interrupted' | 'voice-input';
   


You can see that the example state you can pass an array, however the type is only a OR configuration.
Was this page helpful?