pricing

package
v0.2.18 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package pricing 按 Gemini API 与 Vertex AI 公布的当前文本单价估算请求费用

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cost

func Cost(model string, input, cached, output int64) float64

Cost 返回一个请求按模型单价估算的美元费用,cached 为 input 中命中缓存的部分,output 为思考与回复 token 之和,模型没有单价时为 0

func Priced added in v0.2.11

func Priced(model string) bool

Priced 返回模型是否有单价

Types

This section is empty.

Jump to

Keyboard shortcuts

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