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

llm

package
v1.8.28 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 Attempt

type Attempt = upstream.Attempt

type AttemptError

type AttemptError = upstream.AttemptError

type Budget

type Budget = upstream.Budget

type BudgetConfig

type BudgetConfig = upstream.BudgetConfig

type BudgetHolder

type BudgetHolder = upstream.BudgetHolder

type BudgetInjector

type BudgetInjector = upstream.BudgetInjector
type ChainLink = upstream.ChainLink

type Client

type Client = upstream.Client

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 Generator

type Generator = upstream.Generator

type MatchKind added in v1.8.14

type MatchKind = upstream.MatchKind

type ModelSummary

type ModelSummary = upstream.ModelSummary

type OpenAIProvider

type OpenAIProvider = upstream.OpenAIProvider

type OpenAIProviderConfig

type OpenAIProviderConfig = upstream.OpenAIProviderConfig

type Price

type Price = upstream.Price

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 Provider

type Provider = upstream.Provider

type Resilient

type Resilient = upstream.Resilient

type ResilientConfig

type ResilientConfig = upstream.ResilientConfig

type RetryHint

type RetryHint = upstream.RetryHint

type Sink

type Sink = upstream.Sink

type StageRouter

type StageRouter = upstream.StageRouter

type TokenAccountant

type TokenAccountant = upstream.TokenAccountant

type UsageCallCounter

type UsageCallCounter = upstream.UsageCallCounter

type UsageRecord

type UsageRecord = upstream.UsageRecord

Jump to

Keyboard shortcuts

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