Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxAttempts = primitives.DefaultRemoteMaxAttempts
Variables ¶
This section is empty.
Functions ¶
func NewAdapter ¶
func NewAdapter(remote *primitives.RemoteClient, config Config) (llm.Adapter, error)
Types ¶
type CacheKeyPlacement ¶
type Config ¶
type Config struct {
Endpoint string
Headers map[string][]string
CacheKeyPlacement CacheKeyPlacement
// Nil uses DefaultMaxAttempts.
MaxAttempts *int
// Trace borrows read-only bodies: request JSON and terminal response JSON or HTTP error.
Trace func(Exchange)
// Extensions are provider-specific top-level fields merged into every request
// body, such as OpenRouter's automatic prompt caching and upstream routing.
// A key that names a standard Responses API field is rejected per request.
Extensions map[string]jsontext.Value
}
Click to show internal directories.
Click to hide internal directories.