jev

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 11 Imported by: 0 modules, 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

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. The gateway forwards it natively, at POST /v1/systemone or through passthrough at /p/jev/systemone, and answers OpenAI's Decisions API (POST /v1/decisions) with it by translating both ways (see decisions.go).

Index

Constants

This section is empty.

Variables

View Source
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

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) AcceptsUnlistedModels added in v0.1.98

func (p *Provider) AcceptsUnlistedModels() bool

AcceptsUnlistedModels reports that the upstream accepts versioned IDs (jev-1.13.0) it does not list: TypeSafe lists only its aliases.

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) Decisions added in v0.1.106

Decisions answers an OpenAI Decisions request with System One; see systemone.AnswerDecisions. Only TypeSafe's hosted API reads images.

func (*Provider) DecisionsReadImages added in v0.1.106

func (p *Provider) DecisionsReadImages() bool

DecisionsReadImages reports whether this provider reads images: only TypeSafe's hosted API does. It is what the gateway checks before choosing a jev target for an image request, so a Kev server is skipped even when its models carry no capabilities, as with models_mode: allowlist.

func (*Provider) Embeddings

Embeddings reports that System One has no embeddings API.

func (*Provider) ListModels

func (p *Provider) ListModels(ctx context.Context) (*core.ModelsResponse, error)

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

Passthrough forwards a System One request as the client wrote it. Both /v1/systemone and /p/jev/... reach the evaluation endpoint through it, since the request and answer shapes have no OpenAI equivalent.

func (*Provider) Responses

Responses reports that System One has no Responses API.

func (*Provider) SetBaseURL

func (p *Provider) SetBaseURL(url string)

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.

Jump to

Keyboard shortcuts

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