Documentation
¶
Overview ¶
Package jev provides TypeSafe's Jev (System One) API integration for the gateway, and covers the self-hosted Kev servers that implement the same API. System One is a decision API rather than a text-generation one: a request carries a state and a map of typed questions (noul, choice, score) and the answer is a calibrated probability per question. It has no OpenAI-compatible surface, so the gateway reaches it through native passthrough at /p/jev/systemone.
Index ¶
- Variables
- func New(cfg providers.ProviderConfig, opts providers.ProviderOptions) core.Provider
- type Provider
- func (p *Provider) ChatCompletion(_ context.Context, _ *core.ChatRequest) (*core.ChatResponse, error)
- func (p *Provider) Embeddings(_ context.Context, _ *core.EmbeddingRequest) (*core.EmbeddingResponse, error)
- func (p *Provider) ListModels(ctx context.Context) (*core.ModelsResponse, error)
- func (p *Provider) Passthrough(ctx context.Context, req *core.PassthroughRequest) (*core.PassthroughResponse, error)
- func (p *Provider) Responses(_ context.Context, _ *core.ResponsesRequest) (*core.ResponsesResponse, error)
- func (p *Provider) SetBaseURL(url string)
- func (p *Provider) StreamChatCompletion(_ context.Context, _ *core.ChatRequest) (io.ReadCloser, error)
- func (p *Provider) StreamResponses(_ context.Context, _ *core.ResponsesRequest) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
var Registration = providers.Registration{ Type: "jev", New: New, PassthroughSemanticEnricher: passthroughSemanticEnricher, Discovery: providers.DiscoveryConfig{ DefaultBaseURL: defaultBaseURL, AllowAPIKeyless: true, }, }
Registration provides factory registration for the Jev provider. The hosted TypeSafe API needs a key; a local Kev server has no authentication of its own, so a base URL alone configures the provider.
Functions ¶
func New ¶
func New(cfg providers.ProviderConfig, opts providers.ProviderOptions) core.Provider
New creates a Jev provider. The client is rooted at the API origin, which is how TypeSafe's SDKs are configured (https://api.typesafe.ai, with /v1 added per request); a base URL written with the /v1 suffix every other provider here uses is accepted and trimmed, so both spellings address the same server.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider implements the model listing and native passthrough against one System One server. Chat, Responses, and embeddings return invalid_request_error because the API has no such endpoints.
func (*Provider) ChatCompletion ¶
func (p *Provider) ChatCompletion(_ context.Context, _ *core.ChatRequest) (*core.ChatResponse, error)
ChatCompletion reports that System One has no chat API.
func (*Provider) Embeddings ¶
func (p *Provider) Embeddings(_ context.Context, _ *core.EmbeddingRequest) (*core.EmbeddingResponse, error)
Embeddings reports that System One has no embeddings API.
func (*Provider) ListModels ¶
ListModels returns the names a request's model field may carry. Aliases are listed as models of their own, so a request that names one (jev-latest on a Kev server) resolves against the catalog like any other model.
func (*Provider) Passthrough ¶
func (p *Provider) Passthrough(ctx context.Context, req *core.PassthroughRequest) (*core.PassthroughResponse, error)
Passthrough forwards a System One request as the client wrote it. It is the only way to reach the evaluation endpoint, since the request and answer shapes have no OpenAI equivalent.
func (*Provider) Responses ¶
func (p *Provider) Responses(_ context.Context, _ *core.ResponsesRequest) (*core.ResponsesResponse, error)
Responses reports that System One has no Responses API.
func (*Provider) SetBaseURL ¶
SetBaseURL allows configuring a custom base URL for the provider.
func (*Provider) StreamChatCompletion ¶
func (p *Provider) StreamChatCompletion(_ context.Context, _ *core.ChatRequest) (io.ReadCloser, error)
StreamChatCompletion reports that System One has no chat API.
func (*Provider) StreamResponses ¶
func (p *Provider) StreamResponses(_ context.Context, _ *core.ResponsesRequest) (io.ReadCloser, error)
StreamResponses reports that System One has no Responses API.