Deprecate brainType in favor of llmId
Important Update: The
brainType
parameter has been deprecated and
replaced with llmId
to support custom language models. Your existing
brainType
values will continue to work as llmId
for backwards
compatibility.What This Means For You
If you currently usebrainType
in your persona configuration, you should update your code to use llmId
instead. This change enables support for custom language models while maintaining compatibility with existing brain types.
The benefits of this change are:
- Custom LLM Support: Create and use your own language models with Anam personas
- Server-Side Processing: Custom LLMs are processed from Anam’s servers for improved latency
- Secure Credential Storage: API keys for custom LLMs are encrypted at rest
- Backwards Compatibility: Your existing brain types work as LLM IDs
Migration Steps
Simply replacebrainType
with llmId
in your persona configuration:
Available LLM IDs
All existing brain types continue to work as LLM IDs:Previous brainType | New llmId | Description |
---|---|---|
0934d97d-0c3a-4f33-91b0-5e136a0ef466 | 0934d97d-0c3a-4f33-91b0-5e136a0ef466 | OpenAI GPT-4 Mini model |
ANAM_LLAMA_v3_3_70B_V1 | ANAM_LLAMA_v3_3_70B_V1 | Llama 3.3 70B model |
CUSTOMER_CLIENT_V1 | CUSTOMER_CLIENT_V1 | Client-side LLM processing |
Custom LLMs
With this change, you can now create custom LLMs and use them with your personas. Learn more about Custom LLMs.Deprecate GET /session-token
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.
What This Means For You
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:- Allows for persona config to be defined entirely at runtime
- Increased security, don’t reveal your Anam config such as persona ID or system prompt to the client
- Improved performance, this is part of a wider initiative to improve connection start times
Implementation Recommendations
- Upgrade to the latest version of the Anam SDK.
- If you currently make a GET request to /session-token, please update this to a POST and pass the personaConfig in this request. This must still be from you server side config, so you may need to pass details from your client side config to your server if you are creating your system prompt dynamically.
- Update your client side to use the session token only
createClient(sessionToken)
. Optionally you can still pass in client options such asdisableInputAudio
to the client:createClient(sessionToken, { disableInputAudio: true })
.