Guide on how to adopt new Anam features
Important Update: Declaring persona configuration on the client side is deprecated and has been removed in the latest version of the Anam SDK. You should follow the instructions below to migrate to the new POST /session-token endpoint and pass the persona config in the request body.
If you currently use the GET /session-token endpoint, or use the POST /session-token endpoint with a personaConfig on the client side, you will need to update your code to pass your persona config in the request body. This means you will need to move your persona configuration from your client side to your server side.
The benefits of this change are:
createClient(sessionToken)
. Optionally you can still pass in client options such as disableInputAudio
to the client: createClient(sessionToken, { disableInputAudio: true })
.For more information on creating sessions, see here.
The old way:
The new way:
For more in depth examples of how to define your persona config at runtime see our full implementation example.