# 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
update_agent_endpoint_response =
generative_ai_agent_client.update_agent_endpoint(
'ocid1.test.oc1..<unique_ID>EXAMPLE-agentEndpointId-Value',
OCI::GenerativeAiAgent::Models::UpdateAgentEndpointDetails.new(
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: 'DISABLE', 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: 'BLOCK'
)
),
metadata: { 'EXAMPLE_KEY_6PhIB' => 'EXAMPLE_VALUE_kL4rkNHMH7t2KR0hyt0M' },
human_input_config:
OCI::GenerativeAiAgent::Models::HumanInputConfig.new(
should_enable_human_input: false
),
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: 665
),
should_enable_trace: false,
should_enable_citation: true,
should_enable_multi_language: false,
session_config:
OCI::GenerativeAiAgent::Models::SessionConfig.new(
idle_timeout_in_seconds: 126
),
provisioned_capacity_config:
OCI::GenerativeAiAgent::Models::ProvisionedCapacityConfig.new(
provisioned_capacity_id:
'ocid1.test.oc1..<unique_ID>EXAMPLE-provisionedCapacityId-Value',
platform_runtime_config:
OCI::GenerativeAiAgent::Models::PlatformRuntimeConfig.new(
platform_runtime_config_type: 'AGENT_PLATFORM',
version: 'EXAMPLE-version-Value'
),
tool_runtime_configs: [
OCI::GenerativeAiAgent::Models::ToolRuntimeConfig.new(
tool_runtime_config_type: 'SQL_LARGE',
version: 'EXAMPLE-version-Value'
)
]
),
freeform_tags: {
'EXAMPLE_KEY_Hx2N3' => 'EXAMPLE_VALUE_1vbkHhgnprt8GriswYC5'
},
defined_tags: {
'EXAMPLE_KEY_8H9Sd' => { 'EXAMPLE_KEY_2VejT' => 'EXAMPLE--Value' }
}
)
)
# Get the data from response
puts "#{update_agent_endpoint_response.headers}"