providers

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 35 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimatePromptTokens

func EstimatePromptTokens(messages []Message) int

func NewProviderRegistry

func NewProviderRegistry() *app.Registry

NewProviderRegistry is retained while the HTTP adapter migrates to app.Registry.

func NewRegistry

func NewRegistry() *app.Registry

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 (p BlockRun) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (BlockRun) ChatCompletionStream added in v0.1.1

func (p BlockRun) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (BlockRun) GetInfo added in v0.1.1

func (p BlockRun) GetInfo() ProviderInfo

func (BlockRun) SupportsModel added in v0.1.1

func (p BlockRun) SupportsModel(model string) bool

type ChatCompletionResponse

type ChatCompletionResponse = app.ChatCompletionResponse

func CreateResponse

func CreateResponse(id, model, content string, promptTokens int) *ChatCompletionResponse

type Choice

type Choice = app.Choice

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 (p *CohereCommand) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

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 (p *DeepAI) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (*DeepAI) ChatCompletionStream

func (p *DeepAI) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (*DeepAI) GetInfo

func (p *DeepAI) GetInfo() ProviderInfo

func (*DeepAI) SupportsModel

func (p *DeepAI) SupportsModel(model string) bool

type Delta

type Delta = app.Delta

type DuckAI

type DuckAI struct {
	// contains filtered or unexported fields
}

func NewDuckAI

func NewDuckAI() *DuckAI

func (*DuckAI) ChatCompletion

func (p *DuckAI) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (*DuckAI) ChatCompletionStream

func (p *DuckAI) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (*DuckAI) GetInfo

func (p *DuckAI) GetInfo() ProviderInfo

func (*DuckAI) SupportsModel

func (p *DuckAI) SupportsModel(model string) bool

type Jimmy

type Jimmy struct {
	// contains filtered or unexported fields
}

func (*Jimmy) ChatCompletion

func (p *Jimmy) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (*Jimmy) ChatCompletionStream

func (p *Jimmy) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (*Jimmy) GetInfo

func (p *Jimmy) GetInfo() ProviderInfo

func (*Jimmy) SupportsModel

func (p *Jimmy) SupportsModel(model string) bool

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 NewKilo added in v0.1.1

func NewKilo() *Kilo

func (Kilo) ChatCompletion added in v0.1.1

func (p Kilo) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (Kilo) ChatCompletionStream added in v0.1.1

func (p Kilo) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (Kilo) GetInfo added in v0.1.1

func (p Kilo) GetInfo() ProviderInfo

func (Kilo) SupportsModel added in v0.1.1

func (p Kilo) SupportsModel(model string) bool

type Message

type Message = app.Message

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 NewOVH added in v0.1.1

func NewOVH() *OVH

func (OVH) ChatCompletion added in v0.1.1

func (p OVH) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (OVH) ChatCompletionStream added in v0.1.1

func (p OVH) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (OVH) GetInfo added in v0.1.1

func (p OVH) GetInfo() ProviderInfo

func (OVH) SupportsModel added in v0.1.1

func (p OVH) SupportsModel(model string) bool

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 (p OpenCodeGo) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (OpenCodeGo) ChatCompletionStream added in v0.1.2

func (p OpenCodeGo) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (OpenCodeGo) GetInfo added in v0.1.2

func (p OpenCodeGo) GetInfo() ProviderInfo

func (OpenCodeGo) SupportsModel added in v0.1.2

func (p OpenCodeGo) SupportsModel(model string) bool

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 (p OpenCodeZen) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (OpenCodeZen) ChatCompletionStream added in v0.1.2

func (p OpenCodeZen) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (OpenCodeZen) GetInfo added in v0.1.2

func (p OpenCodeZen) GetInfo() ProviderInfo

func (OpenCodeZen) SupportsModel added in v0.1.2

func (p OpenCodeZen) SupportsModel(model string) bool

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 (p *Perplexity) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

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 (p Pollinations) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (Pollinations) ChatCompletionStream added in v0.1.1

func (p Pollinations) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (Pollinations) GetInfo added in v0.1.1

func (p Pollinations) GetInfo() ProviderInfo

func (Pollinations) SupportsModel added in v0.1.1

func (p Pollinations) SupportsModel(model string) bool

type Provider

type Provider = app.Provider

type ProviderInfo

type ProviderInfo = app.ProviderInfo

type ProviderRegistry

type ProviderRegistry = app.Registry

type Quillbot

type Quillbot struct{}

func (*Quillbot) ChatCompletion

func (p *Quillbot) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (*Quillbot) ChatCompletionStream

func (p *Quillbot) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (*Quillbot) GetInfo

func (p *Quillbot) GetInfo() ProviderInfo

func (*Quillbot) SupportsModel

func (p *Quillbot) SupportsModel(model string) bool

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 Usage

type Usage = app.Usage

type Yqcloud

type Yqcloud struct{}

func (*Yqcloud) ChatCompletion

func (p *Yqcloud) ChatCompletion(ctx context.Context, messages []Message, model string) (*ChatCompletionResponse, error)

func (*Yqcloud) ChatCompletionStream

func (p *Yqcloud) ChatCompletionStream(ctx context.Context, messages []Message, model string, callback func(chunk string)) error

func (*Yqcloud) GetInfo

func (p *Yqcloud) GetInfo() ProviderInfo

func (*Yqcloud) SupportsModel

func (p *Yqcloud) SupportsModel(model string) bool

Jump to

Keyboard shortcuts

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