Check out our upcoming events and meetups! View events →
Endpoint to create a canary deploy configuration for an assistant.
Creates a new canary deploy configuration with multiple version IDs and their traffic percentages for A/B testing or gradual rollouts of assistant versions.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const canaryDeployResponse = await client.ai.assistants.canaryDeploys.create('assistant_id');
console.log(canaryDeployResponse.assistant_id);{
"assistant_id": "<string>",
"rules": [
{
"serve": {
"version_id": "<string>",
"rollout": [
{
"version_id": "<string>",
"weight": 50
}
]
},
"match": [
{
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Create/update request body. Accepts:
rules — canonical ordered list of routing rulesShow child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const canaryDeployResponse = await client.ai.assistants.canaryDeploys.create('assistant_id');
console.log(canaryDeployResponse.assistant_id);{
"assistant_id": "<string>",
"rules": [
{
"serve": {
"version_id": "<string>",
"rollout": [
{
"version_id": "<string>",
"weight": 50
}
]
},
"match": [
{
"attribute": "<string>",
"operator": "in",
"values": [
"<string>"
]
}
]
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}