jev

package
v0.1.96 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: MIT Imports: 8 Imported by: 0

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

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) ChatCompletion

func (p *Provider) ChatCompletion(_ context.Context, _ *core.ChatRequest) (*core.ChatResponse, error)

ChatCompletion reports that System One has no chat API.

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. It is the only way to reach the evaluation endpoint, 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