Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
func NewMetrics ¶
func NewMetrics() *Metrics
func (*Metrics) Begin ¶
func (m *Metrics) Begin(method, path string) *RequestRecord
func (*Metrics) Finish ¶
func (m *Metrics) Finish(record *RequestRecord)
type ModelStats ¶
type Options ¶
type Options struct {
Config *config.Config
TokenProvider auth.TokenProvider // optional global override
Metrics *Metrics
HTTPClient *http.Client
UpstreamBase string // optional global override
Verbose bool
LogOutput io.Writer
}
Options configures a Proxy. TokenProvider and UpstreamBase are optional global overrides (used in tests). When not set, per-backend auth and URLs from Config.Backends are used.
type Proxy ¶
type Proxy struct {
// contains filtered or unexported fields
}
type RequestRecord ¶
type Snapshot ¶
type Snapshot struct {
TotalRequests int64
Active int64
Successes int64
Failures int64
InputTokens int64
OutputTokens int64
ThinkingTokens int64
CachedTokens int64
TotalTokens int64
StatusCodes map[int]int64
Models map[string]ModelStats
Recent []RequestRecord
}
func (Snapshot) SortedModelNames ¶
type StaticTokenProvider ¶
type StaticTokenProvider string
Click to show internal directories.
Click to hide internal directories.