Documentation
¶
Overview ¶
The Custom LLMs service manages state and powers the UI for the Custom LLM product.
Index ¶
- type AgentBricksAPI
- func (a *AgentBricksAPI) CancelOptimize(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error
- func (a *AgentBricksAPI) CreateCustomLlm(ctx context.Context, request CreateCustomLlmRequest) (*CustomLlm, error)
- func (a *AgentBricksAPI) DeleteCustomLlm(ctx context.Context, request DeleteCustomLlmRequest) error
- func (a *AgentBricksAPI) GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)
- func (a *AgentBricksAPI) StartOptimize(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)
- func (a *AgentBricksAPI) UpdateCustomLlm(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)
- type AgentBricksInterface
- type AgentBricksServicedeprecated
- type CancelCustomLlmOptimizationRunRequest
- type CreateCustomLlmRequest
- type CustomLlm
- type Dataset
- type DeleteCustomLlmRequest
- type GetCustomLlmRequest
- type StartCustomLlmOptimizationRunRequest
- type State
- type Table
- type UpdateCustomLlmRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentBricksAPI ¶
type AgentBricksAPI struct {
// contains filtered or unexported fields
}
The Custom LLMs service manages state and powers the UI for the Custom LLM product.
func NewAgentBricks ¶
func NewAgentBricks(client *client.DatabricksClient) *AgentBricksAPI
func (*AgentBricksAPI) CancelOptimize ¶
func (a *AgentBricksAPI) CancelOptimize(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error
func (*AgentBricksAPI) CreateCustomLlm ¶
func (a *AgentBricksAPI) CreateCustomLlm(ctx context.Context, request CreateCustomLlmRequest) (*CustomLlm, error)
func (*AgentBricksAPI) DeleteCustomLlm ¶
func (a *AgentBricksAPI) DeleteCustomLlm(ctx context.Context, request DeleteCustomLlmRequest) error
func (*AgentBricksAPI) GetCustomLlm ¶
func (a *AgentBricksAPI) GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)
func (*AgentBricksAPI) StartOptimize ¶
func (a *AgentBricksAPI) StartOptimize(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)
func (*AgentBricksAPI) UpdateCustomLlm ¶
func (a *AgentBricksAPI) UpdateCustomLlm(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)
type AgentBricksInterface ¶
type AgentBricksInterface interface {
// Cancel a Custom LLM Optimization Run.
CancelOptimize(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error
// Create a Custom LLM.
CreateCustomLlm(ctx context.Context, request CreateCustomLlmRequest) (*CustomLlm, error)
// Delete a Custom LLM.
DeleteCustomLlm(ctx context.Context, request DeleteCustomLlmRequest) error
// Get a Custom LLM.
GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)
// Start a Custom LLM Optimization Run.
StartOptimize(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)
// Update a Custom LLM.
UpdateCustomLlm(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)
}
type AgentBricksService
deprecated
type AgentBricksService interface {
// Cancel a Custom LLM Optimization Run.
CancelOptimize(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error
// Create a Custom LLM.
CreateCustomLlm(ctx context.Context, request CreateCustomLlmRequest) (*CustomLlm, error)
// Delete a Custom LLM.
DeleteCustomLlm(ctx context.Context, request DeleteCustomLlmRequest) error
// Get a Custom LLM.
GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)
// Start a Custom LLM Optimization Run.
StartOptimize(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)
// Update a Custom LLM.
UpdateCustomLlm(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)
}
The Custom LLMs service manages state and powers the UI for the Custom LLM product.
Deprecated: Do not use this interface, it will be removed in a future version of the SDK.
type CancelCustomLlmOptimizationRunRequest ¶
type CancelCustomLlmOptimizationRunRequest struct {
Id string `json:"-" url:"-"`
}
type CreateCustomLlmRequest ¶
type CreateCustomLlmRequest struct {
// 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.
AgentArtifactPath string `json:"agent_artifact_path,omitempty"`
// Datasets used for training and evaluating the model, not for inference.
// Currently, only 1 dataset is accepted.
Datasets []Dataset `json:"datasets,omitempty"`
// Guidelines for the custom LLM to adhere to
Guidelines []string `json:"guidelines,omitempty"`
// Instructions for the custom LLM to follow
Instructions string `json:"instructions"`
// Name of the custom LLM. Only alphanumeric characters and dashes allowed.
Name string `json:"name"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CreateCustomLlmRequest) MarshalJSON ¶
func (s CreateCustomLlmRequest) MarshalJSON() ([]byte, error)
func (*CreateCustomLlmRequest) UnmarshalJSON ¶
func (s *CreateCustomLlmRequest) UnmarshalJSON(b []byte) error
type CustomLlm ¶
type CustomLlm struct {
AgentArtifactPath string `json:"agent_artifact_path,omitempty"`
// Creation timestamp of the custom LLM
CreationTime string `json:"creation_time,omitempty"`
// Creator of the custom LLM
Creator string `json:"creator,omitempty"`
// Datasets used for training and evaluating the model, not for inference
Datasets []Dataset `json:"datasets,omitempty"`
// Name of the endpoint that will be used to serve the custom LLM
EndpointName string `json:"endpoint_name,omitempty"`
// Guidelines for the custom LLM to adhere to
Guidelines []string `json:"guidelines,omitempty"`
Id string `json:"id,omitempty"`
// Instructions for the custom LLM to follow
Instructions string `json:"instructions"`
// Name of the custom LLM
Name string `json:"name"`
// If optimization is kicked off, tracks the state of the custom LLM
OptimizationState State `json:"optimization_state,omitempty"`
ForceSendFields []string `json:"-" url:"-"`
}
func (CustomLlm) MarshalJSON ¶
func (*CustomLlm) UnmarshalJSON ¶
type DeleteCustomLlmRequest ¶
type DeleteCustomLlmRequest struct {
// The id of the custom llm
Id string `json:"-" url:"-"`
}
type GetCustomLlmRequest ¶
type GetCustomLlmRequest struct {
// The id of the custom llm
Id string `json:"-" url:"-"`
}
type StartCustomLlmOptimizationRunRequest ¶
type StartCustomLlmOptimizationRunRequest struct {
// The Id of the tile.
Id string `json:"-" url:"-"`
}
type State ¶
type State string
States of Custom LLM optimization lifecycle.
const StateCancelled State = `CANCELLED`
const StateCompleted State = `COMPLETED`
const StateCreated State = `CREATED`
const StateFailed State = `FAILED`
const StatePending State = `PENDING`
const StateRunning State = `RUNNING`
type Table ¶
type Table struct {
// Name of the request column
RequestCol string `json:"request_col"`
// Optional: Name of the response column if the data is labeled
ResponseCol string `json:"response_col,omitempty"`
// Full UC table path in catalog.schema.table_name format
TablePath string `json:"table_path"`
ForceSendFields []string `json:"-" url:"-"`
}
func (Table) MarshalJSON ¶
func (*Table) UnmarshalJSON ¶
type UpdateCustomLlmRequest ¶
type UpdateCustomLlmRequest struct {
// The CustomLlm containing the fields which should be updated.
CustomLlm CustomLlm `json:"custom_llm"`
// The id of the custom llm
Id string `json:"-" url:"-"`
// The list of the CustomLlm fields to update. These should correspond to
// the values (or lack thereof) present in `custom_llm`.
//
// The field mask must be a single string, with multiple fields separated by
// commas (no spaces). The field path is relative to the resource object,
// using a dot (`.`) to navigate sub-fields (e.g., `author.given_name`).
// Specification of elements in sequence or map fields is not allowed, as
// only the entire collection field can be specified. Field names must
// exactly match the resource field names.
//
// A field mask of `*` indicates full replacement. It’s recommended to
// always explicitly list the fields being updated and avoid using `*`
// wildcards, as it can lead to unintended results if the API changes in the
// future.
UpdateMask string `json:"update_mask"`
}
Click to show internal directories.
Click to hide internal directories.