Documentation
¶
Index ¶
- type Endpoint
- type Option
- type Provider
- func (p *Provider) ChatCompletion(ctx context.Context, req inferrouter.ProviderRequest) (inferrouter.ProviderResponse, error)
- func (p *Provider) ChatCompletionStream(ctx context.Context, req inferrouter.ProviderRequest) (inferrouter.ProviderStream, error)
- func (p *Provider) Name() string
- func (p *Provider) SupportsModel(model string) bool
- func (p *Provider) SupportsMultimodal() bool
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 WithModels ¶
WithModels sets the list of supported models.
func WithTimeout ¶
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 (*Provider) ChatCompletion ¶
func (p *Provider) ChatCompletion(ctx context.Context, req inferrouter.ProviderRequest) (inferrouter.ProviderResponse, error)
func (*Provider) ChatCompletionStream ¶
func (p *Provider) ChatCompletionStream(ctx context.Context, req inferrouter.ProviderRequest) (inferrouter.ProviderStream, error)
func (*Provider) SupportsModel ¶
func (*Provider) SupportsMultimodal ¶
Click to show internal directories.
Click to hide internal directories.