Class: OCI::GenerativeAiAgent::GenerativeAiAgentClient
- Inherits:
-
Object
- Object
- OCI::GenerativeAiAgent::GenerativeAiAgentClient
- Defined in:
- lib/oci/generative_ai_agent/generative_ai_agent_client.rb
Overview
OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with an intelligent retrieval system to create contextually relevant answers by searching your knowledge base, making your AI applications smart and efficient.
OCI Generative AI Agents supports several ways to onboard your data and then allows you and your customers to interact with your data using a chat interface or API.
Use the Generative AI Agents API to create and manage agents, knowledge bases, data sources, endpoints, data ingestion jobs, and work requests.
For creating and managing client chat sessions see the Generative AI Agents Client API.
To learn more about the service, see the Generative AI Agents documentation.
Instance Attribute Summary collapse
-
#api_client ⇒ OCI::ApiClient
readonly
Client used to make HTTP requests.
-
#endpoint ⇒ String
readonly
Fully qualified endpoint URL.
-
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
-
#retry_config ⇒ OCI::Retry::RetryConfig
readonly
The default retry configuration to apply to all operations in this service client.
Instance Method Summary collapse
-
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Cancels a work request.
-
#change_agent_compartment(agent_id, change_agent_compartment_details, opts = {}) ⇒ Response
Moves an agent into a different compartment within the same tenancy.
-
#change_agent_endpoint_compartment(agent_endpoint_id, change_agent_endpoint_compartment_details, opts = {}) ⇒ Response
Moves an endpoint into a different compartment within the same tenancy.
-
#change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_compartment_details, opts = {}) ⇒ Response
Moves a knowledge base into a different compartment within the same tenancy.
-
#create_agent(create_agent_details, opts = {}) ⇒ Response
Creates an agent.
-
#create_agent_endpoint(create_agent_endpoint_details, opts = {}) ⇒ Response
Creates an endpoint.
-
#create_data_ingestion_job(create_data_ingestion_job_details, opts = {}) ⇒ Response
Creates a data ingestion job.
-
#create_data_source(create_data_source_details, opts = {}) ⇒ Response
Creates a data source.
-
#create_knowledge_base(create_knowledge_base_details, opts = {}) ⇒ Response
Creates a knowledge base.
-
#create_tool(create_tool_details, opts = {}) ⇒ Response
Creates a tool.
-
#delete_agent(agent_id, opts = {}) ⇒ Response
Deletes an agent.
-
#delete_agent_endpoint(agent_endpoint_id, opts = {}) ⇒ Response
Deletes an endpoint.
-
#delete_data_ingestion_job(data_ingestion_job_id, opts = {}) ⇒ Response
Deletes a data ingestion job.
-
#delete_data_source(data_source_id, opts = {}) ⇒ Response
Deletes a data source.
-
#delete_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response
Deletes a knowledge base.
-
#delete_tool(tool_id, opts = {}) ⇒ Response
Deletes a tool.
-
#get_agent(agent_id, opts = {}) ⇒ Response
Gets information about an agent.
-
#get_agent_endpoint(agent_endpoint_id, opts = {}) ⇒ Response
Gets information about an endpoint.
-
#get_data_ingestion_job(data_ingestion_job_id, opts = {}) ⇒ Response
Gets information about a data ingestion job.
-
#get_data_ingestion_job_log_content(data_ingestion_job_id, opts = {}, &block) ⇒ Response
Returns the raw log file for the specified data ingestion job in text format.
-
#get_data_source(data_source_id, opts = {}) ⇒ Response
Gets information about a data source.
-
#get_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response
Gets information about a knowledge base.
-
#get_tool(tool_id, opts = {}) ⇒ Response
Gets information about a tool.
-
#get_work_request(work_request_id, opts = {}) ⇒ Response
Gets the details of a work request.
-
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ GenerativeAiAgentClient
constructor
Creates a new GenerativeAiAgentClient.
-
#list_agent_endpoints(opts = {}) ⇒ Response
Gets a list of endpoints.
-
#list_agents(opts = {}) ⇒ Response
Gets a list of agents.
-
#list_data_ingestion_jobs(opts = {}) ⇒ Response
Gets a list of data ingestion jobs.
-
#list_data_sources(opts = {}) ⇒ Response
Gets a list of data sources.
-
#list_knowledge_bases(opts = {}) ⇒ Response
Gets a list of knowledge bases.
-
#list_tools(opts = {}) ⇒ Response
Gets a list of tools.
-
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Lists the errors for a work request.
-
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Lists the logs for a work request.
-
#list_work_requests(opts = {}) ⇒ Response
Lists the work requests in a compartment.
-
#logger ⇒ Logger
The logger for this client.
-
#update_agent(agent_id, update_agent_details, opts = {}) ⇒ Response
Updates an agent.
-
#update_agent_endpoint(agent_endpoint_id, update_agent_endpoint_details, opts = {}) ⇒ Response
Updates an endpoint.
-
#update_data_source(data_source_id, update_data_source_details, opts = {}) ⇒ Response
Updates a data source.
-
#update_knowledge_base(knowledge_base_id, update_knowledge_base_details, opts = {}) ⇒ Response
Updates a knowledge base.
-
#update_tool(tool_id, update_tool_details, opts = {}) ⇒ Response
Updates a tool.
Constructor Details
#initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) ⇒ GenerativeAiAgentClient
Creates a new GenerativeAiAgentClient. Notes: If a config is not specified, then the global OCI.config will be used.
This client is not thread-safe
Either a region or an endpoint must be specified. If an endpoint is specified, it will be used instead of the region. A region may be specified in the config or via or the region parameter. If specified in both, then the region parameter will be used.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 63 def initialize(config: nil, region: nil, endpoint: nil, signer: nil, proxy_settings: nil, retry_config: nil) # If the signer is an InstancePrincipalsSecurityTokenSigner or SecurityTokenSigner and no config was supplied (they are self-sufficient signers) # then create a dummy config to pass to the ApiClient constructor. If customers wish to create a client which uses instance principals # and has config (either populated programmatically or loaded from a file), they must construct that config themselves and then # pass it to this constructor. # # If there is no signer (or the signer is not an instance principals signer) and no config was supplied, this is not valid # so try and load the config from the default file. config = OCI::Config.validate_and_build_config_with_signer(config, signer) signer = OCI::Signer.config_file_auth_builder(config) if signer.nil? @api_client = OCI::ApiClient.new(config, signer, proxy_settings: proxy_settings) @retry_config = retry_config if endpoint @endpoint = endpoint + '/20240531' else region ||= config.region region ||= signer.region if signer.respond_to?(:region) self.region = region end logger.info "GenerativeAiAgentClient endpoint set to '#{@endpoint}'." if logger end |
Instance Attribute Details
#api_client ⇒ OCI::ApiClient (readonly)
Client used to make HTTP requests.
23 24 25 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 23 def api_client @api_client end |
#endpoint ⇒ String (readonly)
Fully qualified endpoint URL
27 28 29 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 27 def endpoint @endpoint end |
#region ⇒ String
The region, which will usually correspond to a value in Regions::REGION_ENUM.
37 38 39 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 37 def region @region end |
#retry_config ⇒ OCI::Retry::RetryConfig (readonly)
The default retry configuration to apply to all operations in this service client. This can be overridden on a per-operation basis. The default retry configuration value is nil
, which means that an operation will not perform any retries
33 34 35 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 33 def retry_config @retry_config end |
Instance Method Details
#cancel_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use cancel_work_request API.
Cancels a work request.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 129 def cancel_work_request(work_request_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#cancel_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling cancel_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#cancel_work_request') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_agent_compartment(agent_id, change_agent_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_agent_compartment API.
Moves an agent into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
201 202 203 204 205 206 207 208 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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 201 def change_agent_compartment(agent_id, change_agent_compartment_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#change_agent_compartment.' if logger raise "Missing the required parameter 'agent_id' when calling change_agent_compartment." if agent_id.nil? raise "Missing the required parameter 'change_agent_compartment_details' when calling change_agent_compartment." if change_agent_compartment_details.nil? raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id) path = '/agents/{agentId}/actions/changeCompartment'.sub('{agentId}', agent_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_agent_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#change_agent_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_agent_endpoint_compartment(agent_endpoint_id, change_agent_endpoint_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_agent_endpoint_compartment API.
Moves an endpoint into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
276 277 278 279 280 281 282 283 284 285 286 287 288 289 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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 276 def change_agent_endpoint_compartment(agent_endpoint_id, change_agent_endpoint_compartment_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#change_agent_endpoint_compartment.' if logger raise "Missing the required parameter 'agent_endpoint_id' when calling change_agent_endpoint_compartment." if agent_endpoint_id.nil? raise "Missing the required parameter 'change_agent_endpoint_compartment_details' when calling change_agent_endpoint_compartment." if change_agent_endpoint_compartment_details.nil? raise "Parameter value for 'agent_endpoint_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_endpoint_id) path = '/agentEndpoints/{agentEndpointId}/actions/changeCompartment'.sub('{agentEndpointId}', agent_endpoint_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_agent_endpoint_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#change_agent_endpoint_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_compartment_details, opts = {}) ⇒ Response
Click here to see an example of how to use change_knowledge_base_compartment API.
Moves a knowledge base into a different compartment within the same tenancy. For information about moving resources between compartments, see Moving Resources to a Different Compartment.
351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 351 def change_knowledge_base_compartment(knowledge_base_id, change_knowledge_base_compartment_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#change_knowledge_base_compartment.' if logger raise "Missing the required parameter 'knowledge_base_id' when calling change_knowledge_base_compartment." if knowledge_base_id.nil? raise "Missing the required parameter 'change_knowledge_base_compartment_details' when calling change_knowledge_base_compartment." if change_knowledge_base_compartment_details.nil? raise "Parameter value for 'knowledge_base_id' must not be blank" if OCI::Internal::Util.blank_string?(knowledge_base_id) path = '/knowledgeBases/{knowledgeBaseId}/actions/changeCompartment'.sub('{knowledgeBaseId}', knowledge_base_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(change_knowledge_base_compartment_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#change_knowledge_base_compartment') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#create_agent(create_agent_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_agent API.
Creates an agent.
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 453 454 455 456 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 419 def create_agent(create_agent_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_agent.' if logger raise "Missing the required parameter 'create_agent_details' when calling create_agent." if create_agent_details.nil? path = '/agents' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_agent_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_agent') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::Agent' ) end # rubocop:enable Metrics/BlockLength end |
#create_agent_endpoint(create_agent_endpoint_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_agent_endpoint API.
Creates an endpoint.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 485 def create_agent_endpoint(create_agent_endpoint_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_agent_endpoint.' if logger raise "Missing the required parameter 'create_agent_endpoint_details' when calling create_agent_endpoint." if create_agent_endpoint_details.nil? path = '/agentEndpoints' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_agent_endpoint_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_agent_endpoint') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::AgentEndpoint' ) end # rubocop:enable Metrics/BlockLength end |
#create_data_ingestion_job(create_data_ingestion_job_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_data_ingestion_job API.
Creates a data ingestion job.
551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 551 def create_data_ingestion_job(create_data_ingestion_job_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_data_ingestion_job.' if logger raise "Missing the required parameter 'create_data_ingestion_job_details' when calling create_data_ingestion_job." if create_data_ingestion_job_details.nil? path = '/dataIngestionJobs' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_data_ingestion_job_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_data_ingestion_job') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataIngestionJob' ) end # rubocop:enable Metrics/BlockLength end |
#create_data_source(create_data_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_data_source API.
Creates a data source.
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 642 643 644 645 646 647 648 649 650 651 652 653 654 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 617 def create_data_source(create_data_source_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_data_source.' if logger raise "Missing the required parameter 'create_data_source_details' when calling create_data_source." if create_data_source_details.nil? path = '/dataSources' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_data_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_data_source') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataSource' ) end # rubocop:enable Metrics/BlockLength end |
#create_knowledge_base(create_knowledge_base_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_knowledge_base API.
Creates a knowledge base.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 683 def create_knowledge_base(create_knowledge_base_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_knowledge_base.' if logger raise "Missing the required parameter 'create_knowledge_base_details' when calling create_knowledge_base." if create_knowledge_base_details.nil? path = '/knowledgeBases' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_knowledge_base_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_knowledge_base') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::KnowledgeBase' ) end # rubocop:enable Metrics/BlockLength end |
#create_tool(create_tool_details, opts = {}) ⇒ Response
Click here to see an example of how to use create_tool API.
Creates a tool.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 749 def create_tool(create_tool_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#create_tool.' if logger raise "Missing the required parameter 'create_tool_details' when calling create_tool." if create_tool_details.nil? path = '/tools' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-retry-token'] = opts[:opc_retry_token] if opts[:opc_retry_token] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf header_params[:'opc-retry-token'] ||= OCI::Retry.generate_opc_retry_token post_body = @api_client.object_to_http_body(create_tool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#create_tool') do @api_client.call_api( :POST, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::Tool' ) end # rubocop:enable Metrics/BlockLength end |
#delete_agent(agent_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_agent API.
Deletes an agent.
814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 814 def delete_agent(agent_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_agent.' if logger raise "Missing the required parameter 'agent_id' when calling delete_agent." if agent_id.nil? raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id) path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_agent') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_agent_endpoint(agent_endpoint_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_agent_endpoint API.
Deletes an endpoint.
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 878 def delete_agent_endpoint(agent_endpoint_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_agent_endpoint.' if logger raise "Missing the required parameter 'agent_endpoint_id' when calling delete_agent_endpoint." if agent_endpoint_id.nil? raise "Parameter value for 'agent_endpoint_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_endpoint_id) path = '/agentEndpoints/{agentEndpointId}'.sub('{agentEndpointId}', agent_endpoint_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_agent_endpoint') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_data_ingestion_job(data_ingestion_job_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_data_ingestion_job API.
Deletes a data ingestion job.
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 973 974 975 976 977 978 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 942 def delete_data_ingestion_job(data_ingestion_job_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_data_ingestion_job.' if logger raise "Missing the required parameter 'data_ingestion_job_id' when calling delete_data_ingestion_job." if data_ingestion_job_id.nil? raise "Parameter value for 'data_ingestion_job_id' must not be blank" if OCI::Internal::Util.blank_string?(data_ingestion_job_id) path = '/dataIngestionJobs/{dataIngestionJobId}'.sub('{dataIngestionJobId}', data_ingestion_job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_data_ingestion_job') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_data_source(data_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_data_source API.
Deletes a data source.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1006 def delete_data_source(data_source_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_data_source.' if logger raise "Missing the required parameter 'data_source_id' when calling delete_data_source." if data_source_id.nil? raise "Parameter value for 'data_source_id' must not be blank" if OCI::Internal::Util.blank_string?(data_source_id) path = '/dataSources/{dataSourceId}'.sub('{dataSourceId}', data_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_data_source') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_knowledge_base API.
Deletes a knowledge base.
1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1070 def delete_knowledge_base(knowledge_base_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_knowledge_base.' if logger raise "Missing the required parameter 'knowledge_base_id' when calling delete_knowledge_base." if knowledge_base_id.nil? raise "Parameter value for 'knowledge_base_id' must not be blank" if OCI::Internal::Util.blank_string?(knowledge_base_id) path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_knowledge_base') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#delete_tool(tool_id, opts = {}) ⇒ Response
Click here to see an example of how to use delete_tool API.
Deletes a tool.
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1134 def delete_tool(tool_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#delete_tool.' if logger raise "Missing the required parameter 'tool_id' when calling delete_tool." if tool_id.nil? raise "Parameter value for 'tool_id' must not be blank" if OCI::Internal::Util.blank_string?(tool_id) path = '/tools/{toolId}'.sub('{toolId}', tool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#delete_tool') do @api_client.call_api( :DELETE, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#get_agent(agent_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_agent API.
Gets information about an agent.
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 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1193 def get_agent(agent_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_agent.' if logger raise "Missing the required parameter 'agent_id' when calling get_agent." if agent_id.nil? raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id) path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_agent') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::Agent' ) end # rubocop:enable Metrics/BlockLength end |
#get_agent_endpoint(agent_endpoint_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_agent_endpoint API.
Gets information about an endpoint.
1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1252 def get_agent_endpoint(agent_endpoint_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_agent_endpoint.' if logger raise "Missing the required parameter 'agent_endpoint_id' when calling get_agent_endpoint." if agent_endpoint_id.nil? raise "Parameter value for 'agent_endpoint_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_endpoint_id) path = '/agentEndpoints/{agentEndpointId}'.sub('{agentEndpointId}', agent_endpoint_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_agent_endpoint') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::AgentEndpoint' ) end # rubocop:enable Metrics/BlockLength end |
#get_data_ingestion_job(data_ingestion_job_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_data_ingestion_job API.
Gets information about a data ingestion job.
1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1311 def get_data_ingestion_job(data_ingestion_job_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_data_ingestion_job.' if logger raise "Missing the required parameter 'data_ingestion_job_id' when calling get_data_ingestion_job." if data_ingestion_job_id.nil? raise "Parameter value for 'data_ingestion_job_id' must not be blank" if OCI::Internal::Util.blank_string?(data_ingestion_job_id) path = '/dataIngestionJobs/{dataIngestionJobId}'.sub('{dataIngestionJobId}', data_ingestion_job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_data_ingestion_job') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataIngestionJob' ) end # rubocop:enable Metrics/BlockLength end |
#get_data_ingestion_job_log_content(data_ingestion_job_id, opts = {}, &block) ⇒ Response
Click here to see an example of how to use get_data_ingestion_job_log_content API.
Returns the raw log file for the specified data ingestion job in text format.
1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1372 def get_data_ingestion_job_log_content(data_ingestion_job_id, opts = {}, &block) logger.debug 'Calling operation GenerativeAiAgentClient#get_data_ingestion_job_log_content.' if logger raise "Missing the required parameter 'data_ingestion_job_id' when calling get_data_ingestion_job_log_content." if data_ingestion_job_id.nil? raise "Parameter value for 'data_ingestion_job_id' must not be blank" if OCI::Internal::Util.blank_string?(data_ingestion_job_id) path = '/dataIngestionJobs/{dataIngestionJobId}/logs/content'.sub('{dataIngestionJobId}', data_ingestion_job_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = opts[:accept] if opts[:accept] header_params[:accept] ||= 'text/plain; charset=utf-8' header_params[:'accept-encoding'] = opts[:accept_encoding] if opts[:accept_encoding] header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_data_ingestion_job_log_content') do if !block.nil? @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &block ) elsif opts[:response_target] if opts[:response_target].respond_to? :write @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| opts[:response_target].write(chunk) } ) elsif opts[:response_target].is_a?(String) File.open(opts[:response_target], 'wb') do |output| return @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'Stream', &proc { |chunk, _response| output.write(chunk) } ) end end else @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'String' ) end end # rubocop:enable Metrics/BlockLength end |
#get_data_source(data_source_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_data_source API.
Gets information about a data source.
1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1475 def get_data_source(data_source_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_data_source.' if logger raise "Missing the required parameter 'data_source_id' when calling get_data_source." if data_source_id.nil? raise "Parameter value for 'data_source_id' must not be blank" if OCI::Internal::Util.blank_string?(data_source_id) path = '/dataSources/{dataSourceId}'.sub('{dataSourceId}', data_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_data_source') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataSource' ) end # rubocop:enable Metrics/BlockLength end |
#get_knowledge_base(knowledge_base_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_knowledge_base API.
Gets information about a knowledge base.
1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1534 def get_knowledge_base(knowledge_base_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_knowledge_base.' if logger raise "Missing the required parameter 'knowledge_base_id' when calling get_knowledge_base." if knowledge_base_id.nil? raise "Parameter value for 'knowledge_base_id' must not be blank" if OCI::Internal::Util.blank_string?(knowledge_base_id) path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_knowledge_base') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::KnowledgeBase' ) end # rubocop:enable Metrics/BlockLength end |
#get_tool(tool_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_tool API.
Gets information about a tool.
1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1593 def get_tool(tool_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_tool.' if logger raise "Missing the required parameter 'tool_id' when calling get_tool." if tool_id.nil? raise "Parameter value for 'tool_id' must not be blank" if OCI::Internal::Util.blank_string?(tool_id) path = '/tools/{toolId}'.sub('{toolId}', tool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_tool') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::Tool' ) end # rubocop:enable Metrics/BlockLength end |
#get_work_request(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use get_work_request API.
Gets the details of a work request.
1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1652 def get_work_request(work_request_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#get_work_request.' if logger raise "Missing the required parameter 'work_request_id' when calling get_work_request." if work_request_id.nil? raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#get_work_request') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::WorkRequest' ) end # rubocop:enable Metrics/BlockLength end |
#list_agent_endpoints(opts = {}) ⇒ Response
Click here to see an example of how to use list_agent_endpoints API.
Gets a list of endpoints.
1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1729 def list_agent_endpoints(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_agent_endpoints.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::AgentEndpoint::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::AgentEndpoint::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/agentEndpoints' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:agentId] = opts[:agent_id] if opts[:agent_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_agent_endpoints') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::AgentEndpointCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_agents(opts = {}) ⇒ Response
Click here to see an example of how to use list_agents API.
Gets a list of agents.
1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1823 def list_agents(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_agents.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::Agent::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::Agent::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/agents' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_agents') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::AgentCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_data_ingestion_jobs(opts = {}) ⇒ Response
Click here to see an example of how to use list_data_ingestion_jobs API.
Gets a list of data ingestion jobs.
1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 1917 def list_data_ingestion_jobs(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_data_ingestion_jobs.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::DataIngestionJob::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::DataIngestionJob::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/dataIngestionJobs' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:dataSourceId] = opts[:data_source_id] if opts[:data_source_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_data_ingestion_jobs') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataIngestionJobCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_data_sources(opts = {}) ⇒ Response
Click here to see an example of how to use list_data_sources API.
Gets a list of data sources.
2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2012 def list_data_sources(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_data_sources.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::DataSource::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::DataSource::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/dataSources' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:knowledgeBaseId] = opts[:knowledge_base_id] if opts[:knowledge_base_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_data_sources') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::DataSourceCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_knowledge_bases(opts = {}) ⇒ Response
Click here to see an example of how to use list_knowledge_bases API.
Gets a list of knowledge bases.
2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2106 def list_knowledge_bases(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_knowledge_bases.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::KnowledgeBase::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::KnowledgeBase::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/knowledgeBases' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_knowledge_bases') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::KnowledgeBaseCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_tools(opts = {}) ⇒ Response
Click here to see an example of how to use list_tools API.
Gets a list of tools.
2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2200 def list_tools(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_tools.' if logger if opts[:lifecycle_state] && !OCI::GenerativeAiAgent::Models::Tool::LIFECYCLE_STATE_ENUM.include?(opts[:lifecycle_state]) raise 'Invalid value for "lifecycle_state", must be one of the values in OCI::GenerativeAiAgent::Models::Tool::LIFECYCLE_STATE_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeCreated displayName].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeCreated, displayName.' end path = '/tools' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:lifecycleState] = opts[:lifecycle_state] if opts[:lifecycle_state] query_params[:displayName] = opts[:display_name] if opts[:display_name] query_params[:agentId] = opts[:agent_id] if opts[:agent_id] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:page] = opts[:page] if opts[:page] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_tools') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::ToolCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_errors(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_errors API.
Lists the errors for a work request.
Allowed values are: timestamp
2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2289 def list_work_request_errors(work_request_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_work_request_errors.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_errors." if work_request_id.nil? if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timestamp.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/errors'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_work_request_errors') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::WorkRequestErrorCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_request_logs(work_request_id, opts = {}) ⇒ Response
Click here to see an example of how to use list_work_request_logs API.
Lists the logs for a work request.
Allowed values are: timestamp
2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2372 def list_work_request_logs(work_request_id, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_work_request_logs.' if logger raise "Missing the required parameter 'work_request_id' when calling list_work_request_logs." if work_request_id.nil? if opts[:sort_by] && !%w[timestamp].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timestamp.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end raise "Parameter value for 'work_request_id' must not be blank" if OCI::Internal::Util.blank_string?(work_request_id) path = '/workRequests/{workRequestId}/logs'.sub('{workRequestId}', work_request_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_work_request_logs') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::WorkRequestLogEntryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#list_work_requests(opts = {}) ⇒ Response
Click here to see an example of how to use list_work_requests API.
Lists the work requests in a compartment.
Allowed values are: timeAccepted
2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2458 def list_work_requests(opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#list_work_requests.' if logger if opts[:status] && !OCI::GenerativeAiAgent::Models::OPERATION_STATUS_ENUM.include?(opts[:status]) raise 'Invalid value for "status", must be one of the values in OCI::GenerativeAiAgent::Models::OPERATION_STATUS_ENUM.' end if opts[:sort_order] && !OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.include?(opts[:sort_order]) raise 'Invalid value for "sort_order", must be one of the values in OCI::GenerativeAiAgent::Models::SORT_ORDER_ENUM.' end if opts[:sort_by] && !%w[timeAccepted].include?(opts[:sort_by]) raise 'Invalid value for "sort_by", must be one of timeAccepted.' end path = '/workRequests' operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} query_params[:compartmentId] = opts[:compartment_id] if opts[:compartment_id] query_params[:workRequestId] = opts[:work_request_id] if opts[:work_request_id] query_params[:status] = opts[:status] if opts[:status] query_params[:resourceId] = opts[:resource_id] if opts[:resource_id] query_params[:page] = opts[:page] if opts[:page] query_params[:limit] = opts[:limit] if opts[:limit] query_params[:sortOrder] = opts[:sort_order] if opts[:sort_order] query_params[:sortBy] = opts[:sort_by] if opts[:sort_by] # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = nil # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#list_work_requests') do @api_client.call_api( :GET, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body, return_type: 'OCI::GenerativeAiAgent::Models::WorkRequestSummaryCollection' ) end # rubocop:enable Metrics/BlockLength end |
#logger ⇒ Logger
Returns The logger for this client. May be nil.
102 103 104 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 102 def logger @api_client.config.logger end |
#update_agent(agent_id, update_agent_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_agent API.
Updates an agent.
2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2541 def update_agent(agent_id, update_agent_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#update_agent.' if logger raise "Missing the required parameter 'agent_id' when calling update_agent." if agent_id.nil? raise "Missing the required parameter 'update_agent_details' when calling update_agent." if update_agent_details.nil? raise "Parameter value for 'agent_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_id) path = '/agents/{agentId}'.sub('{agentId}', agent_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_agent_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#update_agent') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_agent_endpoint(agent_endpoint_id, update_agent_endpoint_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_agent_endpoint API.
Updates an endpoint.
2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2607 def update_agent_endpoint(agent_endpoint_id, update_agent_endpoint_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#update_agent_endpoint.' if logger raise "Missing the required parameter 'agent_endpoint_id' when calling update_agent_endpoint." if agent_endpoint_id.nil? raise "Missing the required parameter 'update_agent_endpoint_details' when calling update_agent_endpoint." if update_agent_endpoint_details.nil? raise "Parameter value for 'agent_endpoint_id' must not be blank" if OCI::Internal::Util.blank_string?(agent_endpoint_id) path = '/agentEndpoints/{agentEndpointId}'.sub('{agentEndpointId}', agent_endpoint_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_agent_endpoint_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#update_agent_endpoint') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_data_source(data_source_id, update_data_source_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_data_source API.
Updates a data source.
2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2673 def update_data_source(data_source_id, update_data_source_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#update_data_source.' if logger raise "Missing the required parameter 'data_source_id' when calling update_data_source." if data_source_id.nil? raise "Missing the required parameter 'update_data_source_details' when calling update_data_source." if update_data_source_details.nil? raise "Parameter value for 'data_source_id' must not be blank" if OCI::Internal::Util.blank_string?(data_source_id) path = '/dataSources/{dataSourceId}'.sub('{dataSourceId}', data_source_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_data_source_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#update_data_source') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_knowledge_base(knowledge_base_id, update_knowledge_base_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_knowledge_base API.
Updates a knowledge base.
2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2739 def update_knowledge_base(knowledge_base_id, update_knowledge_base_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#update_knowledge_base.' if logger raise "Missing the required parameter 'knowledge_base_id' when calling update_knowledge_base." if knowledge_base_id.nil? raise "Missing the required parameter 'update_knowledge_base_details' when calling update_knowledge_base." if update_knowledge_base_details.nil? raise "Parameter value for 'knowledge_base_id' must not be blank" if OCI::Internal::Util.blank_string?(knowledge_base_id) path = '/knowledgeBases/{knowledgeBaseId}'.sub('{knowledgeBaseId}', knowledge_base_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_knowledge_base_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#update_knowledge_base') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |
#update_tool(tool_id, update_tool_details, opts = {}) ⇒ Response
Click here to see an example of how to use update_tool API.
Updates a tool.
2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 |
# File 'lib/oci/generative_ai_agent/generative_ai_agent_client.rb', line 2805 def update_tool(tool_id, update_tool_details, opts = {}) logger.debug 'Calling operation GenerativeAiAgentClient#update_tool.' if logger raise "Missing the required parameter 'tool_id' when calling update_tool." if tool_id.nil? raise "Missing the required parameter 'update_tool_details' when calling update_tool." if update_tool_details.nil? raise "Parameter value for 'tool_id' must not be blank" if OCI::Internal::Util.blank_string?(tool_id) path = '/tools/{toolId}'.sub('{toolId}', tool_id.to_s) operation_signing_strategy = :standard # rubocop:disable Style/NegatedIf # Query Params query_params = {} # Header Params header_params = {} header_params[:accept] = 'application/json' header_params[:'content-type'] = 'application/json' header_params[:'if-match'] = opts[:if_match] if opts[:if_match] header_params[:'opc-request-id'] = opts[:opc_request_id] if opts[:opc_request_id] # rubocop:enable Style/NegatedIf post_body = @api_client.object_to_http_body(update_tool_details) # rubocop:disable Metrics/BlockLength OCI::Retry.(applicable_retry_config(opts), call_name: 'GenerativeAiAgentClient#update_tool') do @api_client.call_api( :PUT, path, endpoint, header_params: header_params, query_params: query_params, operation_signing_strategy: operation_signing_strategy, body: post_body ) end # rubocop:enable Metrics/BlockLength end |