Class: Telnyx::Resources::AI::Assistants::Versions
- Inherits:
-
Object
- Object
- Telnyx::Resources::AI::Assistants::Versions
- Defined in:
- lib/telnyx/resources/ai/assistants/versions.rb
Overview
Configure AI assistant specifications
Instance Method Summary collapse
-
#delete(version_id, assistant_id:, request_options: {}) ⇒ nil
Permanently removes a specific version of an assistant.
-
#initialize(client:) ⇒ Versions
constructor
private
A new instance of Versions.
-
#list(assistant_id, request_options: {}) ⇒ Telnyx::Models::AI::AssistantsList
Retrieves all versions of a specific assistant with complete configuration and metadata.
-
#promote(version_id, assistant_id:, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Promotes a specific version to be the main/current version of the assistant.
-
#retrieve(version_id, assistant_id:, include_mcp_servers: nil, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Retrieves a specific version of an assistant by assistant_id and version_id.
-
#update(version_id, assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Some parameter documentations has been truncated, see Models::AI::Assistants::VersionUpdateParams for more details.
Constructor Details
#initialize(client:) ⇒ Versions
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 Versions.
188 189 190 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 188 def initialize(client:) @client = client end |
Instance Method Details
#delete(version_id, assistant_id:, request_options: {}) ⇒ nil
Permanently removes a specific version of an assistant. Can not delete main version
144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 144 def delete(version_id, params) parsed, = Telnyx::AI::Assistants::VersionDeleteParams.dump_request(params) assistant_id = parsed.delete(:assistant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :delete, path: ["ai/assistants/%1$s/versions/%2$s", assistant_id, version_id], model: NilClass, options: ) end |
#list(assistant_id, request_options: {}) ⇒ Telnyx::Models::AI::AssistantsList
Retrieves all versions of a specific assistant with complete configuration and metadata
123 124 125 126 127 128 129 130 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 123 def list(assistant_id, params = {}) @client.request( method: :get, path: ["ai/assistants/%1$s/versions", assistant_id], model: Telnyx::AI::AssistantsList, options: params[:request_options] ) end |
#promote(version_id, assistant_id:, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Promotes a specific version to be the main/current version of the assistant. This will delete any existing canary deploy configuration and send all live production traffic to this version.
171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 171 def promote(version_id, params) parsed, = Telnyx::AI::Assistants::VersionPromoteParams.dump_request(params) assistant_id = parsed.delete(:assistant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/assistants/%1$s/versions/%2$s/promote", assistant_id, version_id], model: Telnyx::AI::InferenceEmbedding, options: ) end |
#retrieve(version_id, assistant_id:, include_mcp_servers: nil, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Retrieves a specific version of an assistant by assistant_id and version_id
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 24 def retrieve(version_id, params) parsed, = Telnyx::AI::Assistants::VersionRetrieveParams.dump_request(params) query = Telnyx::Internal::Util.encode_query_params(parsed) assistant_id = parsed.delete(:assistant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :get, path: ["ai/assistants/%1$s/versions/%2$s", assistant_id, version_id], query: query, model: Telnyx::AI::InferenceEmbedding, options: ) end |
#update(version_id, assistant_id:, description: nil, dynamic_variables: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, greeting: nil, insight_settings: nil, instructions: nil, llm_api_key_ref: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, voice_settings: nil, widget_settings: nil, request_options: {}) ⇒ Telnyx::Models::AI::InferenceEmbedding
Some parameter documentations has been truncated, see Models::AI::Assistants::VersionUpdateParams for more details.
Updates the configuration of a specific assistant version. Can not update main version
97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 97 def update(version_id, params) parsed, = Telnyx::AI::Assistants::VersionUpdateParams.dump_request(params) assistant_id = parsed.delete(:assistant_id) do raise ArgumentError.new("missing required path argument #{_1}") end @client.request( method: :post, path: ["ai/assistants/%1$s/versions/%2$s", assistant_id, version_id], body: parsed, model: Telnyx::AI::InferenceEmbedding, options: ) end |