baml_client

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: AGPL-3.0, AGPL-3.0-or-later 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 EvaluateGmailQueryResults

func EvaluateGmailQueryResults(ctx context.Context, original_guidance string, generated_query string, result_count int64, sample_results string, opts ...CallOptionFunc) (types.GmailQueryEvaluation, error)

func InferGDriveQuery

func InferGDriveQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.GDriveQueryResult, error)

func InferGitHubQuery

func InferGitHubQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.GitHubQueryResult, error)

func InferGmailQuery

func InferGmailQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.GmailQueryResult, error)

func InferLinearQuery added in v0.1.9

func InferLinearQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.LinearQueryResult, error)

func InferNotionQuery

func InferNotionQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.NotionQueryResult, error)

func InferSlackQuery added in v0.1.9

func InferSlackQuery(ctx context.Context, name string, guidance *string, opts ...CallOptionFunc) (types.SlackQueryResult, 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