Class ProfileAttributes
DBMS_CLOUD_AI.CREATE_PROFILE,
SET_ATTRIBUTE, and SET_ATTRIBUTES.
Profile attributes describe the provider, AI model, credential, object selection, prompt behavior, conversation behavior, and RAG/vector-index settings that Select AI uses when answering prompts. Most attributes map to database-side Select AI profile settings; callers can build the payload once for profile creation or reuse it for bulk updates.
For complete runnable sample sources that build ProfileAttributes,
see
CreateProfileSample source and
SetProfileAttributesSample source.
Commonly used profile attributes include:
| Attribute | Description |
|---|---|
provider |
AI provider used by the profile. |
credential_name |
Credential used to access the AI provider, where required. |
model |
AI model used by the profile. |
object_list |
Database objects available for NL2SQL processing. |
object_list_mode |
Controls how database objects are selected for NL2SQL processing. |
temperature |
Controls randomness in model-generated responses. |
max_tokens |
Specifies the maximum number of tokens to generate. |
vector_index_name |
Specifies the vector index associated with the profile. |
The SDK performs basic, deterministic validation of profile attributes where
the constraint can be validated independently of the configured provider or
database version. This includes validation of supported SDK-defined values,
numeric constraints, and basic input structure. Invalid values detected by
the SDK result in an IllegalArgumentException.
Provider-specific, model-specific, database-version-specific, and other
database-side semantic validation is delegated to DBMS_CLOUD_AI and
Oracle Database. Therefore, an attribute value that passes SDK validation
may still be rejected by the database based on the selected provider, model,
database version, or other database-side requirements.
Supported profile attributes, valid values, defaults, requirements, and
provider-specific behavior are defined by Oracle Database and may vary by
database version and provider. See the DBMS_CLOUD_AI Profile
Attributes documentation for the complete and current list.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic ProfileAttributes.Builderbuilder()Creates a builder for profile attributes.static ProfileAttributesfromAttributeMap(Map<String, String> attributes) Builds aProfileAttributesinstance from an attribute name/value map.Returns additional instructions included in Select AI prompts.Returns whether table/column annotations are included in metadata.Returns the Azure OpenAI deployment name.Returns the Azure OpenAI embedding deployment name.Returns the Azure OpenAI resource name.Returns whether generated SQL value matching is case-sensitive.Returns whether table and column comments are included in prompt metadata.Returns whether referential constraints are included in prompt metadata.Returns whether conversation history is enabled for the profile.Returns how many conversation turns are retained for context.Returns the credential name used for provider API calls.Returns unmodeled database attributes preserved for forward-compatible metadata round-tripping.Returns the embedding model name.Returns whether custom source URI metadata is enabled.Returns whether SQL generation is restricted toobject_list.Returns the maximum generated output tokens.getModel()Returns the provider model identifier.Returns the JSON object list supplied to Select AI.Returns how Select AI chooses objects for metadata.Returns the OCI Generative AI API format.Returns the OCI compartment OCID.Returns the OCI dedicated endpoint OCID.Returns the OCI runtime type attribute.Returns the AI provider name.Returns the provider endpoint host/path.Returns the provider region.getRole()Returns the role prompt used by Select AI.getSeed()Returns the deterministic sampling seed.Returns the source language for translation requests.Returns stop tokens used to terminate generation.Returns the target language for translation requests.Returns the provider sampling temperature.Returns the vector index name associated with this profile.Converts non-null attributes to DBMS_CLOUD_AI attribute names and string values.toJson()Serializes the profile attributes using snake_case JSON names.
-
Method Details
-
builder
Creates a builder for profile attributes.- Returns:
- new builder for constructing ProfileAttributes
-
getAnnotations
Returns whether table/column annotations are included in metadata.- Returns:
- annotations flag value, or
nullwhen unset
-
getAdditionalInstructions
Returns additional instructions included in Select AI prompts.- Returns:
- additional instructions, or
nullwhen unset
-
getAzureDeploymentName
Returns the Azure OpenAI deployment name.- Returns:
- Azure deployment name, or
nullwhen unset
-
getAzureEmbeddingDeploymentName
Returns the Azure OpenAI embedding deployment name.- Returns:
- Azure embedding deployment name, or
nullwhen unset
-
getAzureResourceName
Returns the Azure OpenAI resource name.- Returns:
- Azure resource name, or
nullwhen unset
-
getCaseSensitiveValues
Returns whether generated SQL value matching is case-sensitive.- Returns:
- case-sensitive-values flag, or
nullwhen unset
-
getComments
Returns whether table and column comments are included in prompt metadata.- Returns:
- comments flag, or
nullwhen unset
-
getConstraints
Returns whether referential constraints are included in prompt metadata.- Returns:
- constraints flag, or
nullwhen unset
-
getConversation
Returns whether conversation history is enabled for the profile.- Returns:
- conversation flag, or
nullwhen unset
-
getConversationLength
Returns how many conversation turns are retained for context.- Returns:
- configured conversation length, or
nullwhen unset
-
getCredentialName
Returns the credential name used for provider API calls.- Returns:
- credential name, or
nullwhen unset
-
getEmbeddingModel
Returns the embedding model name.- Returns:
- embedding model name, or
nullwhen unset
-
getEnableCustomSourceUri
Returns whether custom source URI metadata is enabled.- Returns:
- custom-source-URI flag, or
nullwhen unset
-
getEnforceObjectList
Returns whether SQL generation is restricted toobject_list.- Returns:
- enforce-object-list flag, or
nullwhen unset
-
getMaxTokens
Returns the maximum generated output tokens.- Returns:
- maximum tokens value, or
nullwhen unset
-
getModel
Returns the provider model identifier.- Returns:
- provider model identifier, or
nullwhen unset
-
getObjectList
Returns the JSON object list supplied to Select AI.- Returns:
- object-list JSON string, or
nullwhen unset
-
getObjectListMode
Returns how Select AI chooses objects for metadata.- Returns:
- object-list mode value, or
nullwhen unset
-
getOciApiformat
Returns the OCI Generative AI API format.- Returns:
- OCI API format value, or
nullwhen unset
-
getOciCompartmentId
Returns the OCI compartment OCID.- Returns:
- OCI compartment ID, or
nullwhen unset
-
getOciEndpointId
Returns the OCI dedicated endpoint OCID.- Returns:
- OCI endpoint ID, or
nullwhen unset
-
getOciRuntimetype
Returns the OCI runtime type attribute.- Returns:
- OCI runtime type value, or
nullwhen unset
-
getProvider
Returns the AI provider name.- Returns:
- provider name, or
nullwhen unset
-
getProviderEndpoint
Returns the provider endpoint host/path.- Returns:
- provider endpoint value, or
nullwhen unset
-
getRegion
Returns the provider region.- Returns:
- configured region value, or
nullwhen unset
-
getRole
Returns the role prompt used by Select AI.- Returns:
- role prompt, or
nullwhen unset
-
getSeed
Returns the deterministic sampling seed.- Returns:
- deterministic sampling seed, or
nullwhen unset
-
getStopTokens
Returns stop tokens used to terminate generation.- Returns:
- configured stop-token list, or
nullwhen unset
-
getTemperature
Returns the provider sampling temperature.- Returns:
- sampling temperature, or
nullwhen unset
-
getVectorIndexName
Returns the vector index name associated with this profile.- Returns:
- vector index name, or
nullwhen unset
-
getSourceLanguage
Returns the source language for translation requests.- Returns:
- source language for translation, or
nullwhen unset
-
getTargetLanguage
Returns the target language for translation requests.- Returns:
- target language for translation, or
nullwhen unset
-
getCustomAttributes
Returns unmodeled database attributes preserved for forward-compatible metadata round-tripping.These values are emitted by
toAttributeMap()but excluded fromtoJson()to avoid sending a nestedcustom_attributesobject toDBMS_CLOUD_AI.- Returns:
- immutable map of custom attribute names and values
-
toAttributeMap
Converts non-null attributes to DBMS_CLOUD_AI attribute names and string values.- Returns:
- map containing non-null profile attributes
-
fromAttributeMap
Builds aProfileAttributesinstance from an attribute name/value map.Recognized keys are converted to strongly-typed builder fields; unknown keys are accepted so metadata reads do not fail when the database exposes a newer attribute than this SDK version supports directly.
- Parameters:
attributes- attribute map (typically DB-sourced key/value pairs)- Returns:
- populated
ProfileAttributesinstance
-
toJson
Serializes the profile attributes using snake_case JSON names.- Returns:
- JSON representation of this ProfileAttributes instance
-