Documentation
¶
Overview ¶
Package llama provides Meta's hosted Llama API through its documented OpenAI-compatible Chat Completions endpoint.
Index ¶
Constants ¶
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 ¶
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 ¶
func WithHeader ¶
WithHeader adds a provider or gateway header to requests.
func WithReasoningEffort ¶
WithReasoningEffort adds the documented OpenAI-compatible reasoning_effort request field for models that support reasoning controls.
func WithServiceTier ¶
WithServiceTier adds the documented OpenAI-compatible service_tier field.