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

ollm/setup

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

OLLM provider module name

The OLLM provider for the AI SDK is available in the @ofoundation/ollm module.

OLLM provider instantiation

Create an OLLM provider instance using the createOLLM function, which accepts an apiKey parameter. Example: const ollm = createOLLM({ apiKey: 'YOU••••••EY' }). The API key can be obtained from the OLLM Dashboard at https://console.ollm.com/dashboard/api-keys.

OLLM chat model usage

Use ollm.chatModel() to instantiate chat models. All OLLM models run with confidential computing by default. Example: const confidentialModel = ollm.chatModel('near/GLM-4.7').

OLLM generateText example

Example of using OLLM with generateText: import { createOLLM } from '@ofoundation/ollm'; import { generateText } from 'ai'; const ollm = createOLLM({ apiKey: 'YOU••••••EY' }); const { text } = await generateText({ model: ollm.chatModel('near/GLM-4.6'), prompt: 'What is OLLM?' }); console.log(text);

OLLM streamText example

Example of using OLLM with streamText: import { createOLLM } from '@ofoundation/ollm'; import { streamText } from 'ai'; const ollm = createOLLM({ apiKey: 'YOU••••••EY' }); const result = streamText({ model: ollm.chatModel('near/GLM-4.6'), prompt: 'Write a short story about secure AI.' }); for await (const chunk of result.textStream) { console.log(chunk); }

OLLM system messages example

Example of using OLLM with system messages: import { createOLLM } from '@ofoundation/ollm'; import { generateText } from 'ai'; const ollm = createOLLM({ apiKey: 'YOU••••••EY' }); const { text } = await generateText({ model: ollm.chatModel('near/GLM-4.6'), system: 'You are a helpful assistant that responds concisely.', prompt: 'What is TypeScript in one sentence?' }); console.log(text);

Give your agent this brain