Class: LaunchDarklyApi::AIConfigsBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::AIConfigsBetaApi
- Defined in:
- lib/launchdarkly_api/api/ai_configs_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ nil
Delete AI Config Delete an existing AI Config.
-
#delete_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ nil
Delete AI Config variation Delete a specific variation of an AI Config by config key and variation key.
-
#delete_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete AI Config variation Delete a specific variation of an AI Config by config key and variation key.
-
#delete_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete AI Config Delete an existing AI Config.
-
#delete_model_config(ld_api_version, project_key, model_config_key, opts = {}) ⇒ nil
Delete an AI model config Delete an AI model config.
-
#delete_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI model config Delete an AI model config.
-
#get_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ AIConfig
Get AI Config Retrieve a specific AI Config by its key.
-
#get_ai_config_metrics(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Metrics
Get AI Config metrics Retrieve usage metrics for an AI Config by config key.
-
#get_ai_config_metrics_by_variation(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<MetricByVariation>
Get AI Config metrics by variation Retrieve usage metrics for an AI Config by config key, with results split by variation.
-
#get_ai_config_metrics_by_variation_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<(Array<MetricByVariation>, Integer, Hash)>
Get AI Config metrics by variation Retrieve usage metrics for an AI Config by config key, with results split by variation.
-
#get_ai_config_metrics_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<(Metrics, Integer, Hash)>
Get AI Config metrics Retrieve usage metrics for an AI Config by config key.
-
#get_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ AIConfigVariationsResponse
Get AI Config variation Get an AI Config variation by key.
-
#get_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(AIConfigVariationsResponse, Integer, Hash)>
Get AI Config variation Get an AI Config variation by key.
-
#get_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Get AI Config Retrieve a specific AI Config by its key.
-
#get_ai_configs(ld_api_version, project_key, opts = {}) ⇒ AIConfigs
List AI Configs Get a list of all AI Configs in the given project.
-
#get_ai_configs_with_http_info(ld_api_version, project_key, opts = {}) ⇒ Array<(AIConfigs, Integer, Hash)>
List AI Configs Get a list of all AI Configs in the given project.
-
#get_model_config(ld_api_version, project_key, model_config_key, opts = {}) ⇒ ModelConfig
Get AI model config Get an AI model config by key.
-
#get_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) ⇒ Array<(ModelConfig, Integer, Hash)>
Get AI model config Get an AI model config by key.
-
#initialize(api_client = ApiClient.default) ⇒ AIConfigsBetaApi
constructor
A new instance of AIConfigsBetaApi.
-
#list_model_configs(ld_api_version, project_key, opts = {}) ⇒ Array<ModelConfig>
List AI model configs Get all AI model configs for a project.
-
#list_model_configs_with_http_info(ld_api_version, project_key, opts = {}) ⇒ Array<(Array<ModelConfig>, Integer, Hash)>
List AI model configs Get all AI model configs for a project.
-
#patch_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ AIConfig
Update AI Config Edit an existing AI Config.
-
#patch_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ AIConfigVariation
Update AI Config variation Edit an existing variation of an AI Config.
-
#patch_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(AIConfigVariation, Integer, Hash)>
Update AI Config variation Edit an existing variation of an AI Config.
-
#patch_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Update AI Config Edit an existing AI Config.
-
#post_ai_config(ld_api_version, project_key, ai_config_post, opts = {}) ⇒ AIConfig
Create new AI Config Create a new AI Config within the given project.
-
#post_ai_config_variation(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) ⇒ AIConfigVariation
Create AI Config variation Create a new variation for a given AI Config.
-
#post_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) ⇒ Array<(AIConfigVariation, Integer, Hash)>
Create AI Config variation Create a new variation for a given AI Config.
-
#post_ai_config_with_http_info(ld_api_version, project_key, ai_config_post, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Create new AI Config Create a new AI Config within the given project.
-
#post_model_config(ld_api_version, project_key, model_config_post, opts = {}) ⇒ ModelConfig
Create an AI model config Create an AI model config.
-
#post_model_config_with_http_info(ld_api_version, project_key, model_config_post, opts = {}) ⇒ Array<(ModelConfig, Integer, Hash)>
Create an AI model config Create an AI model config.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AIConfigsBetaApi
Returns a new instance of AIConfigsBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ nil
Delete AI Config Delete an existing AI Config.
29 30 31 32 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 29 def delete_ai_config(ld_api_version, project_key, config_key, opts = {}) delete_ai_config_with_http_info(ld_api_version, project_key, config_key, opts) nil end |
#delete_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ nil
Delete AI Config variation Delete a specific variation of an AI Config by config key and variation key.
111 112 113 114 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 111 def delete_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) delete_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts) nil end |
#delete_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete AI Config variation Delete a specific variation of an AI Config by config key and variation key.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 124 def delete_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.delete_ai_config_variation ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.delete_ai_config_variation" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.delete_ai_config_variation" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.delete_ai_config_variation" end # verify the required parameter 'variation_key' is set if @api_client.config.client_side_validation && variation_key.nil? fail ArgumentError, "Missing the required parameter 'variation_key' when calling AIConfigsBetaApi.delete_ai_config_variation" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)).sub('{' + 'variationKey' + '}', CGI.escape(variation_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.delete_ai_config_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#delete_ai_config_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete AI Config Delete an existing AI Config.
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 41 def delete_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.delete_ai_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.delete_ai_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.delete_ai_config" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.delete_ai_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.delete_ai_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#delete_ai_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_model_config(ld_api_version, project_key, model_config_key, opts = {}) ⇒ nil
Delete an AI model config Delete an AI model config.
197 198 199 200 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 197 def delete_model_config(ld_api_version, project_key, model_config_key, opts = {}) delete_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts) nil end |
#delete_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete an AI model config Delete an AI model config.
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 209 def delete_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.delete_model_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.delete_model_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.delete_model_config" end # verify the required parameter 'model_config_key' is set if @api_client.config.client_side_validation && model_config_key.nil? fail ArgumentError, "Missing the required parameter 'model_config_key' when calling AIConfigsBetaApi.delete_model_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'modelConfigKey' + '}', CGI.escape(model_config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.delete_model_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#delete_model_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ AIConfig
Get AI Config Retrieve a specific AI Config by its key.
278 279 280 281 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 278 def get_ai_config(ld_api_version, project_key, config_key, opts = {}) data, _status_code, _headers = get_ai_config_with_http_info(ld_api_version, project_key, config_key, opts) data end |
#get_ai_config_metrics(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Metrics
Get AI Config metrics Retrieve usage metrics for an AI Config by config key.
362 363 364 365 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 362 def get_ai_config_metrics(ld_api_version, project_key, config_key, from, to, env, opts = {}) data, _status_code, _headers = get_ai_config_metrics_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts) data end |
#get_ai_config_metrics_by_variation(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<MetricByVariation>
Get AI Config metrics by variation Retrieve usage metrics for an AI Config by config key, with results split by variation.
464 465 466 467 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 464 def get_ai_config_metrics_by_variation(ld_api_version, project_key, config_key, from, to, env, opts = {}) data, _status_code, _headers = get_ai_config_metrics_by_variation_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts) data end |
#get_ai_config_metrics_by_variation_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<(Array<MetricByVariation>, Integer, Hash)>
Get AI Config metrics by variation Retrieve usage metrics for an AI Config by config key, with results split by variation.
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 479 def get_ai_config_metrics_by_variation_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_ai_config_metrics_by_variation ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # verify the required parameter 'env' is set if @api_client.config.client_side_validation && env.nil? fail ArgumentError, "Missing the required parameter 'env' when calling AIConfigsBetaApi.get_ai_config_metrics_by_variation" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics-by-variation'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'to'] = to query_params[:'env'] = env # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<MetricByVariation>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_ai_config_metrics_by_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_ai_config_metrics_by_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_config_metrics_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) ⇒ Array<(Metrics, Integer, Hash)>
Get AI Config metrics Retrieve usage metrics for an AI Config by config key.
377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 377 def get_ai_config_metrics_with_http_info(ld_api_version, project_key, config_key, from, to, env, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_ai_config_metrics ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_ai_config_metrics" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_ai_config_metrics" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.get_ai_config_metrics" end # verify the required parameter 'from' is set if @api_client.config.client_side_validation && from.nil? fail ArgumentError, "Missing the required parameter 'from' when calling AIConfigsBetaApi.get_ai_config_metrics" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling AIConfigsBetaApi.get_ai_config_metrics" end # verify the required parameter 'env' is set if @api_client.config.client_side_validation && env.nil? fail ArgumentError, "Missing the required parameter 'env' when calling AIConfigsBetaApi.get_ai_config_metrics" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/metrics'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'from'] = from query_params[:'to'] = to query_params[:'env'] = env # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Metrics' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_ai_config_metrics", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_ai_config_metrics\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ AIConfigVariationsResponse
Get AI Config variation Get an AI Config variation by key. The response includes all variation versions for the given variation key.
564 565 566 567 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 564 def get_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) data, _status_code, _headers = get_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts) data end |
#get_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(AIConfigVariationsResponse, Integer, Hash)>
Get AI Config variation Get an AI Config variation by key. The response includes all variation versions for the given variation key.
577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 577 def get_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_ai_config_variation ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_ai_config_variation" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_ai_config_variation" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.get_ai_config_variation" end # verify the required parameter 'variation_key' is set if @api_client.config.client_side_validation && variation_key.nil? fail ArgumentError, "Missing the required parameter 'variation_key' when calling AIConfigsBetaApi.get_ai_config_variation" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)).sub('{' + 'variationKey' + '}', CGI.escape(variation_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AIConfigVariationsResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_ai_config_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_ai_config_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Get AI Config Retrieve a specific AI Config by its key.
290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 290 def get_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_ai_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_ai_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_ai_config" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.get_ai_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AIConfig' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_ai_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_ai_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_ai_configs(ld_api_version, project_key, opts = {}) ⇒ AIConfigs
List AI Configs Get a list of all AI Configs in the given project.
653 654 655 656 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 653 def get_ai_configs(ld_api_version, project_key, opts = {}) data, _status_code, _headers = get_ai_configs_with_http_info(ld_api_version, project_key, opts) data end |
#get_ai_configs_with_http_info(ld_api_version, project_key, opts = {}) ⇒ Array<(AIConfigs, Integer, Hash)>
List AI Configs Get a list of all AI Configs in the given project.
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 668 def get_ai_configs_with_http_info(ld_api_version, project_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_ai_configs ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_ai_configs" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_ai_configs" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AIConfigs' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_ai_configs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_ai_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_model_config(ld_api_version, project_key, model_config_key, opts = {}) ⇒ ModelConfig
Get AI model config Get an AI model config by key.
737 738 739 740 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 737 def get_model_config(ld_api_version, project_key, model_config_key, opts = {}) data, _status_code, _headers = get_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts) data end |
#get_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) ⇒ Array<(ModelConfig, Integer, Hash)>
Get AI model config Get an AI model config by key.
749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 749 def get_model_config_with_http_info(ld_api_version, project_key, model_config_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.get_model_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.get_model_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.get_model_config" end # verify the required parameter 'model_config_key' is set if @api_client.config.client_side_validation && model_config_key.nil? fail ArgumentError, "Missing the required parameter 'model_config_key' when calling AIConfigsBetaApi.get_model_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/model-configs/{modelConfigKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'modelConfigKey' + '}', CGI.escape(model_config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ModelConfig' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.get_model_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#get_model_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_model_configs(ld_api_version, project_key, opts = {}) ⇒ Array<ModelConfig>
List AI model configs Get all AI model configs for a project.
817 818 819 820 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 817 def list_model_configs(ld_api_version, project_key, opts = {}) data, _status_code, _headers = list_model_configs_with_http_info(ld_api_version, project_key, opts) data end |
#list_model_configs_with_http_info(ld_api_version, project_key, opts = {}) ⇒ Array<(Array<ModelConfig>, Integer, Hash)>
List AI model configs Get all AI model configs for a project.
828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 828 def list_model_configs_with_http_info(ld_api_version, project_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.list_model_configs ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.list_model_configs" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.list_model_configs" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/model-configs'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<ModelConfig>' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.list_model_configs", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#list_model_configs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_ai_config(ld_api_version, project_key, config_key, opts = {}) ⇒ AIConfig
Update AI Config Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here’s an example: “‘ { "description": "Example updated description", "tags": ["new-tag"] } “`
894 895 896 897 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 894 def patch_ai_config(ld_api_version, project_key, config_key, opts = {}) data, _status_code, _headers = patch_ai_config_with_http_info(ld_api_version, project_key, config_key, opts) data end |
#patch_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ AIConfigVariation
Update AI Config variation Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here’s an example: “‘ { "messages": [ { "role": "system", "content": "The new message" } ] } “`
983 984 985 986 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 983 def patch_ai_config_variation(ld_api_version, project_key, config_key, variation_key, opts = {}) data, _status_code, _headers = patch_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts) data end |
#patch_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) ⇒ Array<(AIConfigVariation, Integer, Hash)>
Update AI Config variation Edit an existing variation of an AI Config. This creates a new version of the variation. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { "messages": [ { "role": "system", "content": "The new message" } ] } ```
997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 997 def patch_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, variation_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.patch_ai_config_variation ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.patch_ai_config_variation" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.patch_ai_config_variation" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.patch_ai_config_variation" end # verify the required parameter 'variation_key' is set if @api_client.config.client_side_validation && variation_key.nil? fail ArgumentError, "Missing the required parameter 'variation_key' when calling AIConfigsBetaApi.patch_ai_config_variation" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations/{variationKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)).sub('{' + 'variationKey' + '}', CGI.escape(variation_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ai_config_variation_patch']) # return_type return_type = opts[:debug_return_type] || 'AIConfigVariation' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.patch_ai_config_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#patch_ai_config_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Update AI Config Edit an existing AI Config. The request body must be a JSON object of the fields to update. The values you include replace the existing values for the fields. Here's an example: ``` { "description": "Example updated description", "tags": ["new-tag"] } ```
907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 907 def patch_ai_config_with_http_info(ld_api_version, project_key, config_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.patch_ai_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.patch_ai_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.patch_ai_config" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.patch_ai_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'ai_config_patch']) # return_type return_type = opts[:debug_return_type] || 'AIConfig' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.patch_ai_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#patch_ai_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_ai_config(ld_api_version, project_key, ai_config_post, opts = {}) ⇒ AIConfig
Create new AI Config Create a new AI Config within the given project.
1075 1076 1077 1078 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1075 def post_ai_config(ld_api_version, project_key, ai_config_post, opts = {}) data, _status_code, _headers = post_ai_config_with_http_info(ld_api_version, project_key, ai_config_post, opts) data end |
#post_ai_config_variation(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) ⇒ AIConfigVariation
Create AI Config variation Create a new variation for a given AI Config. The model in the request body requires a modelName and parameters, for example: “‘ "model": { "modelName": "claude-3-opus-20240229", "parameters": { "max_tokens": 1024 } } “`
1162 1163 1164 1165 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1162 def post_ai_config_variation(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) data, _status_code, _headers = post_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, ai_config_variation_post, opts) data end |
#post_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) ⇒ Array<(AIConfigVariation, Integer, Hash)>
Create AI Config variation Create a new variation for a given AI Config. The <code>model</code> in the request body requires a <code>modelName</code> and <code>parameters</code>, for example: ``` "model": { "modelName": "claude-3-opus-20240229", "parameters": { "max_tokens": 1024 } } ```
1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1175 def post_ai_config_variation_with_http_info(ld_api_version, project_key, config_key, ai_config_variation_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.post_ai_config_variation ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.post_ai_config_variation" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.post_ai_config_variation" end # verify the required parameter 'config_key' is set if @api_client.config.client_side_validation && config_key.nil? fail ArgumentError, "Missing the required parameter 'config_key' when calling AIConfigsBetaApi.post_ai_config_variation" end # verify the required parameter 'ai_config_variation_post' is set if @api_client.config.client_side_validation && ai_config_variation_post.nil? fail ArgumentError, "Missing the required parameter 'ai_config_variation_post' when calling AIConfigsBetaApi.post_ai_config_variation" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/{configKey}/variations'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'configKey' + '}', CGI.escape(config_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ai_config_variation_post) # return_type return_type = opts[:debug_return_type] || 'AIConfigVariation' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.post_ai_config_variation", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#post_ai_config_variation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_ai_config_with_http_info(ld_api_version, project_key, ai_config_post, opts = {}) ⇒ Array<(AIConfig, Integer, Hash)>
Create new AI Config Create a new AI Config within the given project.
1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1087 def post_ai_config_with_http_info(ld_api_version, project_key, ai_config_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.post_ai_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.post_ai_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.post_ai_config" end # verify the required parameter 'ai_config_post' is set if @api_client.config.client_side_validation && ai_config_post.nil? fail ArgumentError, "Missing the required parameter 'ai_config_post' when calling AIConfigsBetaApi.post_ai_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ai_config_post) # return_type return_type = opts[:debug_return_type] || 'AIConfig' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.post_ai_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#post_ai_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_model_config(ld_api_version, project_key, model_config_post, opts = {}) ⇒ ModelConfig
Create an AI model config Create an AI model config. You can use this in any variation for any AI Config in your project.
1253 1254 1255 1256 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1253 def post_model_config(ld_api_version, project_key, model_config_post, opts = {}) data, _status_code, _headers = post_model_config_with_http_info(ld_api_version, project_key, model_config_post, opts) data end |
#post_model_config_with_http_info(ld_api_version, project_key, model_config_post, opts = {}) ⇒ Array<(ModelConfig, Integer, Hash)>
Create an AI model config Create an AI model config. You can use this in any variation for any AI Config in your project.
1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 |
# File 'lib/launchdarkly_api/api/ai_configs_beta_api.rb', line 1265 def post_model_config_with_http_info(ld_api_version, project_key, model_config_post, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsBetaApi.post_model_config ...' end # verify the required parameter 'ld_api_version' is set if @api_client.config.client_side_validation && ld_api_version.nil? fail ArgumentError, "Missing the required parameter 'ld_api_version' when calling AIConfigsBetaApi.post_model_config" end # verify enum value allowable_values = ["beta"] if @api_client.config.client_side_validation && !allowable_values.include?(ld_api_version) fail ArgumentError, "invalid value for \"ld_api_version\", must be one of #{allowable_values}" end # verify the required parameter 'project_key' is set if @api_client.config.client_side_validation && project_key.nil? fail ArgumentError, "Missing the required parameter 'project_key' when calling AIConfigsBetaApi.post_model_config" end # verify the required parameter 'model_config_post' is set if @api_client.config.client_side_validation && model_config_post.nil? fail ArgumentError, "Missing the required parameter 'model_config_post' when calling AIConfigsBetaApi.post_model_config" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-configs/model-configs'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end header_params[:'LD-API-Version'] = ld_api_version # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(model_config_post) # return_type return_type = opts[:debug_return_type] || 'ModelConfig' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsBetaApi.post_model_config", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AIConfigsBetaApi#post_model_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |