baml_client

package
v0.201.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, Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stream = &stream{}

Functions

func TestComplexNested

func TestComplexNested(ctx context.Context, input string, opts ...CallOptionFunc) (types.ComplexNested, error)

func TestDeeplyNested

func TestDeeplyNested(ctx context.Context, input string, opts ...CallOptionFunc) (types.DeeplyNested, error)

func TestRecursiveStructure

func TestRecursiveStructure(ctx context.Context, input string, opts ...CallOptionFunc) (types.RecursiveStructure, error)

func TestSimpleNested

func TestSimpleNested(ctx context.Context, input string, opts ...CallOptionFunc) (types.SimpleNested, error)

Types

type CallOptionFunc

type CallOptionFunc func(*callOption)

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.

type StreamValue

type StreamValue[TStream any, TFinal any] struct {
	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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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