Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KillSwitch ¶
type KillSwitch struct {
// contains filtered or unexported fields
}
func NewKillSwitch ¶
func NewKillSwitch() *KillSwitch
func (*KillSwitch) Block ¶
func (k *KillSwitch) Block(source string)
func (*KillSwitch) IsBlocked ¶
func (k *KillSwitch) IsBlocked(source string) bool
func (*KillSwitch) List ¶
func (k *KillSwitch) List() []string
func (*KillSwitch) Unblock ¶
func (k *KillSwitch) Unblock(source string)
type ModelAlias ¶
type ModelAliaser ¶
type ModelAliaser struct {
// contains filtered or unexported fields
}
func NewModelAliaser ¶
func NewModelAliaser() *ModelAliaser
func (*ModelAliaser) AddAlias ¶
func (a *ModelAliaser) AddAlias(from, to string)
func (*ModelAliaser) List ¶
func (a *ModelAliaser) List() []ModelAlias
func (*ModelAliaser) Resolve ¶
func (a *ModelAliaser) Resolve(model string) string
type QuotaConfig ¶
type QuotaManager ¶
type QuotaManager struct {
// contains filtered or unexported fields
}
func NewQuotaManager ¶
func NewQuotaManager() *QuotaManager
func (*QuotaManager) CheckQuota ¶
func (m *QuotaManager) CheckQuota(source string) (bool, string)
func (*QuotaManager) GetUsage ¶
func (m *QuotaManager) GetUsage(source string) *QuotaUsage
func (*QuotaManager) RecordUsage ¶
func (m *QuotaManager) RecordUsage(source string, cost float64, tokens int64) bool
func (*QuotaManager) SetQuota ¶
func (m *QuotaManager) SetQuota(source string, config *QuotaConfig)
Click to show internal directories.
Click to hide internal directories.