aibuilder

package
v0.72.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 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 CancelCustomLlmOptimizationRunRequest

type CancelCustomLlmOptimizationRunRequest struct {
	Id string `json:"-" url:"-"`
}

type CancelResponse

type CancelResponse struct {
}

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 CustomLlmsAPI

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

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

func NewCustomLlms

func NewCustomLlms(client *client.DatabricksClient) *CustomLlmsAPI

func (*CustomLlmsAPI) Cancel

func (a *CustomLlmsAPI) Cancel(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error

func (*CustomLlmsAPI) Create

func (a *CustomLlmsAPI) Create(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)

func (*CustomLlmsAPI) Get

func (a *CustomLlmsAPI) Get(ctx context.Context, request GetCustomLlmRequest) (*CustomLlm, error)

func (*CustomLlmsAPI) GetById

func (a *CustomLlmsAPI) GetById(ctx context.Context, id string) (*CustomLlm, error)

Get a Custom LLM.

func (*CustomLlmsAPI) Update

func (a *CustomLlmsAPI) Update(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)

type CustomLlmsInterface

type CustomLlmsInterface interface {

	// Cancel a Custom LLM Optimization Run.
	Cancel(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error

	// Start a Custom LLM Optimization Run.
	Create(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)

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

	// Get a Custom LLM.
	GetById(ctx context.Context, id string) (*CustomLlm, error)

	// Update a Custom LLM.
	Update(ctx context.Context, request UpdateCustomLlmRequest) (*CustomLlm, error)
}

type CustomLlmsService deprecated

type CustomLlmsService interface {

	// Cancel a Custom LLM Optimization Run.
	Cancel(ctx context.Context, request CancelCustomLlmOptimizationRunRequest) error

	// Start a Custom LLM Optimization Run.
	Create(ctx context.Context, request StartCustomLlmOptimizationRunRequest) (*CustomLlm, error)

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

	// Update a Custom LLM.
	Update(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 Dataset

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

type GetCustomLlmRequest

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

Get a Custom LLM

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