SqlToolConfig

class oci.generative_ai_agent.models.SqlToolConfig(**kwargs)

Bases: ToolConfig

The configuration for SQL Tool.

Attributes:

DIALECT_ORACLE_SQL

A constant which can be used with the dialect property of a SqlToolConfig.

DIALECT_SQL_LITE

A constant which can be used with the dialect property of a SqlToolConfig.

MODEL_SIZE_LARGE

A constant which can be used with the model_size property of a SqlToolConfig.

MODEL_SIZE_SMALL

A constant which can be used with the model_size property of a SqlToolConfig.

TOOL_CONFIG_TYPE_AGENT_TOOL_CONFIG

A constant which can be used with the tool_config_type property of a ToolConfig.

TOOL_CONFIG_TYPE_FUNCTION_CALLING_TOOL_CONFIG

A constant which can be used with the tool_config_type property of a ToolConfig.

TOOL_CONFIG_TYPE_HTTP_ENDPOINT_TOOL_CONFIG

A constant which can be used with the tool_config_type property of a ToolConfig.

TOOL_CONFIG_TYPE_RAG_TOOL_CONFIG

A constant which can be used with the tool_config_type property of a ToolConfig.

TOOL_CONFIG_TYPE_SQL_TOOL_CONFIG

A constant which can be used with the tool_config_type property of a ToolConfig.

database_connection

Gets the database_connection of this SqlToolConfig.

database_schema

Gets the database_schema of this SqlToolConfig.

dialect

[Required] Gets the dialect of this SqlToolConfig.

generation_llm_customization

Gets the generation_llm_customization of this SqlToolConfig.

icl_examples

Gets the icl_examples of this SqlToolConfig.

model_size

Gets the model_size of this SqlToolConfig.

runtime_version

Gets the runtime_version of this SqlToolConfig.

should_enable_self_correction

Gets the should_enable_self_correction of this SqlToolConfig.

should_enable_sql_execution

Gets the should_enable_sql_execution of this SqlToolConfig.

table_and_column_description

Gets the table_and_column_description of this SqlToolConfig.

tool_config_type

[Required] Gets the tool_config_type of this ToolConfig.

Methods:

__init__(**kwargs)

Initializes a new SqlToolConfig object with values from keyword arguments.

get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

DIALECT_ORACLE_SQL = 'ORACLE_SQL'

A constant which can be used with the dialect property of a SqlToolConfig. This constant has a value of “ORACLE_SQL”

DIALECT_SQL_LITE = 'SQL_LITE'

A constant which can be used with the dialect property of a SqlToolConfig. This constant has a value of “SQL_LITE”

MODEL_SIZE_LARGE = 'LARGE'

A constant which can be used with the model_size property of a SqlToolConfig. This constant has a value of “LARGE”

MODEL_SIZE_SMALL = 'SMALL'

A constant which can be used with the model_size property of a SqlToolConfig. This constant has a value of “SMALL”

TOOL_CONFIG_TYPE_AGENT_TOOL_CONFIG = 'AGENT_TOOL_CONFIG'

A constant which can be used with the tool_config_type property of a ToolConfig. This constant has a value of “AGENT_TOOL_CONFIG”

TOOL_CONFIG_TYPE_FUNCTION_CALLING_TOOL_CONFIG = 'FUNCTION_CALLING_TOOL_CONFIG'

A constant which can be used with the tool_config_type property of a ToolConfig. This constant has a value of “FUNCTION_CALLING_TOOL_CONFIG”

TOOL_CONFIG_TYPE_HTTP_ENDPOINT_TOOL_CONFIG = 'HTTP_ENDPOINT_TOOL_CONFIG'

A constant which can be used with the tool_config_type property of a ToolConfig. This constant has a value of “HTTP_ENDPOINT_TOOL_CONFIG”

TOOL_CONFIG_TYPE_RAG_TOOL_CONFIG = 'RAG_TOOL_CONFIG'

A constant which can be used with the tool_config_type property of a ToolConfig. This constant has a value of “RAG_TOOL_CONFIG”

TOOL_CONFIG_TYPE_SQL_TOOL_CONFIG = 'SQL_TOOL_CONFIG'

A constant which can be used with the tool_config_type property of a ToolConfig. This constant has a value of “SQL_TOOL_CONFIG”

__init__(**kwargs)

