Skip to content

typesafeai-go

Small independent Go client for TypeSafe's System One API with typed Noul, Choice and Score questions and answers.

Librarybeta

Overview

typesafeai-go is a small Go client for the TypeSafe AI API, developed independently from the official Python and JavaScript SDKs. You build a map of typed questions (NoulQuestion, ChoiceQuestion, ScoreQuestion), create a SystemOneClient with your key and an http.Client, and send a SystemOneRequest with state, model and questions; answers come back as typed values that you type-assert.

The quickstart asks whether 42 is even with explicit true and false descriptions. A more detailed example is in the repository. Requests specify the model explicitly, for example ModelJevLatest, and answers come back as typed values that the caller type-asserts, as the noul example shows. A more detailed example lives in examples/noul.go.

What the decision model decides

TypeQuestionAnswers
Yes / noIs the following number even?: 42even · odd

How it works

  1. Create a SystemOneClient with your key.
  2. Build typed questions and a request.
  3. Call Do with a context.
  4. Type-assert and read answers.

Strengths

  • Minimal and explicit API.
  • Bring your own http.Client.

Caveats

  • Small project with limited documentation.
  • Requires a TypeSafe key.

Getting started

go get github.com/chez-shanpu/typesafeai-go

At a glance

Type
Library
Status
beta
Language
Go
Runtime
library
Has code
yes

Use cases and integrations

How curated lists describe it

Frequently asked questions

Is it official?

No, it is developed independently.

How are answers read?

By type-asserting entries in resp.Answers.

Can I choose the HTTP client?

Yes, you pass one to NewSystemOneClient.

Related projects

  • Hack Club's lightweight LLM proxy, listed for adding a Jev forwarding endpoint behind its auth, limits and usage logging.

    MCP serverproductionTypeScript
  • Ax, a DSPy-style multi-language LLM framework, listed with a native TypeSafe provider for Boolean, Choice, Score and raw Jev questions.

    PluginproductionTypeScript
  • Effect TypeScript library whose @effect/ai-typesafe package maps classify, probability and rating operations to Jev questions.

    ProjectproductionTypeScript
  • PHP monorepo whose Polyglot module adds a TypeSafe driver for typed Noul, Choice and Score decisions alongside LLM inference.

    ProjectproductionPHP
  • Go MCP server giving any client typed Jev decisions via OpenRouter or TypeSafe, with validated answers and no paid retries.

    MCP serverproductionGo
  • Simon Willison's LLM plugin that adds Jev as a model for yes/no, choice and score questions from the command line.

    PluginproductionPython