gonka

package
v0.0.0-...-d0c75b9 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	URL     string // HTTP endpoint (e.g. "https://node1.gonka.ai/v1")
	Address string // Cosmos bech32 address of the node (transfer_address in signing)
}

Endpoint represents a Gonka inference node.

type Option

type Option func(*config)

Option configures the Gonka provider.

func WithBaseTransport

func WithBaseTransport(rt http.RoundTripper) Option

WithBaseTransport sets the underlying HTTP transport (before signing).

func WithEndpoint

func WithEndpoint(e Endpoint) Option

WithEndpoint sets the Gonka node endpoint.

func WithModels

func WithModels(models ...string) Option

WithModels sets the list of supported models.

func WithName

func WithName(name string) Option

WithName sets the provider name (default: "gonka").

func WithTimeout

func WithTimeout(d time.Duration) Option

WithTimeout sets the HTTP client timeout. Default is 120s — generous for Gonka's P2P network.

type Provider

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

Provider is the Gonka decentralized AI compute network adapter. It composes openaicompat.Provider with ECDSA request signing.

Auth.APIKey is used to pass the hex-encoded secp256k1 private key. The signing transport reads it from the Authorization header, replaces it with the ECDSA signature, and adds Gonka-specific headers.

func New

func New(opts ...Option) *Provider

New creates a new Gonka provider.

func (*Provider) ChatCompletion

func (*Provider) ChatCompletionStream

func (p *Provider) ChatCompletionStream(ctx context.Context, req inferrouter.ProviderRequest) (inferrouter.ProviderStream, error)

func (*Provider) Name

func (p *Provider) Name() string

func (*Provider) SupportsModel

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

func (*Provider) SupportsMultimodal

func (p *Provider) SupportsMultimodal() bool

Jump to

Keyboard shortcuts

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