Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Architecture ¶
type Endpoint ¶
type Endpoint struct {
Name string `json:"name"`
ContextLength int64 `json:"context_length"`
Pricing Pricing `json:"pricing"`
ProviderName string `json:"provider_name"`
Tag string `json:"tag"`
Quantization *string `json:"quantization"`
MaxCompletionTokens *int64 `json:"max_completion_tokens"`
MaxPromptTokens *int64 `json:"max_prompt_tokens"`
SupportedParams []string `json:"supported_parameters"`
Status int `json:"status"`
UptimeLast30m float64 `json:"uptime_last_30m"`
}
type Model ¶
type Model struct {
ID string `json:"id"`
CanonicalSlug string `json:"canonical_slug"`
HuggingFaceID string `json:"hugging_face_id"`
Name string `json:"name"`
Created int64 `json:"created"`
Description string `json:"description"`
ContextLength int64 `json:"context_length"`
Architecture Architecture `json:"architecture"`
Pricing Pricing `json:"pricing"`
TopProvider TopProvider `json:"top_provider"`
SupportedParams []string `json:"supported_parameters"`
}
type ModelsResponse ¶
type ModelsResponse struct {
Data Models `json:"data"`
}
type PricePerToken ¶
type PricePerToken float64
func (PricePerToken) Cost ¶
func (p PricePerToken) Cost(tokens int) float64
func (PricePerToken) CostPer1MIn ¶
func (p PricePerToken) CostPer1MIn() float64
func (PricePerToken) MarshalJSON ¶
func (p PricePerToken) MarshalJSON() ([]byte, error)
func (*PricePerToken) UnmarshalJSON ¶
func (p *PricePerToken) UnmarshalJSON(data []byte) error
type Pricing ¶
type Pricing struct {
Prompt PricePerToken `json:"prompt"`
Completion PricePerToken `json:"completion"`
Request PricePerToken `json:"request"`
Image PricePerToken `json:"image"`
WebSearch PricePerToken `json:"web_search"`
InternalReasoning PricePerToken `json:"internal_reasoning"`
InputCacheRead PricePerToken `json:"input_cache_read"`
InputCacheWrite PricePerToken `json:"input_cache_write"`
}
type TopProvider ¶
Click to show internal directories.
Click to hide internal directories.