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:, conversation_flow: nil, description: nil, dynamic_variables: nil, dynamic_variables_webhook_timeout_ms: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, instructions: nil, integrations: nil, interruption_settings: nil, llm_api_key_ref: nil, mcp_servers: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, tags: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, version_name: 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.
206 207 208 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 206 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
162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 162 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
141 142 143 144 145 146 147 148 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 141 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.
189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 189 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:, conversation_flow: nil, description: nil, dynamic_variables: nil, dynamic_variables_webhook_timeout_ms: nil, dynamic_variables_webhook_url: nil, enabled_features: nil, external_llm: nil, fallback_config: nil, greeting: nil, insight_settings: nil, instructions: nil, integrations: nil, interruption_settings: nil, llm_api_key_ref: nil, mcp_servers: nil, messaging_settings: nil, model: nil, name: nil, observability_settings: nil, post_conversation_settings: nil, privacy_settings: nil, tags: nil, telephony_settings: nil, tool_ids: nil, tools: nil, transcription: nil, version_name: 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
115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/telnyx/resources/ai/assistants/versions.rb', line 115 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 |