Documentation
¶
Index ¶
- func EstimatePromptTokens(messages []Message) int
- func NewProviderRegistry() *app.Registry
- func NewRegistry() *app.Registry
- type BlockRun
- func (p BlockRun) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p BlockRun) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p BlockRun) GetInfo() ProviderInfo
- func (p BlockRun) SupportsModel(model string) bool
- type ChatCompletionResponse
- type Choice
- type CohereCommand
- func (p *CohereCommand) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *CohereCommand) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *CohereCommand) GetInfo() ProviderInfo
- func (p *CohereCommand) SupportsModel(model string) bool
- type DeepAI
- func (p *DeepAI) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *DeepAI) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *DeepAI) GetInfo() ProviderInfo
- func (p *DeepAI) SupportsModel(model string) bool
- type Delta
- type DuckAI
- func (p *DuckAI) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *DuckAI) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *DuckAI) GetInfo() ProviderInfo
- func (p *DuckAI) SupportsModel(model string) bool
- type Jimmy
- func (p *Jimmy) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *Jimmy) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *Jimmy) GetInfo() ProviderInfo
- func (p *Jimmy) SupportsModel(model string) bool
- type Kilo
- func (p Kilo) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p Kilo) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p Kilo) GetInfo() ProviderInfo
- func (p Kilo) SupportsModel(model string) bool
- type Message
- type OVH
- type OpenCodeGo
- func (p OpenCodeGo) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p OpenCodeGo) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p OpenCodeGo) GetInfo() ProviderInfo
- func (p OpenCodeGo) SupportsModel(model string) bool
- type OpenCodeZen
- func (p OpenCodeZen) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p OpenCodeZen) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p OpenCodeZen) GetInfo() ProviderInfo
- func (p OpenCodeZen) SupportsModel(model string) bool
- type Perplexity
- func (p *Perplexity) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *Perplexity) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *Perplexity) GetInfo() ProviderInfo
- func (p *Perplexity) SupportsModel(model string) bool
- type Pollinations
- func (p Pollinations) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p Pollinations) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p Pollinations) GetInfo() ProviderInfo
- func (p Pollinations) SupportsModel(model string) bool
- type Provider
- type ProviderInfo
- type ProviderRegistry
- type Quillbot
- func (p *Quillbot) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *Quillbot) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *Quillbot) GetInfo() ProviderInfo
- func (p *Quillbot) SupportsModel(model string) bool
- type StreamChoice
- type StreamChunk
- type Usage
- type Yqcloud
- func (p *Yqcloud) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
- func (p *Yqcloud) ChatCompletionStream(ctx context.Context, messages []Message, model string, ...) error
- func (p *Yqcloud) GetInfo() ProviderInfo
- func (p *Yqcloud) SupportsModel(model string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimatePromptTokens ¶
func NewProviderRegistry ¶
NewProviderRegistry is retained while the HTTP adapter migrates to app.Registry.
func NewRegistry ¶
Types ¶
type BlockRun ¶ added in v0.1.1
type BlockRun struct {
// contains filtered or unexported fields
}
BlockRun serves a keyless OpenAI-compatible free lane with a 30 req/min and 300 req/hour per-IP budget; upstreams may substitute another free model.
func NewBlockRun ¶ added in v0.1.1
func NewBlockRun() *BlockRun
func (BlockRun) ChatCompletion ¶ added in v0.1.1
func (BlockRun) ChatCompletionStream ¶ added in v0.1.1
func (BlockRun) GetInfo ¶ added in v0.1.1
func (p BlockRun) GetInfo() ProviderInfo
func (BlockRun) SupportsModel ¶ added in v0.1.1
type ChatCompletionResponse ¶
type ChatCompletionResponse = app.ChatCompletionResponse
func CreateResponse ¶
func CreateResponse(id, model, content string, promptTokens int) *ChatCompletionResponse
type CohereCommand ¶
type CohereCommand struct{}
CohereCommand implémente le provider CohereForAI C4AI Command (HuggingFace Space) Utilise le pattern SvelteKit/HuggingChat (conversation + FormData)
func (*CohereCommand) ChatCompletion ¶
func (p *CohereCommand) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
func (*CohereCommand) ChatCompletionStream ¶
func (*CohereCommand) GetInfo ¶
func (p *CohereCommand) GetInfo() ProviderInfo
func (*CohereCommand) SupportsModel ¶
func (p *CohereCommand) SupportsModel(model string) bool
type DeepAI ¶
type DeepAI struct {
// contains filtered or unexported fields
}
func (*DeepAI) ChatCompletion ¶
func (*DeepAI) ChatCompletionStream ¶
func (*DeepAI) GetInfo ¶
func (p *DeepAI) GetInfo() ProviderInfo
func (*DeepAI) SupportsModel ¶
type DuckAI ¶
type DuckAI struct {
// contains filtered or unexported fields
}
func (*DuckAI) ChatCompletion ¶
func (*DuckAI) ChatCompletionStream ¶
func (*DuckAI) GetInfo ¶
func (p *DuckAI) GetInfo() ProviderInfo
func (*DuckAI) SupportsModel ¶
type Jimmy ¶
type Jimmy struct {
// contains filtered or unexported fields
}
func (*Jimmy) ChatCompletion ¶
func (*Jimmy) ChatCompletionStream ¶
func (*Jimmy) GetInfo ¶
func (p *Jimmy) GetInfo() ProviderInfo
func (*Jimmy) SupportsModel ¶
type Kilo ¶ added in v0.1.1
type Kilo struct {
// contains filtered or unexported fields
}
Kilo serves its free model lane through a keyless OpenAI-compatible gateway.
func (Kilo) ChatCompletion ¶ added in v0.1.1
func (Kilo) ChatCompletionStream ¶ added in v0.1.1
func (Kilo) GetInfo ¶ added in v0.1.1
func (p Kilo) GetInfo() ProviderInfo
func (Kilo) SupportsModel ¶ added in v0.1.1
type OVH ¶ added in v0.1.1
type OVH struct {
// contains filtered or unexported fields
}
OVH serves anonymous, EU-hosted OpenAI-compatible endpoints; a 429 signals a rate limit rather than the end of the free offer.
func (OVH) ChatCompletion ¶ added in v0.1.1
func (OVH) ChatCompletionStream ¶ added in v0.1.1
func (OVH) GetInfo ¶ added in v0.1.1
func (p OVH) GetInfo() ProviderInfo
func (OVH) SupportsModel ¶ added in v0.1.1
type OpenCodeGo ¶ added in v0.1.2
type OpenCodeGo struct {
// contains filtered or unexported fields
}
OpenCodeGo relays OpenCode Go catalogue models through the same local gateway. These IDs need a Go credential configured in the gateway (API key or OAuth); voie callers still need no key.
func NewOpenCodeGo ¶ added in v0.1.2
func NewOpenCodeGo() *OpenCodeGo
func (OpenCodeGo) ChatCompletion ¶ added in v0.1.2
func (OpenCodeGo) ChatCompletionStream ¶ added in v0.1.2
func (OpenCodeGo) GetInfo ¶ added in v0.1.2
func (p OpenCodeGo) GetInfo() ProviderInfo
func (OpenCodeGo) SupportsModel ¶ added in v0.1.2
type OpenCodeZen ¶ added in v0.1.2
type OpenCodeZen struct {
// contains filtered or unexported fields
}
OpenCodeZen relays to a local opencode-zen gateway, which drives the free models of OpenCode Zen. The gateway exposes an OpenAI-compatible endpoint on loopback and requires only a local API key.
func NewOpenCodeZen ¶ added in v0.1.2
func NewOpenCodeZen() *OpenCodeZen
func (OpenCodeZen) ChatCompletion ¶ added in v0.1.2
func (OpenCodeZen) ChatCompletionStream ¶ added in v0.1.2
func (OpenCodeZen) GetInfo ¶ added in v0.1.2
func (p OpenCodeZen) GetInfo() ProviderInfo
func (OpenCodeZen) SupportsModel ¶ added in v0.1.2
type Perplexity ¶
type Perplexity struct{}
func (*Perplexity) ChatCompletion ¶
func (p *Perplexity) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)
func (*Perplexity) ChatCompletionStream ¶
func (*Perplexity) GetInfo ¶
func (p *Perplexity) GetInfo() ProviderInfo
func (*Perplexity) SupportsModel ¶
func (p *Perplexity) SupportsModel(model string) bool
type Pollinations ¶ added in v0.1.1
type Pollinations struct {
// contains filtered or unexported fields
}
Pollinations uses its legacy keyless text host; the replacement API requires a personal key and Pollen credits.
func NewPollinations ¶ added in v0.1.1
func NewPollinations() *Pollinations
func (Pollinations) ChatCompletion ¶ added in v0.1.1
func (Pollinations) ChatCompletionStream ¶ added in v0.1.1
func (Pollinations) GetInfo ¶ added in v0.1.1
func (p Pollinations) GetInfo() ProviderInfo
func (Pollinations) SupportsModel ¶ added in v0.1.1
type ProviderInfo ¶
type ProviderInfo = app.ProviderInfo
type ProviderRegistry ¶
type Quillbot ¶
type Quillbot struct{}
func (*Quillbot) ChatCompletion ¶
func (*Quillbot) ChatCompletionStream ¶
func (*Quillbot) GetInfo ¶
func (p *Quillbot) GetInfo() ProviderInfo
func (*Quillbot) SupportsModel ¶
type StreamChoice ¶ added in v0.0.8
type StreamChoice = app.StreamChoice
type StreamChunk ¶
type StreamChunk = app.StreamChunk
func CreateStreamChunk ¶
func CreateStreamChunk(id, model, content string) StreamChunk
type Yqcloud ¶
type Yqcloud struct{}
func (*Yqcloud) ChatCompletion ¶
func (*Yqcloud) ChatCompletionStream ¶
func (*Yqcloud) GetInfo ¶
func (p *Yqcloud) GetInfo() ProviderInfo