models

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Pricing struct {
		Input  float64 `json:"input"`
		Output float64 `json:"output"`
	} `json:"pricing"`
}

Model 表示一个可用模型

type QuotaWindow

type QuotaWindow struct {
	Status   string    `json:"status"`
	Percent  int       `json:"percent"`
	ResetsAt time.Time `json:"resetsAt"`
}

QuotaWindow 表示一个配额窗口

type Usage

type Usage struct {
	Rolling QuotaWindow `json:"rolling"`
	Weekly  QuotaWindow `json:"weekly"`
	Monthly QuotaWindow `json:"monthly"`
}

Usage 表示配额使用情况

func FromProviderUsage added in v0.3.0

func FromProviderUsage(p *provider.Usage) *Usage

FromProviderUsage 将 provider.Usage 转换为 models.Usage

Jump to

Keyboard shortcuts

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