fireworks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package fireworks adapts Fireworks AI's OpenAI-compatible Chat Completions and Anthropic-compatible Messages endpoints to sigma.

The default provider reuses sigma's OpenAI Chat Completions adapter with Fireworks defaults. RegisterAnthropic reuses sigma's Anthropic Messages adapter under ProviderFireworksAnthropic for Fireworks models served through the /messages endpoint. Credentials resolve through sigma.Options.AuthResolver instead of direct environment reads.

Index

Constants

View Source
const DefaultBaseURL = "https://api.fireworks.ai/inference/v1"

Variables

This section is empty.

Functions

func Register

func Register(registry *sigma.Registry, opts ...ProviderOption) error

Register adds a Fireworks AI text provider to registry.

func RegisterAnthropic added in v0.5.0

func RegisterAnthropic(registry *sigma.Registry, opts ...AnthropicProviderOption) error

RegisterAnthropic adds a Fireworks AI Anthropic-compatible text provider to registry.

func RegisterDefault

func RegisterDefault(opts ...ProviderOption) error

RegisterDefault adds a Fireworks AI text provider to sigma's default registry.

func RegisterDefaultAnthropic added in v0.5.0

func RegisterDefaultAnthropic(opts ...AnthropicProviderOption) error

RegisterDefaultAnthropic adds a Fireworks AI Anthropic-compatible text provider to sigma's default registry.

Types

type AnthropicProvider added in v0.5.0

type AnthropicProvider = anthropic.Provider

AnthropicProvider adapts Fireworks AI's Anthropic-compatible Messages endpoint.

func NewAnthropicProvider added in v0.5.0

func NewAnthropicProvider(opts ...AnthropicProviderOption) *AnthropicProvider

NewAnthropicProvider constructs a Fireworks AI Anthropic-compatible provider.

type AnthropicProviderOption added in v0.5.0

type AnthropicProviderOption = anthropic.ProviderOption

AnthropicProviderOption configures an AnthropicProvider.

func WithAnthropicBaseURL added in v0.5.0

func WithAnthropicBaseURL(baseURL string) AnthropicProviderOption

WithAnthropicBaseURL configures the Anthropic-compatible provider base URL, for example an httptest server URL ending in /v1.

func WithAnthropicHTTPClient added in v0.5.0

func WithAnthropicHTTPClient(client *http.Client) AnthropicProviderOption

WithAnthropicHTTPClient configures the Anthropic-compatible provider fallback HTTP client.

func WithAnthropicHeader added in v0.5.0

func WithAnthropicHeader(key, value string) AnthropicProviderOption

WithAnthropicHeader configures an Anthropic-compatible provider default request header.

func WithAnthropicHeaders added in v0.5.0

func WithAnthropicHeaders(headers map[string]string) AnthropicProviderOption

WithAnthropicHeaders configures Anthropic-compatible provider default request headers.

type Provider

type Provider = openai.Provider

Provider adapts Fireworks AI's OpenAI-compatible Chat Completions endpoint to sigma.

func NewProvider

func NewProvider(opts ...ProviderOption) *Provider

NewProvider constructs a Fireworks AI provider.

type ProviderOption

type ProviderOption = openai.ProviderOption

ProviderOption configures a Provider.

func WithBaseURL

func WithBaseURL(baseURL string) ProviderOption

WithBaseURL configures the provider base URL, for example an httptest server URL.

func WithHTTPClient

func WithHTTPClient(client *http.Client) ProviderOption

WithHTTPClient configures the provider fallback HTTP client.

func WithHeader

func WithHeader(key, value string) ProviderOption

WithHeader configures a provider default request header.

func WithHeaders

func WithHeaders(headers map[string]string) ProviderOption

WithHeaders configures provider default request headers.

Jump to

Keyboard shortcuts

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