# This is an automatically generated code sample.
# To make this code sample work in your Oracle Cloud tenancy,
# please replace the values for any parameters whose current values do not fit
# your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
# boolean, number, and enum parameters with values not fitting your use case).

require 'oci'

# Create a default config using DEFAULT profile in default location
# Refer to https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File for more info
config = OCI::ConfigFileLoader.load_config

# Initialize service client with default config file
generative_ai_agent_client =
  OCI::GenerativeAiAgent::GenerativeAiAgentClient.new(config: config)

# Send the request to service, some parameters are not required, see API doc for more info
create_agent_endpoint_response =
  generative_ai_agent_client.create_agent_endpoint(
    OCI::GenerativeAiAgent::Models::CreateAgentEndpointDetails.new(
      agent_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value',
      compartment_id: 'ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value',
      display_name: 'EXAMPLE-displayName-Value',
      description: 'EXAMPLE-description-Value',
      content_moderation_config:
        OCI::GenerativeAiAgent::Models::ContentModerationConfig.new(
          should_enable_on_input: false, should_enable_on_output: true
        ),
      guardrail_config:
        OCI::GenerativeAiAgent::Models::GuardrailConfig.new(
          content_moderation_config:
            OCI::GenerativeAiAgent::Models::ContentModerationGuardrailConfig
              .new(
              input_guardrail_mode: 'INFORM', output_guardrail_mode: 'DISABLE'
            ),
          prompt_injection_config:
            OCI::GenerativeAiAgent::Models::PromptInjectionGuardrailConfig.new(
              input_guardrail_mode: 'DISABLE'
            ),
          personally_identifiable_information_config:
            OCI::GenerativeAiAgent::Models::PersonallyIdentifiableInformationGuardrailConfig
              .new(
              input_guardrail_mode: 'DISABLE', output_guardrail_mode: 'DISABLE'
            )
        ),
      metadata: { 'EXAMPLE_KEY_Rl3oA' => 'EXAMPLE_VALUE_q455PHAkeVY5Et2YfE50' },
      human_input_config:
        OCI::GenerativeAiAgent::Models::HumanInputConfig.new(
          should_enable_human_input: true
        ),
      output_config:
        OCI::GenerativeAiAgent::Models::OutputConfig.new(
          output_location:
            OCI::GenerativeAiAgent::Models::ObjectStoragePrefixOutputLocation
              .new(
              output_location_type: 'OBJECT_STORAGE_PREFIX',
              namespace_name: 'EXAMPLE-namespaceName-Value',
              bucket_name: 'EXAMPLE-bucketName-Value',
              prefix: 'EXAMPLE-prefix-Value'
            ),
          retention_period_in_minutes: 501
        ),
      should_enable_trace: true,
      should_enable_citation: true,
      should_enable_session: true,
      should_enable_multi_language: false,
      session_config:
        OCI::GenerativeAiAgent::Models::SessionConfig.new(
          idle_timeout_in_seconds: 52
        ),
      freeform_tags: {
        'EXAMPLE_KEY_29pBi' => 'EXAMPLE_VALUE_b5VK0uqCjyLOxckBWqjp'
      },
      defined_tags: {
        'EXAMPLE_KEY_HEDHx' => { 'EXAMPLE_KEY_cdIuc' => 'EXAMPLE--Value' }
      }
    )
  )

# Get the data from response
puts "#{create_agent_endpoint_response.data}"