providers

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ProviderAnthropic  = types.ProviderAnthropic
	ProviderGemini     = types.ProviderGemini
	ProviderOpenAI     = types.ProviderOpenAI
	ProviderMoonshot   = types.ProviderMoonshot
	ProviderDeepSeek   = types.ProviderDeepSeek
	ProviderQwen       = types.ProviderQwen
	ProviderOpenRouter = types.ProviderOpenRouter
)
View Source
const (
	APIShapeOpenAI    = types.APIShapeOpenAI
	APIShapeAnthropic = types.APIShapeAnthropic
	APIShapeGemini    = types.APIShapeGemini
)

Variables

This section is empty.

Functions

func ComputeCost

func ComputeCost(apiShape APIShape, model string, usage types.TokenUsage) (types.TokenCost, bool)

func GetModelCost

func GetModelCost(model string) (types.ModelCost, bool)

GetModelCost returns the cost information for a model

func GetUnderlyingModel

func GetUnderlyingModel(model string) string

Types

type APIShape

type APIShape = types.APIShape

func GetModelAPIShape

func GetModelAPIShape(model string) (APIShape, error)

type Provider

type Provider = types.Provider

Re-export provider and API shape types from types package

func GetModelProvider

func GetModelProvider(model string) (Provider, error)

Jump to

Keyboard shortcuts

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