baml_client

package
v0.218.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0, Apache-2.0 Imports: 9 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 Stream = &stream{}

Functions

func ConsumeSimpleClass

func ConsumeSimpleClass(ctx context.Context, item types.SimpleClass, opts ...CallOptionFunc) (types.SimpleClass, error)

func MakeSimpleClass

func MakeSimpleClass(ctx context.Context, opts ...CallOptionFunc) (types.SimpleClass, error)

Types

type Audio added in v0.203.0

type Audio = baml.Audio

func NewAudioFromBase64 added in v0.203.0

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

func NewAudioFromUrl added in v0.203.0

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

type CallOptionFunc

type CallOptionFunc func(*callOption)

func WithClient added in v0.217.0

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

func WithExperimentalOnTick(onTick baml.TickCallback) CallOptionFunc

Deprecated: Use WithOnTick instead.

func WithOnTick added in v0.206.1

func WithOnTick(onTick baml.TickCallback) CallOptionFunc

func WithTags added in v0.210.0

func WithTags(tags map[string]string) CallOptionFunc

Add tags to the specific function call.

func WithTypeBuilder added in v0.204.0

func WithTypeBuilder(tb *TypeBuilder) CallOptionFunc

type Collector added in v0.203.0

type Collector = baml.Collector

Constructors

func NewCollector added in v0.203.0

func NewCollector(name string) (Collector, error)

type Image added in v0.203.0

type Image = baml.Image

func NewImageFromBase64 added in v0.203.0

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

func NewImageFromUrl added in v0.203.0

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

type PDF added in v0.203.0

type PDF = baml.PDF

func NewPDFFromBase64 added in v0.203.0

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

func NewPDFFromUrl added in v0.203.0

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

type TypeBuilder = type_builder.TypeBuilder

func NewTypeBuilder added in v0.204.0

func NewTypeBuilder() (*TypeBuilder, error)

type Video added in v0.203.0

type Video = baml.Video

func NewVideoFromBase64 added in v0.203.0

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

func NewVideoFromUrl added in v0.203.0

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