Skip to main content

ai_functions

Creates, updates, deletes, gets or lists an ai_functions resource.

Overview​

Nameai_functions
TypeResource
Iddatabricks_workspace.aifunctions.ai_functions

Fields​

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
ai_classifyexecdeployment_name, workspace_domain, content, labelsClassifies content according to a set of provided labels. For REST API requests, the default rate
ai_decideexecdeployment_name, workspace_domain, state, questionsTurn text and structured data into decisions your application can use. Define questions and criteria
ai_extractexecdeployment_name, workspace_domain, content, schemaExtracts structured data from text and documents according to a provided schema. For REST API
ai_parse_documentexecdeployment_name, workspace_domain, contentParse structured content from unstructured documents.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
deployment_namestringThe Databricks workspace deployment name: the host prefix of the workspace URL (dbc-abcd0123-a1bc on AWS, adb-1234567890123456.7 on Azure, 1234567890123456.7 on GCP). Set DATABRICKS_DEPLOYMENT_NAME to default it for the session. (default: dbc-abcd0123-a1bc, x-stackQL-envVar: DATABRICKS_DEPLOYMENT_NAME)
workspace_domainstringThe Databricks workspace domain suffix for the cloud. Selected by DATABRICKS_CLOUD (aws, azure or gcp; default aws). (default: cloud.databricks.com, x-stackQL-envVarSelector: {"envVar":"DATABRICKS_CLOUD","default":"aws","values":{"aws":"cloud.databricks.com","azure":"azuredatabricks.net","gcp":"gcp.databricks.com"}})

Lifecycle Methods​

Classifies content according to a set of provided labels. For REST API requests, the default rate

EXEC databricks_workspace.aifunctions.ai_functions.ai_classify
@deployment_name='{{ deployment_name }}' --required,
@workspace_domain='{{ workspace_domain }}' --required
@@json=
'{
"content": "{{ content }}",
"labels": "{{ labels }}",
"options": "{{ options }}"
}'
;