Initializes a new SqlToolConfig object with values from keyword arguments. The default value of the tool_config_type attribute of this class is SQL_TOOL_CONFIG and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters
  • tool_config_type (str) – The value to assign to the tool_config_type property of this SqlToolConfig. Allowed values for this property are: “SQL_TOOL_CONFIG”, “RAG_TOOL_CONFIG”, “FUNCTION_CALLING_TOOL_CONFIG”, “HTTP_ENDPOINT_TOOL_CONFIG”, “AGENT_TOOL_CONFIG”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • icl_examples (oci.generative_ai_agent.models.InputLocation) – The value to assign to the icl_examples property of this SqlToolConfig.

  • database_schema (oci.generative_ai_agent.models.InputLocation) – The value to assign to the database_schema property of this SqlToolConfig.

  • should_enable_sql_execution (bool) – The value to assign to the should_enable_sql_execution property of this SqlToolConfig.

  • dialect (str) – The value to assign to the dialect property of this SqlToolConfig. Allowed values for this property are: “SQL_LITE”, “ORACLE_SQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • model_size (str) – The value to assign to the model_size property of this SqlToolConfig. Allowed values for this property are: “SMALL”, “LARGE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

  • should_enable_self_correction (bool) – The value to assign to the should_enable_self_correction property of this SqlToolConfig.

  • table_and_column_description (oci.generative_ai_agent.models.InputLocation) – The value to assign to the table_and_column_description property of this SqlToolConfig.

  • generation_llm_customization (oci.generative_ai_agent.models.LlmCustomization) – The value to assign to the generation_llm_customization property of this SqlToolConfig.

  • database_connection (oci.generative_ai_agent.models.DatabaseConnection) – The value to assign to the database_connection property of this SqlToolConfig.

  • runtime_version (str) – The value to assign to the runtime_version property of this SqlToolConfig.

property database_connection

Gets the database_connection of this SqlToolConfig.

Returns

The database_connection of this SqlToolConfig.

Return type

oci.generative_ai_agent.models.DatabaseConnection

property database_schema

Gets the database_schema of this SqlToolConfig.

Returns

The database_schema of this SqlToolConfig.

Return type

oci.generative_ai_agent.models.InputLocation

property dialect

[Required] Gets the dialect of this SqlToolConfig. Dialect to be used for SQL generation.

Allowed values for this property are: “SQL_LITE”, “ORACLE_SQL”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The dialect of this SqlToolConfig.

Return type

str

property generation_llm_customization

Gets the generation_llm_customization of this SqlToolConfig.

Returns

The generation_llm_customization of this SqlToolConfig.

Return type

oci.generative_ai_agent.models.LlmCustomization

static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

property icl_examples

Gets the icl_examples of this SqlToolConfig.

Returns

The icl_examples of this SqlToolConfig.

Return type

oci.generative_ai_agent.models.InputLocation

property model_size

Gets the model_size of this SqlToolConfig. Size of the model.

Allowed values for this property are: “SMALL”, “LARGE”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The model_size of this SqlToolConfig.

Return type

str

property runtime_version

Gets the runtime_version of this SqlToolConfig. The runtimeVersion of the system prompt.

Returns

The runtime_version of this SqlToolConfig.

Return type

str

property should_enable_self_correction

Gets the should_enable_self_correction of this SqlToolConfig. To enable/disable self correction.

Returns

The should_enable_self_correction of this SqlToolConfig.

Return type

bool

property should_enable_sql_execution

Gets the should_enable_sql_execution of this SqlToolConfig. To enable/disable SQL execution.

Returns

The should_enable_sql_execution of this SqlToolConfig.

Return type

bool

property table_and_column_description

Gets the table_and_column_description of this SqlToolConfig.

Returns

The table_and_column_description of this SqlToolConfig.

Return type

oci.generative_ai_agent.models.InputLocation

property tool_config_type

[Required] Gets the tool_config_type of this ToolConfig. The type of the Tool config.

Allowed values for this property are: “SQL_TOOL_CONFIG”, “RAG_TOOL_CONFIG”, “FUNCTION_CALLING_TOOL_CONFIG”, “HTTP_ENDPOINT_TOOL_CONFIG”, “AGENT_TOOL_CONFIG”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns

The tool_config_type of this ToolConfig.

Return type

str