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

respan/setup

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

Respan setup with npm install

To set up Respan observability with the AI SDK, install the packages: npm install ai @ai-sdk/openai @respan/respan @respan/instrumentation-vercel

Respan environment variable configuration

Set the RESPAN_API_KEY environment variable to your Respan API key. Retrieve your API key from platform.respan.ai/platform/api/api-keys.

Respan initialization for Next.js

To initialize Respan in a Next.js project, follow these steps: 1. Create an instrumentation.ts file at the root of your Next.js project with the following code: ```typescript import { Respan } from '@respan/respan'; import { VercelAIInstrumentor } from '@respan/instrumentation-vercel'; export async function register() { const respan = new Respan({ apiKey: process.env.RESPAN_API_KEY, instrumentations: [new VercelAIInstrumentor()], }); await respan.initialize(); } ``` 2. Update your next.config.ts file to include serverExternalPackages configuration: ```typescript import type { NextConfig } from 'next'; const nextConfig: NextConfig = { serverExternalPackages: ['@respan/respan', '@respan/instrumentation-vercel'], }; export default nextConfig; ``` This setup imports Respan and VercelAIInstrumentor, initializes Respan with your apiKey from environment variables and the instrumentations array in the register function, and configures Next.js to handle the Respan packages as external server packages.

Respan initialization code example for serverless and Node.js

Initialize Respan at the top of your handler or entry point in serverless and Node.js environments. Import Respan and VercelAIInstrumentor, create a new Respan instance with your apiKey and instrumentations array, then call await respan.initialize(). ```javascript import { Respan } from '@respan/respan'; import { VercelAIInstrumentor } from '@respan/instrumentation-vercel'; const respan = new Respan({ apiKey: process.env.RESPAN_API_KEY, instrumentations: [new VercelAIInstrumentor()], }); await respan.initialize(); ```

Give your agent this brain