Class: Telnyx::Resources::AI::Assistants::CanaryDeploys
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Assistants::CanaryDeploys
- Defined in:
- lib/telnyx/resources/ai/assistants/canary_deploys.rb
Overview
Configure AI assistant specifications
Instance Method Summary collapse
-
#create(assistant_id, versions:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
Endpoint to create a canary deploy configuration for an assistant.
-
#delete(assistant_id, request_options: {}) ⇒ nil
Endpoint to delete a canary deploy configuration for an assistant.
-
#initialize(client:) ⇒ CanaryDeploys
constructor
private
A new instance of CanaryDeploys.
-
#retrieve(assistant_id, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
Endpoint to get a canary deploy configuration for an assistant.
-
#update(assistant_id, versions:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
Endpoint to update a canary deploy configuration for an assistant.
Constructor Details
#initialize(client:) ⇒ CanaryDeploys
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of CanaryDeploys.
110 111 112 |
# File 'lib/telnyx/resources/ai/assistants/canary_deploys.rb', line 110 def initialize(client:) @client = client end |
Instance Method Details
#create(assistant_id, versions:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
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.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/telnyx/resources/ai/assistants/canary_deploys.rb', line 25 def create(assistant_id, params) parsed, = Telnyx::AI::Assistants::CanaryDeployCreateParams.dump_request(params) @client.request( method: :post, path: ["ai/assistants/%1$s/canary-deploys", assistant_id], body: parsed, model: Telnyx::AI::Assistants::CanaryDeployResponse, options: ) end |
#delete(assistant_id, request_options: {}) ⇒ nil
Endpoint to delete a canary deploy configuration for an assistant.
Removes all canary deploy configurations for the specified assistant.
98 99 100 101 102 103 104 105 |
# File 'lib/telnyx/resources/ai/assistants/canary_deploys.rb', line 98 def delete(assistant_id, params = {}) @client.request( method: :delete, path: ["ai/assistants/%1$s/canary-deploys", assistant_id], model: NilClass, options: params[:request_options] ) end |
#retrieve(assistant_id, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
Endpoint to get a canary deploy configuration for an assistant.
Retrieves the current canary deploy configuration with all version IDs and their traffic percentages for the specified assistant.
49 50 51 52 53 54 55 56 |
# File 'lib/telnyx/resources/ai/assistants/canary_deploys.rb', line 49 def retrieve(assistant_id, params = {}) @client.request( method: :get, path: ["ai/assistants/%1$s/canary-deploys", assistant_id], model: Telnyx::AI::Assistants::CanaryDeployResponse, options: params[:request_options] ) end |
#update(assistant_id, versions:, request_options: {}) ⇒ Telnyx::Models::AI::Assistants::CanaryDeployResponse
Endpoint to update a canary deploy configuration for an assistant.
Updates the existing canary deploy configuration with new version IDs and percentages. All old versions and percentages are replaces by new ones from this request.
75 76 77 78 79 80 81 82 83 84 |
# File 'lib/telnyx/resources/ai/assistants/canary_deploys.rb', line 75 def update(assistant_id, params) parsed, = Telnyx::AI::Assistants::CanaryDeployUpdateParams.dump_request(params) @client.request( method: :put, path: ["ai/assistants/%1$s/canary-deploys", assistant_id], body: parsed, model: Telnyx::AI::Assistants::CanaryDeployResponse, options: ) end |