Help us shape the future of Go! Take the 2026 Go Developer Survey

inference

package
v0.11.796 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAsset

func ValidateAsset(asset *pipeline.Asset) error

ValidateAsset validates the first-version inference contract without making requests.

Types

type Client

type Client struct {
	Provider        string
	Model           string
	APIKey          string
	MaxOutputTokens int
	HTTPClient      *http.Client
	OnCacheUsage    func(readTokens, writtenTokens int64)
}

Client calls a supported inference provider.

func (*Client) CompleteStructured

func (c *Client) CompleteStructured(ctx context.Context, state, instructions string, columns []outputColumn) (map[string]any, error)

CompleteStructured asks the provider for one schema-constrained object and validates the object before returning it. Configuration and credentials must already have been validated by readConfig and resolveGroups.

type Operator

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

Operator enriches query results and publishes them through Bruin's ingestr writer.

func (*Operator) Run

Jump to

Keyboard shortcuts

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