Skip to content

Examples EN

sungaowei edited this page Oct 16, 2026 · 1 revision

Examples

English | 简体中文


Runnable programs live in the repository under examples/.

Example Shows
examples/quickstart One SystemOne call with all three base primitives, printing every answer.
examples/advanced SystemOneAs generic decoding with custom struct, Models.List, per-call options, WithExtraBody, typed error handling, and a redacting logger.

Running Locally

Run them from a clone of the repository:

export TYPESAFE_API_KEY="ts_live_..."

go run ./examples/quickstart
go run ./examples/advanced

Expected output from quickstart:

model: jev-1.13.0
tokens: 492 in / 72 out
request id: req_01a0b7...
noul   is_billing p(true)=0.9900
choice category   billing (confidence 1.00, p=map[billing:1 other:0 technical:0])
score  urgency    1.90/2.0 (confidence 0.85)

Clone this wiki locally