shipwithjev

Catalog / Tools & apps

0484GitHub

kunobi-jev

Rust client, published on crates.io.

kunobi-ninja/kunobi-jevREADME ↗
# kunobi-jev

[](https://crates.io/crates/kunobi-jev)
[](https://docs.rs/kunobi-jev)
[](https://github.com/kunobi-ninja/kunobi-jev/actions/workflows/ci.yml)
[](LICENSE)
[](Cargo.toml)

Rust client for the [TypeSafe](https://docs.typesafe.ai) System One API. You send
state and typed questions to Jev, TypeSafe's decision model, and get answers your
code can act on: a label, a score or a probability, each with the numbers behind it.

Jev has three question types:

| Builder | Asks | Answer |
| --- | --- | --- |
| `noul` | a yes/no question | `noul`: probability of yes |
| `choice` / `choice_labels` | which label fits | `choice`, `confidence`, `probabilities` per label |
| `score` | where it falls on ordered levels | expected `score`, `confidence`, `legend`, `probabilities` |

A Choice takes up to 255 options and a Score between 2 and 10 levels; the client
refuses more before sending. `ScoreAnswer::normalized()` puts a score on 0 to 1 so
rubrics of different lengths can be combined, and `ranked()` orders a choice's
probabilities most likely first.

All questions in one call are answered against the same state in a single request,
and that is the cheap way to use it: the state is charged once however many questions
ride along. Measured against the live API, a 24k-token state with one question costs
24,288 input tokens and the same state with 200 questions costs 26,676, while latency
stays flat. Asking one question per call re-sends the state every time.

This is an unofficial client, maintained by Kunobi. It is not affiliated with TypeSafe.

## Install

```toml
kunobi-jev = "0.2"
```

Calls run on Tokio.

| Feature | Default | What it does |
| --- | --- | --- |
| `rustls` | yes | TLS through rustls |
| `blocking` | no | `blocking::Client`, for callers with no async runtime |

Also filed under Tools & apps