Skip to content

Commit 901ded6

Browse files
committed
feat(jev): add TypeSafe decision integration
1 parent acc6cbd commit 901ded6

25 files changed

Lines changed: 1390 additions & 5 deletions

File tree

‎apps/docs/components/icons.tsx‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9936,3 +9936,16 @@ export function PitchBookIcon(props: SVGProps<SVGSVGElement>) {
99369936
</svg>
99379937
)
99389938
}
9939+
9940+
/** TypeSafe’s official mark from https://typesafe.ai. */
9941+
export function TypeSafeIcon(props: SVGProps<SVGSVGElement>) {
9942+
return (
9943+
<svg {...props} viewBox='0 0 21 32' fill='currentColor' xmlns='http://www.w3.org/2000/svg'>
9944+
<path
9945+
fillRule='evenodd'
9946+
clipRule='evenodd'
9947+
d='M10.36 0.071C10.55 -0.054 10.707 -0.008 10.757 0.166L15.57 2.792L15.33 3.23L15.748 2.953V8.81L20.542 11.425L20.224 12.008L20.742 11.663V23.613C20.742 23.889 20.556 24.238 20.326 24.391L10.383 31.02V30.402L10.12 30.885L5.323 28.269C5.124 28.365 4.972 28.262 4.972 28.012V22.153L0.398 19.659C0.176 19.797 0 19.697 0 19.428V7.478C0 7.201 0.186 6.853 0.416 6.7L10.36 0.071ZM6.27 27.645L10.49 29.947L19.434 23.985L15.212 21.684L6.27 27.645ZM10.775 12.743V18.218C10.775 18.494 10.589 18.842 10.359 18.995L5.804 22.032V26.957L14.915 20.882V9.983L10.775 12.743ZM15.747 20.827C15.747 20.83 15.746 20.832 15.746 20.835L19.91 23.107V12.219L15.747 9.948V20.827ZM1.34 19.033L5.401 21.249L9.435 18.56L5.373 16.345L1.34 19.033ZM0.832 7.423V18.373L4.972 15.613V10.139C4.972 9.863 5.158 9.515 5.388 9.361L9.944 6.324V1.349L0.832 7.423ZM5.804 15.44L9.943 17.697V12.913L5.804 10.655V15.44ZM6.271 9.771L10.335 11.988C10.343 11.982 10.351 11.975 10.359 11.97L14.374 9.291L10.313 7.077L6.271 9.771ZM10.776 6.189L14.916 8.447V3.573L10.776 1.316V6.189Z'
9948+
/>
9949+
</svg>
9950+
)
9951+
}

‎apps/docs/components/ui/icon-mapping.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ import {
286286
TTSIcon,
287287
TwilioIcon,
288288
TypeformIcon,
289+
TypeSafeIcon,
289290
UpstashIcon,
290291
UptimeRobotIcon,
291292
VantaIcon,
@@ -474,6 +475,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
474475
instantly: InstantlyIcon,
475476
intercom: IntercomIcon,
476477
intercom_v2: IntercomIcon,
478+
jev: TypeSafeIcon,
477479
jina: JinaAIIcon,
478480
jira: JiraIcon,
479481
jira_service_management: JiraServiceManagementIcon,
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
---
2+
title: Jev
3+
description: Make structured decisions with TypeSafe AI
4+
---
5+
6+
import { BlockInfoCard } from "@/components/ui/block-info-card"
7+
8+
<BlockInfoCard
9+
type="jev"
10+
color="#F386A1"
11+
/>
12+
13+
## Usage Instructions
14+
15+
Use TypeSafe AI’s Jev to classify content, score it against a rubric, or evaluate yes/no questions. Evaluate multiple questions against shared state in one request and route results using probabilities and confidence. Requires your own TypeSafe API key.
16+
17+
18+
19+
## Actions
20+
21+
### Jev Choice
22+
23+
Choose an option with Jev and return its probability distribution and confidence.
24+
25+
#### Input
26+
27+
| Parameter | Type | Required | Description |
28+
| --------- | ---- | -------- | ----------- |
29+
| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai |
30+
| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. |
31+
| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. |
32+
| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. |
33+
| `criteria` | json | Yes | Map of 1–255 option names to descriptions \(text, object, array, or null\). |
34+
35+
#### Output
36+
37+
| Parameter | Type | Description |
38+
| --------- | ---- | ----------- |
39+
| `choice` | string | Selected option |
40+
| `probabilities` | json | Probability of each option or rubric level |
41+
| `confidence` | number | Confidence in the answer, from 0 to 1 |
42+
| `model` | string | Versioned model ID used for evaluation |
43+
| `usage` | object | Token usage reported by TypeSafe |
44+
| ↳ `input_tokens` | number | Input tokens consumed |
45+
| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) |
46+
47+
### Jev Score
48+
49+
Score content against an ordered rubric with Jev, including probabilities and confidence.
50+
51+
#### Input
52+
53+
| Parameter | Type | Required | Description |
54+
| --------- | ---- | -------- | ----------- |
55+
| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai |
56+
| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. |
57+
| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. |
58+
| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. |
59+
| `criteria` | json | Yes | Ordered array of 2–10 rubric descriptions, from lowest to highest score. |
60+
61+
#### Output
62+
63+
| Parameter | Type | Description |
64+
| --------- | ---- | ----------- |
65+
| `score` | number | Probability-weighted, zero-based rubric score |
66+
| `legend` | json | Rubric descriptions keyed by level number |
67+
| `probabilities` | json | Probability of each option or rubric level |
68+
| `confidence` | number | Confidence in the answer, from 0 to 1 |
69+
| `model` | string | Versioned model ID used for evaluation |
70+
| `usage` | object | Token usage reported by TypeSafe |
71+
| ↳ `input_tokens` | number | Input tokens consumed |
72+
| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) |
73+
74+
### Jev Noul
75+
76+
Evaluate a yes/no question with Jev and return the probability that the answer is yes.
77+
78+
#### Input
79+
80+
| Parameter | Type | Required | Description |
81+
| --------- | ---- | -------- | ----------- |
82+
| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai |
83+
| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. |
84+
| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. |
85+
| `instructions` | json | Yes | The question to evaluate, as text, a JSON object, or an array. |
86+
| `criteria` | json | No | Optional object with true and false descriptions defining what yes and no mean. |
87+
88+
#### Output
89+
90+
| Parameter | Type | Description |
91+
| --------- | ---- | ----------- |
92+
| `noul` | number | Probability of yes, from 0 \(no\) to 1 \(yes\) |
93+
| `model` | string | Versioned model ID used for evaluation |
94+
| `usage` | object | Token usage reported by TypeSafe |
95+
| ↳ `input_tokens` | number | Input tokens consumed |
96+
| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) |
97+
98+
### Jev Evaluate
99+
100+
Evaluate multiple Choice, Score, and Noul questions against shared state in one Jev request.
101+
102+
#### Input
103+
104+
| Parameter | Type | Required | Description |
105+
| --------- | ---- | -------- | ----------- |
106+
| `apiKey` | string | Yes | TypeSafe API key from https://console.typesafe.ai |
107+
| `model` | string | No | Model ID or alias: jev-1.13.0, jev-latest, or jev-preview. Defaults to jev-1.13.0. |
108+
| `state` | json | Yes | Content to evaluate: a text string, JSON object, or array. |
109+
| `questions` | json | Yes | Map of question IDs to \{type, instructions, criteria\}. Types: choice \(option map\), score \(2–10 ordered levels\), noul \(optional true/false descriptions\). Answers use the same IDs. |
110+
111+
#### Output
112+
113+
| Parameter | Type | Description |
114+
| --------- | ---- | ----------- |
115+
| `answers` | json | Answers keyed by question ID. Choice: type, choice, probabilities, confidence. Score: type, score, legend, probabilities, confidence. Noul: type, noul. |
116+
| `model` | string | Versioned model ID used for evaluation |
117+
| `usage` | object | Token usage reported by TypeSafe |
118+
| ↳ `input_tokens` | number | Input tokens consumed |
119+
| ↳ `output_tokens` | number | Output tokens produced \(not billed by TypeSafe\) |
120+
121+

‎apps/docs/content/docs/integrations/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"infisical",
132132
"instantly",
133133
"intercom",
134+
"jev",
134135
"jina",
135136
"jira",
136137
"jira_service_management",

0 commit comments

Comments
 (0)