groq

package module
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package groq wraps Groq's OpenAI-compatible API. Groq runs open- weight models (Llama, Gemma, DeepSeek, Kimi) on its in-house LPUs at extremely high throughput.

Groq-specific knobs reachable through the namespaced OpenAI request extension:

See https://console.groq.com/docs/ for the full API reference.

Index

Constants

View Source
const (
	OpenAIRequestExtensionKey     = "groq/openai_request"
	OpenAIResponseExtensionKey    = "groq/openai_response"
	OpenAIStreamChunkExtensionKey = "groq/openai_stream_chunk"
)

Namespacing preserves provider-specific data without promoting it into the shared Core protocol or colliding with another provider.

View Source
const (
	Provider = "Groq"

	BaseURL = "https://api.groq.com/openai/v1"
)

Exported identifiers keep provider-owned names and defaults out of caller literals.

View Source
const (
	ModelGPTOSS120B = "openai/gpt-oss-120b"
	ModelGPTOSS20B  = "openai/gpt-oss-20b"
	ModelQwen36_27B = "qwen/qwen3.6-27b"
)

Current production model ids. See https://console.groq.com/docs/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 Groq's chat endpoint.

func NewChat added in v0.13.0

func NewChat(config ChatConfig) (*Chat, error)

NewChat rejects an invalid provider binding before the first chat call.

type ChatConfig added in v0.13.0

type ChatConfig struct {
	APIKey         string
	DefaultOptions corechat.Options
	BaseURL        string
	HTTPClient     *http.Client
}

ChatConfig binds provider access and defaults shared by every chat call.

func (ChatConfig) Validate added in v0.13.0

func (c ChatConfig) Validate() error

Jump to

Keyboard shortcuts

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