Documentation
¶
Overview ¶
Package fireworks wraps Fireworks AI's OpenAI-compatible API. Fireworks hosts open-weight models on its FireAttention serving stack and ships latency-optimized custom variants of popular models.
Fireworks-specific knobs reachable through the namespaced OpenAI request extension:
- "context_length_exceeded_behavior" controls truncation policy.
- "prompt_cache_max_len" enables Fireworks' prompt-cache layer.
- The /chat/completions endpoint accepts "response_format" with "type":"grammar" to constrain output via GBNF (alongside the standard "json_schema").
See https://docs.fireworks.ai/ for the full API reference.
Index ¶
Constants ¶
View Source
const ( OpenAIRequestExtensionKey = "fireworks/openai_request" OpenAIResponseExtensionKey = "fireworks/openai_response" OpenAIStreamChunkExtensionKey = "fireworks/openai_stream_chunk" )
View Source
const ( Provider = "Fireworks" BaseURL = "https://api.fireworks.ai/inference/v1" )
View Source
const ( ModelGPTOSS20B = "accounts/fireworks/models/gpt-oss-20b" ModelKimiK26 = "accounts/fireworks/models/kimi-k2p6" ModelGLM52 = "accounts/fireworks/models/glm-5p2" )
Current serverless model ids. See https://fireworks.ai/models for the live catalog — Fireworks prefixes model ids with "accounts/fireworks/models/".
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶ added in v0.13.0
type Chat = openai.ChatCompletions
Chat implements Fireworks' chat endpoint.
func NewChat ¶ added in v0.13.0
func NewChat(config ChatConfig) (*Chat, error)
Click to show internal directories.
Click to hide internal directories.