aibuilder

package
v0.73.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

The Custom LLMs service manages state and powers the UI for the Custom LLM product.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiBuilderAPI added in v0.73.0

type AiBuilderAPI struct {
	// contains filtered or unexported fields
}

The Custom LLMs service manages state and powers the UI for the Custom LLM product.

func NewAiBuilder added in v0.73.0

func NewAiBuilder(client *client.DatabricksClient) *AiBuilderAPI

func (*AiBuilderAPI) CancelOptimize added in v0.73.0

func (a *AiBuilderAPI) CancelOptimize(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error

func (*AiBuilderAPI) CreateCustomLlm added in v0.73.0

func (a *AiBuilderAPI) CreateCustomLlm(ctx context.Context, request CreateCustomLlmRequest) (*CustomLlm, error)

func (*AiBuilderAPI) DeleteCustomLlm added in v0.73.0

func (a *AiBuilderAPI) DeleteCustomLlm(ctx context.Context, request DeleteCustomLlmRequest) error

func (*AiBuilderAPI) DeleteCustomLlmById added in v0.73.0

func (a *AiBuilderAPI) DeleteCustomLlmById(ctx context.Context, id string) error

Delete a Custom LLM.

func (*AiBuilderAPI) GetCustomLlm added in v0.73.0

func (a *AiBuilderAPI) GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)

func (*AiBuilderAPI) GetCustomLlmById added in v0.73.0

func (a *AiBuilderAPI) GetCustomLlmById(ctx context.Context, id string) (*CustomLlm, error)

Get a Custom LLM.

func (*AiBuilderAPI) StartOptimize added in v0.73.0

func (a *AiBuilderAPI) StartOptimize(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)

func (*AiBuilderAPI) UpdateCustomLlm added in v0.73.0

func (a *AiBuilderAPI) UpdateCustomLlm(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)

type AiBuilderInterface added in v0.73.0

