meta

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package meta implements the Meta Model API (Muse Spark) transport.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Meta

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

Meta is the Meta Model API provider. Both credential kinds talk to api.meta.ai with a bearer key: a subscription login differs only in that its key is minted from an OAuth token and can be re-minted when rejected.

func New

func New(apiKey string) *Meta

New creates a Meta provider for META_API_KEY credentials.

func NewOAuth

func NewOAuth(mintedKey string, remint func(ctx context.Context, rejectedKey string) (string, error)) *Meta

NewOAuth creates a Meta provider for a Muse subscription. The key is the one minted at login; remint exchanges a rejected key for a fresh one.

func (*Meta) Stream

func (m *Meta) Stream(ctx context.Context, req core.Request) (<-chan core.AssistantEvent, error)

Stream sends a stateless request to Meta's Responses endpoint.

func (*Meta) SupportsDocuments

func (*Meta) SupportsDocuments() bool

SupportsDocuments is true: input_file parts carrying a base64 data URL were verified against /v1/responses, and the model read the attached file.

func (*Meta) WithHTTPClient added in v0.46.0

func (m *Meta) WithHTTPClient(c *http.Client) *Meta

WithHTTPClient replaces the HTTP client while keeping the pinned endpoint. It is a server-side seam for tests that route the fixed origin locally.

Jump to

Keyboard shortcuts

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