{"slug": "bringing-typesafe-ai-jev-model-to-go", "title": "Bringing TypeSafe AI Jev Model to Go", "summary": "A team built taurus-jev-sdk-go, an unofficial Go SDK for TypeSafe AI's Jev model, which returns structured values like probabilities, labels, and scores in 70-500ms instead of generating text token-by-token. The SDK wraps Jev's three question types — Noul, Choice, and Score — so Go backends can call the API without hand-writing HTTP requests and payloads. TypeSafe AI, founded by former OpenAI engineers, currently ships official SDKs only for Python and JavaScript/TypeScript.", "body_md": "The Jev model from TypeSafe AI introduces a System One approach, delivering structured data rapidly instead of slow text generation. Since official SDKs are only available for Python and JS, our team built taurus-jev-sdk-go. Here is how to use it in Go.\n\nAI engineers often face an inherent drawback: using traditional Large Language Models (such as GPT or Claude) for automation tasks like classification, risk scoring, or data routing is often slow and resource-intensive. These LLMs generate text token-by-token (autoregressively), resembling the \"System 2\" thinking pattern (deliberate, slow reasoning) in psychology. However, most backend systems require \"System 1\" decisions: fast reactions, intuitive judgment, and strongly typed return values.\n\nThat is why **TypeSafe AI** (founded by former OpenAI engineers) introduced a novel class of models: **System One Models**. Their first model is named **Jev**.\n\nJev operates as an intelligence function call. It does **NOT** generate text or chat. Instead, it takes raw data alongside a set of questions, then processes them in parallel to return structured outputs (Yes/No, scores, labels) paired with calibrated probabilities. By eliminating token generation, Jev achieves ultra-low latency, ranging from **70ms to 500ms**.\n\nWith Jev, every response is a standard value (`float`, `string`, `int`) ready for direct evaluation in `if/else` logic branches.\n\nTypeSafe AI currently provides official SDKs only for **Python** and **JavaScript/TypeScript**. If you work with a **Golang** backend, you would have to write raw HTTP requests, construct payloads, and handle errors manually.\n\nTo solve this, our team developed **[`taurus-jev-sdk-go`](https://github.com/KKloudTarus/taurus-jev-sdk-go)** so Gophers can integrate Jev seamlessly.\n\nTypeSafe AI supports three question types. The SDK covers all three:\n\n| Type | Intended Use | Return Value | \n|---|---|---|\n| `jev.Noul` | Is this statement true? | Probability `float` between 0 and 1 | \n| `jev.Choice` | Which label fits best? | Selected label + Confidence | \n| `jev.Score` | Rated scale evaluation | Numeric score + Legend + Confidence | \n\nConsider a real-world scenario: an automated **Support Ticket** processing pipeline. You need AI to inspect the ticket content and categorize it immediately:\n\n**Step 1** - Set the API Key from TypeSafe:\n\n```\nexport TYPESAFE_API_KEY=\"sk-typesafe-...\"\n```\n\n**Step 2** - Install the SDK:\n\n```\ngo get github.com/KKloudTarus/taurus-jev-sdk-go\n```\n\n**Step 3** - Call the API:\n\n```\npackage main\n\nimport (\n    \"context\"\n    \"errors\"\n    \"fmt\"\n    \"log\"\n\n    jev \"github.com/KKloudTarus/taurus-jev-sdk-go\"\n)\n\nfunc main() {\n    // Initialize Client (automatically reads TYPESAFE_API_KEY from environment)\n    client, err := jev.New()\n    if err != nil {\n        log.Fatalf(\"Failed to initialize client: %v\", err)\n    }\n\n    // State: Support ticket payload to analyze\n    state := map[string]any{\n        \"subject\": \"Duplicate charge\",\n        \"body\":    \"I was charged twice on my credit card. Please refund immediately!\",\n    }\n\n    // Send 3 questions simultaneously in a single request\n    response, err := client.SystemOne(context.Background(), state, jev.Questions{\n        \"is_billing\": jev.Noul{\n            Instructions: \"Does this ticket relate to a billing or refund issue?\",\n        },\n        \"tone\": jev.Choice{\n            Instructions: \"What is the primary tone of the user?\",\n            Criteria: map[string]any{\n                \"angry\": \"upset, hostile, or demanding\",\n                \"calm\":  \"neutral or polite\",\n            },\n        },\n        \"urgency\": jev.Score{\n            Instructions: \"How urgent is this ticket?\",\n            Criteria: []any{\n                \"Can wait for regular business hours\",\n                \"Needs attention this week\",\n                \"Needs immediate attention today\",\n            },\n        },\n    })\n    if err != nil {\n        switch {\n        case errors.Is(err, jev.ErrRateLimit), errors.Is(err, jev.ErrOverloaded):\n            log.Fatal(\"AI service overloaded, queuing ticket for retry...\")\n        case errors.Is(err, jev.ErrAuthentication):\n            log.Fatal(\"Invalid API Key!\")\n        default:\n            log.Fatalf(\"Error: %v\", err)\n        }\n    }\n\n    // Process results and execute business logic\n    if p, ok := response.NoulOf(\"is_billing\"); ok && p > 0.85 {\n        fmt.Printf(\"[Billing] Probability %.0f%%: routing to Accounting\\n\", p*100)\n    }\n\n    if tone, ok := response.ChoiceOf(\"tone\"); ok && tone.Label == \"angry\" {\n        fmt.Printf(\"[Tone] User is upset (confidence %.2f): escalating ticket\\n\", tone.Confidence)\n    }\n\n    if u, ok := response.ScoreOf(\"urgency\"); ok {\n        fmt.Printf(\"[Urgency] Level %d: %q\\n\", u.Score, u.Legend)\n    }\n}\n```\n\nEvery response from the model is pre-parsed into standard Go types without regex matching or manual string parsing.\n\nYou can check out the source code and try it yourself in the **[taurus-jev-sdk-go](https://github.com/KKloudTarus/taurus-jev-sdk-go)** repository. If you find it useful, feel free to give the repository a 🌟 **Star**. Happy coding!", "url": "https://wpnews.pro/news/bringing-typesafe-ai-jev-model-to-go", "canonical_source": "https://dev.to/truong_an_cornduck/bringing-typesafe-ai-jev-model-to-go-87n", "published_at": "2026-09-25 06:00:53+00:00", "updated_at": "2026-09-25 06:29:01.947037+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-agents"], "entities": ["TypeSafe AI", "Jev", "taurus-jev-sdk-go", "Go", "OpenAI", "Python", "JavaScript"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/bringing-typesafe-ai-jev-model-to-go", "markdown": "https://wpnews.pro/news/bringing-typesafe-ai-jev-model-to-go.md", "text": "https://wpnews.pro/news/bringing-typesafe-ai-jev-model-to-go.txt", "jsonld": "https://wpnews.pro/news/bringing-typesafe-ai-jev-model-to-go.jsonld"}}