custom_llms
Creates, updates, deletes, gets or lists a custom_llms resource.
Overview
| Name | custom_llms |
| Type | Resource |
| Id | databricks_workspace.agentbricks.custom_llms |
Fields
The following fields are returned by SELECT queries:
- get
| Name | Datatype | Description |
|---|---|---|
id | string | |
name | string | |
endpoint_name | string | Name of the endpoint that will be used to serve the custom LLM |
agent_artifact_path | string | |
creation_time | string | Creation timestamp of the custom LLM |
creator | string | Creator of the custom LLM |
datasets | array | Datasets used for training and evaluating the model, not for inference |
guidelines | array | Guidelines for the custom LLM to adhere to |
instructions | string | Instructions for the custom LLM to follow |
optimization_state | string | If 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, deployment_name | Get a Custom LLM. | |
create | insert | deployment_name, name, instructions | Create a Custom LLM. | |
update | update | id, deployment_name, custom_llm, update_mask | Update a Custom LLM. | |
delete | delete | id, deployment_name | Delete a Custom LLM. | |
cancel_optimize | exec | id, deployment_name | Cancel a Custom LLM Optimization Run. | |
start_optimize | exec | id, deployment_name | Start 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.
| Name | Datatype | Description |
|---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
id | string | The Id of the tile. |
SELECT examples
- get
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
- Manifest
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
;
# Description fields are for documentation purposes
- name: custom_llms
props:
- name: deployment_name
value: "{{ deployment_name }}"
description: Required parameter for the custom_llms resource.
- name: name
value: "{{ name }}"
description: |
Name of the custom LLM. Only alphanumeric characters and dashes allowed.
- name: instructions
value: "{{ instructions }}"
description: |
Instructions for the custom LLM to follow
- name: agent_artifact_path
value: "{{ agent_artifact_path }}"
description: |
This will soon be deprecated!! Optional: UC path for agent artifacts. If you are using a dataset that you only have read permissions, please provide a destination path where you have write permissions. Please provide this in catalog.schema format.
- name: datasets
description: |
Datasets used for training and evaluating the model, not for inference. Currently, only 1 dataset is accepted.
value:
- table:
table_path: "{{ table_path }}"
request_col: "{{ request_col }}"
response_col: "{{ response_col }}"
- name: guidelines
value:
- "{{ guidelines }}"
description: |
Guidelines for the custom LLM to adhere to
UPDATE examples
- update
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
Delete a Custom LLM.
DELETE FROM databricks_workspace.agentbricks.custom_llms
WHERE id = '{{ id }}' --required
AND deployment_name = '{{ deployment_name }}' --required
;
Lifecycle Methods
- cancel_optimize
- start_optimize
Cancel a Custom LLM Optimization Run.
EXEC databricks_workspace.agentbricks.custom_llms.cancel_optimize
@id='{{ id }}' --required,
@deployment_name='{{ deployment_name }}' --required
;
Start a Custom LLM Optimization Run.
EXEC databricks_workspace.agentbricks.custom_llms.start_optimize
@id='{{ id }}' --required,
@deployment_name='{{ deployment_name }}' --required
;