// 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).

import * as generativeaiagent from "oci-generativeaiagent";
import common = require("oci-common");

// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.

const provider: common.ConfigFileAuthenticationDetailsProvider = new common.ConfigFileAuthenticationDetailsProvider();

(async () => {
    try {
     // Create a service client
     const client = new generativeaiagent.GenerativeAiAgentClient({ authenticationDetailsProvider: provider });

     // Create a request and dependent object(s).
	const  createAgentEndpointDetails = {
		displayName: "EXAMPLE-displayName-Value",
		description: "EXAMPLE-description-Value",
		agentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value",
		contentModerationConfig: {
			shouldEnableOnInput: true,
			shouldEnableOnOutput: false,

			}
,
		guardrailConfig: {
			contentModerationConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Block,
				outputGuardrailMode: generativeaiagent.models.GuardrailMode.Inform,

				}
,
			promptInjectionConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Disable,

				}
,
			personallyIdentifiableInformationConfig: {
				inputGuardrailMode: generativeaiagent.models.GuardrailMode.Inform,
				outputGuardrailMode: generativeaiagent.models.GuardrailMode.Disable,

				}
,

			}
,
		metadata: {
			EXAMPLE_KEY_md7ax :"EXAMPLE_VALUE_PXOadOGJ5vbGNr95JDrX"
			},
		humanInputConfig: {
			shouldEnableHumanInput: true,

			}
,
		outputConfig: {
			outputLocation: {
				outputLocationType: "OBJECT_STORAGE_PREFIX",				namespaceName: "EXAMPLE-namespaceName-Value",
				bucketName: "EXAMPLE-bucketName-Value",
				prefix: "EXAMPLE-prefix-Value"

				}
,
			retentionPeriodInMinutes: 713,

			}
,
		shouldEnableTrace: true,
		shouldEnableCitation: false,
		shouldEnableSession: true,
		shouldEnableMultiLanguage: true,
		sessionConfig: {
			idleTimeoutInSeconds: 84,

			}
,
		compartmentId: "ocid1.test.oc1..<unique_ID>EXAMPLE-compartmentId-Value",
		provisionedCapacityConfig: {
			provisionedCapacityId: "ocid1.test.oc1..<unique_ID>EXAMPLE-provisionedCapacityId-Value",
			platformRuntimeConfig: {
				platformRuntimeConfigType: generativeaiagent.models.PlatformRuntimeConfig.PlatformRuntimeConfigType.FusionReasoning,
				version: "EXAMPLE-version-Value",

				}
,
			toolRuntimeConfigs: [{
					toolRuntimeConfigType: generativeaiagent.models.ToolRuntimeConfig.ToolRuntimeConfigType.Rag,
					version: "EXAMPLE-version-Value",

					}
					],

			}
,
		freeformTags: {
			EXAMPLE_KEY_sp84h :"EXAMPLE_VALUE_NiA746grfgAZ6LO5q9tg"
			},
		definedTags: {
			EXAMPLE_KEY_UsZ4F :{
				EXAMPLE_KEY_gsfH6 :"EXAMPLE--Value"
				}
			},

		}

	const createAgentEndpointRequest: generativeaiagent.requests.CreateAgentEndpointRequest = { 
	createAgentEndpointDetails: createAgentEndpointDetails,
	opcRetryToken: "EXAMPLE-opcRetryToken-Value",
	opcRequestId: "B8CAVTX8BKENEQSGRPKF<unique_ID>",

		}; 


     // Send request to the Client.
     const createAgentEndpointResponse = await client.createAgentEndpoint(createAgentEndpointRequest);
     }
     catch (error) {
         console.log("createAgentEndpoint Failed with error  " + error);
     }
})();