Documentation
¶
Index ¶
- Constants
- Variables
- type Attempt
- type AttemptError
- type Budget
- type BudgetConfig
- type BudgetHolder
- type BudgetInjector
- type ChainLink
- type Client
- type CostRecord
- type CostTracker
- type FailoverModel
- type FallbackChain
- type Generator
- type MatchKind
- type ModelSummary
- type OpenAIProvider
- type OpenAIProviderConfig
- type Price
- type PriceLookup
- type PriceStatus
- type PriceTable
- type PricedProvider
- type Provider
- type Resilient
- type ResilientConfig
- type RetryHint
- type Sink
- type StageRouter
- type TokenAccountant
- type UsageCallCounter
- type UsageRecord
Constants ¶
View Source
const ( MatchExact = upstream.MatchExact MatchNone = upstream.MatchNone MatchNormalized = upstream.MatchNormalized MaxServerRetryAfter = upstream.MaxServerRetryAfter MaxStreamRecoveryRetries = upstream.MaxStreamRecoveryRetries PricePriced = upstream.PricePriced PriceUnpriced = upstream.PriceUnpriced )
Variables ¶
View Source
var ( BusyAdmissionDelay = upstream.BusyAdmissionDelay BusyAdmissionDelays = upstream.BusyAdmissionDelays ClassifyLLMError = upstream.ClassifyLLMError DefaultPriceTable = upstream.DefaultPriceTable ErrPriceUnknown = upstream.ErrPriceUnknown IsContextExceededError = upstream.IsContextExceededError IsContextExceededFinish = upstream.IsContextExceededFinish IsProviderBusyCode = upstream.IsProviderBusyCode IsRateLimitError = upstream.IsRateLimitError IsTransientStreamError = upstream.IsTransientStreamError IsTruncatedError = upstream.IsTruncatedError LookupPrice = upstream.LookupPrice LookupPriceStrict = upstream.LookupPriceStrict NewBudget = upstream.NewBudget NewClient = upstream.NewClient NewCostTracker = upstream.NewCostTracker NewCostTrackerWithTable = upstream.NewCostTrackerWithTable NewFailoverModel = upstream.NewFailoverModel NewFallbackChain = upstream.NewFallbackChain NewOpenAIProvider = upstream.NewOpenAIProvider NewPriceTable = upstream.NewPriceTable NewResilient = upstream.NewResilient NewStageRouter = upstream.NewStageRouter NewUsageHandler = upstream.NewUsageHandler // 门面按契约转发上游的**全部**导出符号;上游标 Deprecated 的符号在此仍必须转发 // (删掉会让走门面的下游编译断裂,而符号级门禁也会判成「幽灵转发」)。 // 故此处按行豁免 SA1019——豁免的是「转发」这个动作,不是「上游已弃用」这个事实。 PriceOf = upstream.PriceOf //nolint:staticcheck // 上游已弃用:改用 PriceTable.Lookup PriceOfMatched = upstream.PriceOfMatched //nolint:staticcheck // 上游已弃用:改用 PriceTable.Lookup RetryAfterFrom = upstream.RetryAfterFrom RetryableLLMError = upstream.RetryableLLMError SelectRetryDelay = upstream.SelectRetryDelay SuspiciousEmptyResult = upstream.SuspiciousEmptyResult WithCallCounter = upstream.WithCallCounter WithRetryAfterSink = upstream.WithRetryAfterSink WithUsageLabels = upstream.WithUsageLabels )
Functions ¶
This section is empty.
Types ¶
type AttemptError ¶
type AttemptError = upstream.AttemptError
type BudgetConfig ¶
type BudgetConfig = upstream.BudgetConfig
type BudgetHolder ¶
type BudgetHolder = upstream.BudgetHolder
type BudgetInjector ¶
type BudgetInjector = upstream.BudgetInjector
type CostRecord ¶
type CostRecord = upstream.CostRecord
type CostTracker ¶
type CostTracker = upstream.CostTracker
type FailoverModel ¶
type FailoverModel = upstream.FailoverModel
type FallbackChain ¶
type FallbackChain = upstream.FallbackChain
type ModelSummary ¶
type ModelSummary = upstream.ModelSummary
type OpenAIProvider ¶
type OpenAIProvider = upstream.OpenAIProvider
type OpenAIProviderConfig ¶
type OpenAIProviderConfig = upstream.OpenAIProviderConfig
type PriceLookup ¶ added in v1.8.14
type PriceLookup = upstream.PriceLookup
type PriceStatus ¶ added in v1.8.14
type PriceStatus = upstream.PriceStatus
type PriceTable ¶ added in v1.8.14
type PriceTable = upstream.PriceTable
type PricedProvider ¶ added in v1.8.14
type PricedProvider = upstream.PricedProvider
type ResilientConfig ¶
type ResilientConfig = upstream.ResilientConfig
type StageRouter ¶
type StageRouter = upstream.StageRouter
type TokenAccountant ¶
type TokenAccountant = upstream.TokenAccountant
type UsageCallCounter ¶
type UsageCallCounter = upstream.UsageCallCounter
type UsageRecord ¶
type UsageRecord = upstream.UsageRecord
Click to show internal directories.
Click to hide internal directories.