oci_generative_ai_agent_tool

This resource provides the Tool resource in Oracle Cloud Infrastructure Generative Ai Agent service.

Creates a tool.

Example Usage

resource "oci_generative_ai_agent_tool" "test_tool" {
	#Required
	agent_id = oci_generative_ai_agent_agent.test_agent.id
	compartment_id = var.compartment_id
	description = var.tool_description
	tool_config {
		#Required
		tool_config_type = var.tool_tool_config_tool_config_type

		#Optional
		api_schema {
			#Required
			api_schema_input_location_type = var.tool_tool_config_api_schema_api_schema_input_location_type

			#Optional
			bucket = var.tool_tool_config_api_schema_bucket
			content = var.tool_tool_config_api_schema_content
			namespace = var.tool_tool_config_api_schema_namespace
			object = var.tool_tool_config_api_schema_object
		}
		database_connection {
			#Required
			connection_id = oci_database_migration_connection.test_connection.id
			connection_type = var.tool_tool_config_database_connection_connection_type
		}
		database_schema {
			#Required
			input_location_type = var.tool_tool_config_database_schema_input_location_type

			#Optional
			bucket = var.tool_tool_config_database_schema_bucket
			content = var.tool_tool_config_database_schema_content
			namespace = var.tool_tool_config_database_schema_namespace
			prefix = var.tool_tool_config_database_schema_prefix
		}
		dialect = var.tool_tool_config_dialect
		function {

			#Optional
			description = var.tool_tool_config_function_description
			name = var.tool_tool_config_function_name
			parameters = var.tool_tool_config_function_parameters
		}
		generation_llm_customization {

			#Optional
			instruction = var.tool_tool_config_generation_llm_customization_instruction
		}
		icl_examples {
			#Required
			input_location_type = var.tool_tool_config_icl_examples_input_location_type

			#Optional
			bucket = var.tool_tool_config_icl_examples_bucket
			content = var.tool_tool_config_icl_examples_content
			namespace = var.tool_tool_config_icl_examples_namespace
			prefix = var.tool_tool_config_icl_examples_prefix
		}
		knowledge_base_configs {

			#Optional
			knowledge_base_id = oci_generative_ai_agent_knowledge_base.test_knowledge_base.id
		}
		model_size = var.tool_tool_config_model_size
		should_enable_self_correction = var.tool_tool_config_should_enable_self_correction
		should_enable_sql_execution = var.tool_tool_config_should_enable_sql_execution
		table_and_column_description {
			#Required
			input_location_type = var.tool_tool_config_table_and_column_description_input_location_type

			#Optional
			bucket = var.tool_tool_config_table_and_column_description_bucket
			content = var.tool_tool_config_table_and_column_description_content
			namespace = var.tool_tool_config_table_and_column_description_namespace
			prefix = var.tool_tool_config_table_and_column_description_prefix
		}
	}

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.tool_display_name
	freeform_tags = {"Department"= "Finance"}
	metadata = var.tool_metadata
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Tool * update - (Defaults to 20 minutes), when updating the Tool * delete - (Defaults to 20 minutes), when destroying the Tool

Import

Tools can be imported using the id, e.g.

$ terraform import oci_generative_ai_agent_tool.test_tool "id"