Skip to main content

custom_llms

Creates, updates, deletes, gets or lists a custom_llms resource.

Overview

Namecustom_llms
TypeResource
Iddatabricks_workspace.agentbricks.custom_llms

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstring
namestring
endpoint_namestringName of the endpoint that will be used to serve the custom LLM
agent_artifact_pathstring
creation_timestringCreation timestamp of the custom LLM
creatorstringCreator of the custom LLM
datasetsarrayDatasets used for training and evaluating the model, not for inference
guidelinesarrayGuidelines for the custom LLM to adhere to
instructionsstringInstructions for the custom LLM to follow
optimization_statestringIf optimization is kicked off, tracks the state of the custom LLM (CANCELLED, COMPLETED, CREATED, FAILED, PENDING, RUNNING)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, deployment_nameGet a Custom LLM.
createinsertdeployment_name, name, instructionsCreate a Custom LLM.
updateupdateid, deployment_name, custom_llm, update_maskUpdate a Custom LLM.
deletedeleteid, deployment_nameDelete a Custom LLM.
cancel_optimizeexecid, deployment_nameCancel a Custom LLM Optimization Run.
start_optimizeexecid, deployment_nameStart a Custom LLM Optimization Run.

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 (default: dbc-abcd0123-a1bc)
idstringThe Id of the tile.

SELECT examples

Get a Custom LLM.

SELECT
id,
name,
endpoint_name,
agent_artifact_path,
creation_time,
creator,
datasets,
guidelines,
instructions,
optimization_state
FROM databricks_workspace.agentbricks.custom_llms
WHERE id = '{{ id }}' -- required
AND deployment_name = '{{ deployment_name }}' -- required
;

INSERT examples

Create a Custom LLM.

INSERT INTO databricks_workspace.agentbricks.custom_llms (
name,
instructions,
agent_artifact_path,
datasets,
guidelines,
deployment_name
)
SELECT
'{{ name }}' /* required */,
'{{ instructions }}' /* required */,
'{{ agent_artifact_path }}',
'{{ datasets }}',
'{{ guidelines }}',
'{{ deployment_name }}'
RETURNING
id,
name,
endpoint_name,
agent_artifact_path,
creation_time,
creator,
datasets,
guidelines,
instructions,
optimization_state
;

UPDATE examples

Update a Custom LLM.

UPDATE databricks_workspace.agentbricks.custom_llms
SET
custom_llm = '{{ custom_llm }}',
update_mask = '{{ update_mask }}'
WHERE
id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
AND custom_llm = '{{ custom_llm }}' --required
AND update_mask = '{{ update_mask }}' --required
RETURNING
id,
name,
endpoint_name,
agent_artifact_path,
creation_time,
creator,
datasets,
guidelines,
instructions,
optimization_state;

DELETE examples

Delete a Custom LLM.

DELETE FROM databricks_workspace.agentbricks.custom_llms
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;

Lifecycle Methods

Cancel a Custom LLM Optimization Run.

EXEC databricks_workspace.agentbricks.custom_llms.cancel_optimize 
@id='{{ id }}' --required,
@deployment_name='{{ deployment_name }}' --required
;