new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Providers · all subjects

open-responses/capabilities

5 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Open Responses supported AI SDK functions

Open Responses models support generateText and streamText functions, and they support structured data generation with Output (AI SDK Core).

Open Responses file inputs support

The provider supports image and non-image file inputs in user messages. Images are sent as input_image parts, while other media types such as PDFs are sent as input_file parts. Files can be provided as inline data or as URLs.

Open Responses file input example

Example code: import { createOpenResponses } from '@ai-sdk/open-responses'; import { readFileSync } from 'node:fs'; import { generateText } from 'ai'; const openResponses = createOpenResponses({ name: 'lmstudio', url: 'http://localhost:1234/v1/responses', }); const { text } = await generateText({ model: openResponses('your-file-capable-model-id'), messages: [ { role: 'user', content: [ { type: 'text', text: 'Summarize this document.', }, { type: 'file', data: readFileSync('./document.pdf'), mediaType: 'application/pdf', filename: 'document.pdf', }, ], }, ], }); console.log(text);

Open Responses unsupported features

Stop sequences, topK, and seed are not supported and are ignored with warnings. The provider supports language models only and does not provide embedding or image generation models. Provider-specific built-in tools and options require a dedicated provider implementation. AI SDK function tools are supported.

Text generation with Open Responses

Open Responses integration supports both streaming and non-streaming text generation using the AI SDK. **Setup:** ```javascript import { createOpenResponses } from '@ai-sdk/open-responses'; import { streamText, generateText } from 'ai'; const openResponses = createOpenResponses({ name: 'lmstudio', url: 'http://localhost:1234/v1/responses', }); ``` **Streaming text with streamText:** ```javascript const result = streamText({ model: openResponses('your-model-id'), prompt: 'Invent a new holiday and describe its traditions.', }); for await (const textPart of result.textStream) { process.stdout.write(textPart); } ``` **Non-streaming text with generateText:** ```javascript const { text } = await generateText({ model: openResponses('your-model-id'), prompt: 'Invent a new holiday and describe its traditions.', }); console.log(text); ``` Both approaches use the same model initialization with LM Studio at `http://localhost:1234/v1/responses`.

Give your agent this brain