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

spark/setup

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.

Spark provider compatibility with AI SDK

The Spark community provider is not yet compatible with AI SDK 5. Users are advised to wait for the provider to be updated or consider using an AI SDK 5 compatible provider instead.

Spark provider installation

The Spark provider is available in the spark-ai-provider module. Install it using the command: npm i spark-ai-provider

Spark provider import

Import createSparkProvider from the spark-ai-provider module to create a provider instance: import { createSparkProvider } from 'spark-ai-provider';

Spark provider initialization

Create a Spark provider instance by calling createSparkProvider with a configuration object containing the apiKey property.

Spark provider example usage

Example code showing Spark provider usage: import { createSparkProvider } from './index.mjs'; import { generateText } from 'ai'; const spark = createSparkProvider({ apiKey: '', }); const { text } = await generateText({ model: spark('lite'), prompt: 'Write a vegetarian lasagna recipe for 4 people.', });

Give your agent this brain