Documentation
¶
Overview ¶
Package systemone implements inference.Provider over the "typed decision" wire protocol: POST {base}/systemone with a shared state and a named typed question, answered with a probability distribution rather than generated text.
One Provider covers every server that speaks it: TypeSafe's hosted Jev (directly, or fronted by the Vercel AI Gateway), and self-hosted logit-scoring servers such as simple-jev, which serve the same shape over any open model. Only the "choice" question type is implemented — the generic inference.Request/Response shape has no use for the noul or score question types the wire protocol also supports.
Index ¶
Constants ¶
const DefaultModel = "jev-latest"
DefaultModel is TypeSafe's rolling Jev model alias, used when Config.Model is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// BaseURL is the systemone server root (e.g.
// https://api.typesafe.ai/v1, or a Vercel AI Gateway / self-hosted
// simple-jev root). Required.
BaseURL string
// APIKey authenticates via "Authorization: Bearer <key>". May be empty
// for a keyless self-hosted server (see register.go's loopback rule).
APIKey string
// Model overrides DefaultModel.
Model string
// Timeout bounds a single HTTP call. Ignored when HTTPClient is set.
Timeout time.Duration
// HTTPClient lets the caller provide a custom transport (test
// httptest server, timeouts). Default is a Timeout-bounded client.
HTTPClient *http.Client
}
Config configures a Provider.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider answers inference.Request calls against the typed-decision wire protocol.
func (*Provider) ApplyHTTPTuning ¶ added in v2.12.0
func (p *Provider) ApplyHTTPTuning(t base.HTTPTuning) error
ApplyHTTPTuning replaces the provider's HTTP client with a tuned copy, implementing base.HTTPTunable so a provider file's headers, request_timeout and http_transport reach this backend.