systemone

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package systemone answers OpenAI Decisions requests with TypeSafe's System One API, which asks the same three kinds of question under other names: a predicate is a noul, and choice and score keep their names. It serves every provider whose upstream speaks System One: jev (hosted Jev and self-hosted Kev servers) and OpenRouter, which serves Jev and Kev natively.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnswerDecisions

func AnswerDecisions(ctx context.Context, req *core.PassthroughRequest, send Sender, opts Options) (*core.PassthroughResponse, error)

AnswerDecisions answers an OpenAI Decisions request with System One. The request is translated to a System One request, sent to /v1/systemone through send, and the answer translated back, so the caller sees OpenAI's shapes. Members System One has no place for (prompt caching, safety_identifier) are dropped. Images become System One image assets, which TypeSafe serves only with the TypeSafe-Danger-Zone-Images header; the gateway does not fetch images, so they must arrive inline as base64 data URLs.

Types

type Options

type Options struct {
	// ProviderType names the provider in errors.
	ProviderType string
	// ImagesRefusal, when set, refuses a request with images with this
	// message: the upstream reads text only.
	ImagesRefusal string
}

Options describe the provider a Decisions request is answered for.

type Sender

Sender sends one System One request upstream: a provider's Passthrough.

Jump to

Keyboard shortcuts

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