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

llama

package
v0.16.1 Latest Latest
Warning

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

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

Documentation

Overview

Package llama provides Meta's hosted Llama API through its documented OpenAI-compatible Chat Completions endpoint.

Index

Constants

View Source
const (
	DefaultBaseURL    = "https://api.llama.com/compat/v1"
	APIKeyEnvironment = "LLAMA_API_KEY" // #nosec G101 -- environment variable name, not a credential value
)

Variables

This section is empty.

Functions

func New

func New(selected model.Model, key auth.APIKey, options ...Option) (inference.Client, error)

New constructs a hosted Meta Llama Chat Completions client. An explicit key takes precedence; when it is empty, the documented LLAMA_API_KEY environment variable is used.

func NewCounter

func NewCounter(_ auth.APIKey) (contextcount.ContextCounter, error)

NewCounter reports that the hosted Llama compatibility API documents no exact input-token counting endpoint in this package's supported contract.

Types

type CounterSupportError

type CounterSupportError = llm.CounterSupportError

type Option

type Option = simple.Option

func WithHeader

func WithHeader(name, value string) Option

WithHeader adds a provider or gateway header to requests.

func WithReasoningEffort

func WithReasoningEffort(effort string) Option

WithReasoningEffort adds the documented OpenAI-compatible reasoning_effort request field for models that support reasoning controls.

func WithServiceTier

func WithServiceTier(tier string) Option

WithServiceTier adds the documented OpenAI-compatible service_tier field.

Jump to

Keyboard shortcuts

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