Class: LaunchDarklyApi::AIConfigsApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::AIConfigsApi
- Defined in:
- lib/launchdarkly_api/api/ai_configs_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ AIConfigsApi
constructor
A new instance of AIConfigsApi.
-
#list_agent_optimization_runs(project_key, optimization_key, opts = {}) ⇒ AgentOptimizationRuns
List agent optimization runs Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC.
-
#list_agent_optimization_runs_with_http_info(project_key, optimization_key, opts = {}) ⇒ Array<(AgentOptimizationRuns, Integer, Hash)>
List agent optimization runs Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC.
-
#list_ai_tool_references(project_key, tool_key, opts = {}) ⇒ ToolReferences
List AI tool references Get all AgentControl config variations that currently reference this tool.
-
#list_ai_tool_references_with_http_info(project_key, tool_key, opts = {}) ⇒ Array<(ToolReferences, Integer, Hash)>
List AI tool references Get all AgentControl config variations that currently reference this tool.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AIConfigsApi
Returns a new instance of AIConfigsApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/ai_configs_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_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#list_agent_optimization_runs(project_key, optimization_key, opts = {}) ⇒ AgentOptimizationRuns
List agent optimization runs Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC.
30 31 32 33 |
# File 'lib/launchdarkly_api/api/ai_configs_api.rb', line 30 def list_agent_optimization_runs(project_key, optimization_key, opts = {}) data, _status_code, _headers = list_agent_optimization_runs_with_http_info(project_key, optimization_key, opts) data end |
#list_agent_optimization_runs_with_http_info(project_key, optimization_key, opts = {}) ⇒ Array<(AgentOptimizationRuns, Integer, Hash)>
List agent optimization runs Get one run summary per distinct run_id across all versions of an agent optimization config, ordered by created_at DESC.
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 |
# File 'lib/launchdarkly_api/api/ai_configs_api.rb', line 43 def list_agent_optimization_runs_with_http_info(project_key, optimization_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsApi.list_agent_optimization_runs ...' 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 AIConfigsApi.list_agent_optimization_runs" end # verify the required parameter 'optimization_key' is set if @api_client.config.client_side_validation && optimization_key.nil? fail ArgumentError, "Missing the required parameter 'optimization_key' when calling AIConfigsApi.list_agent_optimization_runs" end # resource path local_var_path = '/api/v2/projects/{projectKey}/agent-optimizations/{optimizationKey}/runs'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'optimizationKey' + '}', CGI.escape(optimization_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AgentOptimizationRuns' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsApi.list_agent_optimization_runs", :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: AIConfigsApi#list_agent_optimization_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_ai_tool_references(project_key, tool_key, opts = {}) ⇒ ToolReferences
List AI tool references Get all AgentControl config variations that currently reference this tool.
105 106 107 108 |
# File 'lib/launchdarkly_api/api/ai_configs_api.rb', line 105 def list_ai_tool_references(project_key, tool_key, opts = {}) data, _status_code, _headers = list_ai_tool_references_with_http_info(project_key, tool_key, opts) data end |
#list_ai_tool_references_with_http_info(project_key, tool_key, opts = {}) ⇒ Array<(ToolReferences, Integer, Hash)>
List AI tool references Get all AgentControl config variations that currently reference this tool.
118 119 120 121 122 123 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 |
# File 'lib/launchdarkly_api/api/ai_configs_api.rb', line 118 def list_ai_tool_references_with_http_info(project_key, tool_key, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AIConfigsApi.list_ai_tool_references ...' 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 AIConfigsApi.list_ai_tool_references" end # verify the required parameter 'tool_key' is set if @api_client.config.client_side_validation && tool_key.nil? fail ArgumentError, "Missing the required parameter 'tool_key' when calling AIConfigsApi.list_ai_tool_references" end # resource path local_var_path = '/api/v2/projects/{projectKey}/ai-tools/{toolKey}/references'.sub('{' + 'projectKey' + '}', CGI.escape(project_key.to_s)).sub('{' + 'toolKey' + '}', CGI.escape(tool_key.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ToolReferences' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AIConfigsApi.list_ai_tool_references", :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: AIConfigsApi#list_ai_tool_references\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |