SDKs & clients
A small async LangGraph workflow that sends a mocked email to TypeSafe's Jev model,
from typesafe_sdk import AsyncTypeSafeClient, Choice, Noul, Scoresrc/typesafe_ai_basic/test_basic.py:3
The link points at the commit we read, so the line number still holds.
These question sets are lifted from this project's source exactly as written.
from src/typesafe_ai_basic/test_basic.py:13
billingtrue/falseIs this ticket about billing?
urgencyscoreHow urgent is this ticket?
0 — can wait1 — this week2 — todayimport { experimental_evaluate as evaluate } from 'ai';
const { answers } = await evaluate({
model: 'typesafe-ai/jev',
state,
questions: {
billing: { type: 'boolean', instructions: 'Is this ticket about billing?' },
urgency: { type: 'score', instructions: 'How urgent is this ticket?',
criteria: ['can wait', 'this week', 'today'] },
},
});