Class: FetchHive::Generated::AgentsApi
- Inherits:
-
Object
- Object
- FetchHive::Generated::AgentsApi
- Defined in:
- lib/fetch_hive/generated/api/agents_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_public_workspaces_agents(workspace_id, id, opts = {}) ⇒ DeletePublicWorkspacesAgents200Response
Delete an agent Destroys the agent record.
-
#delete_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) ⇒ Array<(DeletePublicWorkspacesAgents200Response, Integer, Hash)>
Delete an agent Destroys the agent record.
-
#get_public_workspaces_agents(workspace_id, id, opts = {}) ⇒ GetPublicWorkspacesAgents200Response
Get an agent Returns a single active agent belonging to the requested workspace.
-
#get_public_workspaces_agents2(workspace_id, opts = {}) ⇒ GetPublicWorkspacesAgents2200Response
List public workspace agents Returns standalone agents scoped to the requested public API workspace.
-
#get_public_workspaces_agents2_with_http_info(workspace_id, opts = {}) ⇒ Array<(GetPublicWorkspacesAgents2200Response, Integer, Hash)>
List public workspace agents Returns standalone agents scoped to the requested public API workspace.
-
#get_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) ⇒ Array<(GetPublicWorkspacesAgents200Response, Integer, Hash)>
Get an agent Returns a single active agent belonging to the requested workspace.
-
#initialize(api_client = ApiClient.default) ⇒ AgentsApi
constructor
A new instance of AgentsApi.
-
#invoke_agent(invoke_agent_request, opts = {}) ⇒ InvokeAgentResponse
Invoke an agent Sends a message to a configured agent and returns its response.
-
#invoke_agent_with_http_info(invoke_agent_request, opts = {}) ⇒ Array<(InvokeAgentResponse, Integer, Hash)>
Invoke an agent Sends a message to a configured agent and returns its response.
-
#patch_public_workspaces_agents(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) ⇒ PatchPublicWorkspacesAgents200Response
Update an agent Updates an existing agent in the requested workspace.
-
#patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) ⇒ Array<(PatchPublicWorkspacesAgents200Response, Integer, Hash)>
Update an agent Updates an existing agent in the requested workspace.
-
#post_public_workspaces_agents(workspace_id, post_public_workspaces_agents_request, opts = {}) ⇒ PostPublicWorkspacesAgents200Response
Create an agent Creates a new agent in the requested workspace.
-
#post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts = {}) ⇒ Array<(PostPublicWorkspacesAgents200Response, Integer, Hash)>
Create an agent Creates a new agent in the requested workspace.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_public_workspaces_agents(workspace_id, id, opts = {}) ⇒ DeletePublicWorkspacesAgents200Response
Delete an agent Destroys the agent record.
28 29 30 31 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 28 def delete_public_workspaces_agents(workspace_id, id, opts = {}) data, _status_code, _headers = delete_public_workspaces_agents_with_http_info(workspace_id, id, opts) data end |
#delete_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) ⇒ Array<(DeletePublicWorkspacesAgents200Response, Integer, Hash)>
Delete an agent Destroys the agent record.
39 40 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 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 39 def delete_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.delete_public_workspaces_agents ...' end # verify the required parameter 'workspace_id' is set if @api_client.config.client_side_validation && workspace_id.nil? fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.delete_public_workspaces_agents" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.delete_public_workspaces_agents" end # resource path local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.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']) 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] || 'DeletePublicWorkspacesAgents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] = opts.merge( :operation => :"AgentsApi.delete_public_workspaces_agents", :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: AgentsApi#delete_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_public_workspaces_agents(workspace_id, id, opts = {}) ⇒ GetPublicWorkspacesAgents200Response
Get an agent Returns a single active agent belonging to the requested workspace.
97 98 99 100 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 97 def get_public_workspaces_agents(workspace_id, id, opts = {}) data, _status_code, _headers = get_public_workspaces_agents_with_http_info(workspace_id, id, opts) data end |
#get_public_workspaces_agents2(workspace_id, opts = {}) ⇒ GetPublicWorkspacesAgents2200Response
List public workspace agents Returns standalone agents scoped to the requested public API workspace.
165 166 167 168 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 165 def get_public_workspaces_agents2(workspace_id, opts = {}) data, _status_code, _headers = get_public_workspaces_agents2_with_http_info(workspace_id, opts) data end |
#get_public_workspaces_agents2_with_http_info(workspace_id, opts = {}) ⇒ Array<(GetPublicWorkspacesAgents2200Response, Integer, Hash)>
List public workspace agents Returns standalone agents scoped to the requested public API workspace.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 175 def get_public_workspaces_agents2_with_http_info(workspace_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents2 ...' end # verify the required parameter 'workspace_id' is set if @api_client.config.client_side_validation && workspace_id.nil? fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents2" end # resource path local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.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']) 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] || 'GetPublicWorkspacesAgents2200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] = opts.merge( :operation => :"AgentsApi.get_public_workspaces_agents2", :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: AgentsApi#get_public_workspaces_agents2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) ⇒ Array<(GetPublicWorkspacesAgents200Response, Integer, Hash)>
Get an agent Returns a single active agent belonging to the requested workspace.
108 109 110 111 112 113 114 115 116 117 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 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 108 def get_public_workspaces_agents_with_http_info(workspace_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.get_public_workspaces_agents ...' end # verify the required parameter 'workspace_id' is set if @api_client.config.client_side_validation && workspace_id.nil? fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.get_public_workspaces_agents" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.get_public_workspaces_agents" end # resource path local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.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']) 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] || 'GetPublicWorkspacesAgents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] = opts.merge( :operation => :"AgentsApi.get_public_workspaces_agents", :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: AgentsApi#get_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#invoke_agent(invoke_agent_request, opts = {}) ⇒ InvokeAgentResponse
Invoke an agent
Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via thread_id, or accept ephemeral history via the messages field. Set streaming: true to receive a Server-Sent Events stream. Each data: line contains a JSON object of type SseChunk. Documents and image URLs can be supplied in attachments. Existing account Assets can be discovered through known_artifact_refs and explicitly selected through artifact_refs.
228 229 230 231 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 228 def invoke_agent(invoke_agent_request, opts = {}) data, _status_code, _headers = invoke_agent_with_http_info(invoke_agent_request, opts) data end |
#invoke_agent_with_http_info(invoke_agent_request, opts = {}) ⇒ Array<(InvokeAgentResponse, Integer, Hash)>
Invoke an agent Sends a message to a configured agent and returns its response. Agents can use tools, maintain conversation history via `thread_id`, or accept ephemeral history via the `messages` field. Set `streaming: true` to receive a Server-Sent Events stream. Each `data:` line contains a JSON object of type `SseChunk`. Documents and image URLs can be supplied in `attachments`. Existing account Assets can be discovered through `known_artifact_refs` and explicitly selected through `artifact_refs`.
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 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 238 def invoke_agent_with_http_info(invoke_agent_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.invoke_agent ...' end # verify the required parameter 'invoke_agent_request' is set if @api_client.config.client_side_validation && invoke_agent_request.nil? fail ArgumentError, "Missing the required parameter 'invoke_agent_request' when calling AgentsApi.invoke_agent" end # resource path local_var_path = '/agent/invoke' # 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']) unless header_params['Accept'] # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(invoke_agent_request) # return_type return_type = opts[:debug_return_type] || 'InvokeAgentResponse' # auth_names auth_names = opts[:debug_auth_names] || ['BearerAuth'] = opts.merge( :operation => :"AgentsApi.invoke_agent", :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: AgentsApi#invoke_agent\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_public_workspaces_agents(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) ⇒ PatchPublicWorkspacesAgents200Response
Update an agent Updates an existing agent in the requested workspace.
298 299 300 301 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 298 def patch_public_workspaces_agents(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) data, _status_code, _headers = patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts) data end |
#patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) ⇒ Array<(PatchPublicWorkspacesAgents200Response, Integer, Hash)>
Update an agent Updates an existing agent in the requested workspace.
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 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 310 def patch_public_workspaces_agents_with_http_info(workspace_id, id, patch_public_workspaces_agents_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.patch_public_workspaces_agents ...' end # verify the required parameter 'workspace_id' is set if @api_client.config.client_side_validation && workspace_id.nil? fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.patch_public_workspaces_agents" end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling AgentsApi.patch_public_workspaces_agents" end # verify the required parameter 'patch_public_workspaces_agents_request' is set if @api_client.config.client_side_validation && patch_public_workspaces_agents_request.nil? fail ArgumentError, "Missing the required parameter 'patch_public_workspaces_agents_request' when calling AgentsApi.patch_public_workspaces_agents" end # resource path local_var_path = '/public/workspaces/{workspace_id}/agents/{id}'.sub('{workspace_id}', CGI.escape(workspace_id.to_s)).sub('{id}', CGI.escape(id.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']) unless header_params['Accept'] # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(patch_public_workspaces_agents_request) # return_type return_type = opts[:debug_return_type] || 'PatchPublicWorkspacesAgents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] = opts.merge( :operation => :"AgentsApi.patch_public_workspaces_agents", :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: AgentsApi#patch_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_public_workspaces_agents(workspace_id, post_public_workspaces_agents_request, opts = {}) ⇒ PostPublicWorkspacesAgents200Response
Create an agent Creates a new agent in the requested workspace.
377 378 379 380 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 377 def post_public_workspaces_agents(workspace_id, post_public_workspaces_agents_request, opts = {}) data, _status_code, _headers = post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts) data end |
#post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts = {}) ⇒ Array<(PostPublicWorkspacesAgents200Response, Integer, Hash)>
Create an agent Creates a new agent in the requested workspace.
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 |
# File 'lib/fetch_hive/generated/api/agents_api.rb', line 388 def post_public_workspaces_agents_with_http_info(workspace_id, post_public_workspaces_agents_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AgentsApi.post_public_workspaces_agents ...' end # verify the required parameter 'workspace_id' is set if @api_client.config.client_side_validation && workspace_id.nil? fail ArgumentError, "Missing the required parameter 'workspace_id' when calling AgentsApi.post_public_workspaces_agents" end # verify the required parameter 'post_public_workspaces_agents_request' is set if @api_client.config.client_side_validation && post_public_workspaces_agents_request.nil? fail ArgumentError, "Missing the required parameter 'post_public_workspaces_agents_request' when calling AgentsApi.post_public_workspaces_agents" end # resource path local_var_path = '/public/workspaces/{workspace_id}/agents'.sub('{workspace_id}', CGI.escape(workspace_id.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']) unless header_params['Accept'] # 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 # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(post_public_workspaces_agents_request) # return_type return_type = opts[:debug_return_type] || 'PostPublicWorkspacesAgents200Response' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] = opts.merge( :operation => :"AgentsApi.post_public_workspaces_agents", :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: AgentsApi#post_public_workspaces_agents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |