baml_client

package
v0.1.147 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: AGPL-3.0, AGPL-3.0-or-later Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Parse = &parse{}
View Source
var ParseStream = &parse_stream{}
View Source
var Request = &build_request{}
View Source
var Stream = &stream{}
View Source
var StreamRequest = &build_request_stream{}

Functions

func ClassifyAffectedRows added in v0.1.124

func ClassifyAffectedRows(ctx context.Context, columns []types.ViewColumn, output_type string, output_title string, output_summary string, output_data string, existing_rows string, opts ...CallOptionFunc) (types.AffectedRowsResult, error)

func ClassifyDetailTemplate added in v0.1.110

func ClassifyDetailTemplate(ctx context.Context, table_title string, column_schema string, opts ...CallOptionFunc) (types.DetailLayout, error)

func ClassifyRowMatch added in v0.1.136

func ClassifyRowMatch(ctx context.Context, columns []types.ViewColumn, incoming_cells string, candidate_rows string, opts ...CallOptionFunc) (types.RowMatchResult, error)

func GenerateStatusOptions added in v0.1.133

func GenerateStatusOptions(ctx context.Context, table_title string, column_key string, column_label string, sibling_columns string, opts ...CallOptionFunc) (types.StatusOptionSet, error)

func MapImportColumns added in v0.1.119

func MapImportColumns(ctx context.Context, sheet_name string, existing_columns []types.ColumnSchema, headers []string, data_preview string, opts ...CallOptionFunc) (types.ImportMappingResult, error)

func MapOutputsToSchema

func MapOutputsToSchema(ctx context.Context, sheet_name string, table_title string, table_type string, columns []types.ColumnSchema, outputs_payload string, existing_rows string, excluded_rows string, opts ...CallOptionFunc) (types.MappedResult, error)

func MapViewToWidget added in v0.1.108

func MapViewToWidget(ctx context.Context, sheet_name string, widget_type string, widget_title string, widget_description string, widget_config string, table_columns string, table_data string, opts ...CallOptionFunc) (types.WidgetResult, error)

func PlanRowSearch added in v0.1.125

func PlanRowSearch(ctx context.Context, columns []types.ViewColumn, output_type string, output_title string, output_summary string, output_data string, sheet_name string, view_context string, opts ...CallOptionFunc) (types.RowSearchPlan, error)

func PopulateRowCells added in v0.1.124

func PopulateRowCells(ctx context.Context, columns []types.ViewColumn, output_type string, output_title string, output_summary string, output_data string, row_id string, row_cells string, entity_hint string, sheet_name string, opts ...CallOptionFunc) (types.PopulateRowResult, error)

func WriteView

func WriteView(ctx context.Context, user_message string, conversation_history string, current_view string, workspace_context string, component_registry string, view_data string, active_tasks string, opts ...CallOptionFunc) (types.ViewDraftResponse, error)

Types

type Audio

type Audio = baml.Audio

func NewAudioFromBase64

func NewAudioFromBase64(base64 string, mimeType *string) (Audio, error)

func NewAudioFromUrl

func NewAudioFromUrl(url string, mimeType *string) (Audio, error)

type CallOptionFunc

type CallOptionFunc func(*callOption)

func WithClient

func WithClient(client string) CallOptionFunc

Set the client for the specific function call (shorthand for ClientRegistry with primary). If both WithClient and WithClientRegistry are used, WithClient takes precedence.

func WithClientRegistry

func WithClientRegistry(clientRegistry *baml.ClientRegistry) CallOptionFunc

Add a client registry to the specific function call.

func WithCollector

func WithCollector(collector baml.Collector) CallOptionFunc

Add collector to the specific function call.

func WithCollectors

func WithCollectors(collectors []baml.Collector) CallOptionFunc

Add multiple collectors to the specific function call.

func WithEnv

func WithEnv(env map[string]string) CallOptionFunc

Modify environment variables for the specific function call.

func WithExperimentalOnTick deprecated

func WithExperimentalOnTick(onTick baml.TickCallback) CallOptionFunc

Deprecated: Use WithOnTick instead.

func WithOnTick

func WithOnTick(onTick baml.TickCallback) CallOptionFunc

func WithTags

func WithTags(tags map[string]string) CallOptionFunc

Add tags to the specific function call.

func WithTypeBuilder

func WithTypeBuilder(tb *TypeBuilder) CallOptionFunc

type Collector

type Collector = baml.Collector

Constructors

func NewCollector

func NewCollector(name string) (Collector, error)

type Image

type Image = baml.Image

func NewImageFromBase64

func NewImageFromBase64(base64 string, mimeType *string) (Image, error)

func NewImageFromUrl

func NewImageFromUrl(url string, mimeType *string) (Image, error)

type PDF

type PDF = baml.PDF

func NewPDFFromBase64

func NewPDFFromBase64(base64 string, mimeType *string) (PDF, error)

func NewPDFFromUrl

func NewPDFFromUrl(url string, mimeType *string) (PDF, error)

type StreamValue

type StreamValue[TStream any, TFinal any] struct {
	IsError bool
	Error   error
	IsFinal bool
	// contains filtered or unexported fields
}

func (*StreamValue[TStream, TFinal]) Final

func (s *StreamValue[TStream, TFinal]) Final() *TFinal

func (*StreamValue[TStream, TFinal]) Stream

func (s *StreamValue[TStream, TFinal]) Stream() *TStream

type TypeBuilder

type TypeBuilder = type_builder.TypeBuilder

func NewTypeBuilder

func NewTypeBuilder() (*TypeBuilder, error)

type Video

type Video = baml.Video

func NewVideoFromBase64

func NewVideoFromBase64(base64 string, mimeType *string) (Video, error)

func NewVideoFromUrl

func NewVideoFromUrl(url string, mimeType *string) (Video, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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