
The Open Source AI Toolkit for TypeScript. Built by @Vercel.
- Tweets688
- Following4
- Followers36.7K
- Likes82
![Code snippet using Jev 1.14.0 to decide whether a cat is shown in an image.
import { experimental_decide as decide } from 'ai'
import { readFileSync } from 'node:fs'
const { answers } = await decide({
model: 'typesafe-ai/jev-1.14.0',
state: [
{
type: 'file',
mediaType: 'image',
data: readFileSync('cat.jpg')
}
],
questions: {
cat: {
type: 'boolean',
instructions: 'Does the image show a cat?'
}
}
})
console.log(answers.cat.probability)](https://pbs.twimg.com/media/HU_DZdmakAElgfE.jpg?name=small&format=webp)
ALT Code snippet using Jev 1.14.0 to decide whether a cat is shown in an image. import { experimental_decide as decide } from 'ai' import { readFileSync } from 'node:fs' const { answers } = await decide({ model: 'typesafe-ai/jev-1.14.0', state: [ { type: 'file', mediaType: 'image', data: readFileSync('cat.jpg') } ], questions: { cat: { type: 'boolean', instructions: 'Does the image show a cat?' } } }) console.log(answers.cat.probability)

ALT Code snippet showcasing a text streaming function using Gemini 4 Argon to generate database guide content efficiently: import { streamText } from "ai" const result = streamText({ model:"google/gemini-4-argon", prompt: "Write a detailed guide to building a relational database from scratch", maxOutputTokens: 200_000 }) for await (const textPart of result.textStream) { process.stdout.write(textPart); }

ALT A code snippet shows an import statement for generating text using an AI model, detailing a prompt for creating a new holiday: import { generateText } from 'ai' const { text } = await generateText({ model: 'anthropic/claude-sonnet-5.5', prompt: 'Invent a new holiday and describe its traditions.' })

ALT Code snippet shows an import statement and a function call to generate text using the Claude Sonnet 5.5 model with a specified prompt: import { generateText } from 'ai'; const { text } = await generateText({ model: 'anthropic/claude-sonnet-5.5', prompt: 'Invent a new holiday and describe its traditions.', });















