aibuilder

package
v0.74.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2025 License: Apache-2.0 Imports: 5 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:"-" url:"-"`
}

type CancelOptimizeResponse added in v0.73.0

type CancelOptimizeResponse struct {
}

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.
	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 added in v0.73.0

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

func (*CreateCustomLlmRequest) UnmarshalJSON added in v0.73.0

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"`

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

func (CustomLlm) MarshalJSON

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

func (*CustomLlm) UnmarshalJSON

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

type Dataset

type Dataset struct {
	Table Table `json:"table"`
}

type DeleteCustomLlmRequest added in v0.73.0

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

type DeleteCustomLlmResponse added in v0.73.0

type DeleteCustomLlmResponse struct {
}

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`

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
	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 (s Table) MarshalJSON() ([]byte, error)

func (*Table) UnmarshalJSON

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

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"`
}

Jump to

Keyboard shortcuts

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