type AiBuilderInterface 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

	// Delete a Custom LLM.
	DeleteCustomLlmById(ctx context.Context, id string) error

	// Get a Custom LLM.
	GetCustomLlm(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)

	// Get a Custom LLM.
	GetCustomLlmById(ctx context.Context, id string) (*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 AiBuilderService deprecated added in v0.73.0

type AiBuilderService 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:"-" tf:"-"`
}

func (CancelCustomLlmOptimizationRunRequest) MarshalJSON added in v0.73.0

func (st CancelCustomLlmOptimizationRunRequest) MarshalJSON() ([]byte, error)

func (*CancelCustomLlmOptimizationRunRequest) UnmarshalJSON added in v0.73.0

func (st *CancelCustomLlmOptimizationRunRequest) UnmarshalJSON(b []byte) error

type CancelOptimizeResponse added in v0.73.0

type CancelOptimizeResponse struct {
}

func (CancelOptimizeResponse) MarshalJSON added in v0.73.0

func (st CancelOptimizeResponse) MarshalJSON() ([]byte, error)

func (*CancelOptimizeResponse) UnmarshalJSON added in v0.73.0

func (st *CancelOptimizeResponse) UnmarshalJSON(b []byte) error

type CreateCustomLlmRequest added in v0.73.0

type CreateCustomLlmRequest struct {
	// 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.
	// Wire name: 'agent_artifact_path'
	AgentArtifactPath string `json:"agent_artifact_path,omitempty"`
	// Datasets used for training and evaluating the model, not for inference.
	// Currently, only 1 dataset is accepted.
	// Wire name: 'datasets'
	Datasets []Dataset `json:"datasets,omitempty"`
	// Guidelines for the custom LLM to adhere to
	// Wire name: 'guidelines'
	Guidelines []string `json:"guidelines,omitempty"`
	// Instructions for the custom LLM to follow
	// Wire name: 'instructions'
	Instructions string `json:"instructions"`
	// Name of the custom LLM. Only alphanumeric characters and dashes allowed.
	// Wire name: 'name'
	Name string `json:"name"`

	ForceSendFields []string `json:"-" tf:"-"`
}

func (CreateCustomLlmRequest) MarshalJSON added in v0.73.0

func (st CreateCustomLlmRequest) MarshalJSON() ([]byte, error)

func (*CreateCustomLlmRequest) UnmarshalJSON added in v0.73.0

func (st *CreateCustomLlmRequest) UnmarshalJSON(b []byte) error

type CustomLlm

type CustomLlm struct {

	// Wire name: 'agent_artifact_path'
	AgentArtifactPath string `json:"agent_artifact_path,omitempty"`
	// Creation timestamp of the custom LLM
	// Wire name: 'creation_time'
	CreationTime string `json:"creation_time,omitempty"`
	// Creator of the custom LLM
	// Wire name: 'creator'
	Creator string `json:"creator,omitempty"`
	// Datasets used for training and evaluating the model, not for inference
	// Wire name: 'datasets'
	Datasets []Dataset `json:"datasets,omitempty"`
	// Name of the endpoint that will be used to serve the custom LLM
	// Wire name: 'endpoint_name'
	EndpointName string `json:"endpoint_name,omitempty"`
	// Guidelines for the custom LLM to adhere to
	// Wire name: 'guidelines'
	Guidelines []string `json:"guidelines,omitempty"`

	// Wire name: 'id'
	Id string `json:"id,omitempty"`
	// Instructions for the custom LLM to follow
	// Wire name: 'instructions'
	Instructions string `json:"instructions"`
	// Name of the custom LLM
	// Wire name: 'name'
	Name string `json:"name"`
	// If optimization is kicked off, tracks the state of the custom LLM
	// Wire name: 'optimization_state'
	OptimizationState State `json:"optimization_state"`

	ForceSendFields []string `json:"-" tf:"-"`
}

func (CustomLlm) MarshalJSON

func (st CustomLlm) MarshalJSON() ([]byte, error)

func (*CustomLlm) UnmarshalJSON

func (st *CustomLlm) UnmarshalJSON(b []byte) error

type Dataset

type Dataset struct {

	// Wire name: 'table'
	Table Table `json:"table"`
}

func (Dataset) MarshalJSON added in v0.73.0

func (st Dataset) MarshalJSON() ([]byte, error)

func (*Dataset) UnmarshalJSON added in v0.73.0

func (st *Dataset) UnmarshalJSON(b []byte) error

type DeleteCustomLlmRequest added in v0.73.0

type DeleteCustomLlmRequest struct {
	// The id of the custom llm
	Id string `json:"-" tf:"-"`
}

Delete a Custom LLM

func (DeleteCustomLlmRequest) MarshalJSON added in v0.73.0

func (st DeleteCustomLlmRequest) MarshalJSON() ([]byte, error)

func (*DeleteCustomLlmRequest) UnmarshalJSON added in v0.73.0

func (st *DeleteCustomLlmRequest) UnmarshalJSON(b []byte) error

type DeleteCustomLlmResponse added in v0.73.0

type DeleteCustomLlmResponse struct {
}

func (DeleteCustomLlmResponse) MarshalJSON added in v0.73.0

func (st DeleteCustomLlmResponse) MarshalJSON() ([]byte, error)

func (*DeleteCustomLlmResponse) UnmarshalJSON added in v0.73.0

func (st *DeleteCustomLlmResponse) UnmarshalJSON(b []byte) error

type GetCustomLlmRequest

type GetCustomLlmRequest struct {
	// The id of the custom llm
	Id string `json:"-" tf:"-"`
}

Get a Custom LLM

func (GetCustomLlmRequest) MarshalJSON added in v0.73.0

func (st GetCustomLlmRequest) MarshalJSON() ([]byte, error)

func (*GetCustomLlmRequest) UnmarshalJSON added in v0.73.0

func (st *GetCustomLlmRequest) UnmarshalJSON(b []byte) error

type StartCustomLlmOptimizationRunRequest

type StartCustomLlmOptimizationRunRequest struct {
	// The Id of the tile.
	Id string `json:"-" tf:"-"`
}

func (StartCustomLlmOptimizationRunRequest) MarshalJSON added in v0.73.0

func (st StartCustomLlmOptimizationRunRequest) MarshalJSON() ([]byte, error)

func (*StartCustomLlmOptimizationRunRequest) UnmarshalJSON added in v0.73.0

func (st *StartCustomLlmOptimizationRunRequest) UnmarshalJSON(b []byte) error

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`

func (*State) Set

func (f *State) Set(v string) error

Set raw string value and validate it against allowed values

func (*State) String

func (f *State) String() string

String representation for fmt.Print

func (*State) Type

func (f *State) Type() string

Type always returns State to satisfy [pflag.Value] interface

func (*State) Values

func (f *State) Values() []State

Values returns all possible values for State.

There is no guarantee on the order of the values in the slice.

type Table

type Table struct {
	// Name of the request column
	// Wire name: 'request_col'
	RequestCol string `json:"request_col"`
	// Optional: Name of the response column if the data is labeled
	// Wire name: 'response_col'
	ResponseCol string `json:"response_col,omitempty"`
	// Full UC table path in catalog.schema.table_name format
	// Wire name: 'table_path'
	TablePath string `json:"table_path"`

	ForceSendFields []string `json:"-" tf:"-"`
}

func (Table) MarshalJSON

func (st Table) MarshalJSON() ([]byte, error)

func (*Table) UnmarshalJSON

func (st *Table) UnmarshalJSON(b []byte) error

type UpdateCustomLlmRequest

type UpdateCustomLlmRequest struct {
	// The CustomLlm containing the fields which should be updated.
	// Wire name: 'custom_llm'
	CustomLlm CustomLlm `json:"custom_llm"`
	// The id of the custom llm
	Id string `json:"-" tf:"-"`
	// 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.
	// Wire name: 'update_mask'
	UpdateMask string `json:"update_mask"`
}

func (UpdateCustomLlmRequest) MarshalJSON added in v0.73.0

func (st UpdateCustomLlmRequest) MarshalJSON() ([]byte, error)

func (*UpdateCustomLlmRequest) UnmarshalJSON added in v0.73.0

func (st *UpdateCustomLlmRequest) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL