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

langdb/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.

LangDB OpenAI-compatible APIs

LangDB provides OpenAI-compatible APIs, enabling developers to connect with multiple LLMs by changing just two lines of code.

LangDB supported capabilities

LangDB supports the following capabilities: access to all major LLMs, plug-and-play functionality with frameworks like Langchain, Vercel AI SDK, and CrewAI, tracing and cost optimization features, and dynamic request routing to the most suitable LLM based on predefined parameters.

LangDB generateText example

Example of using LangDB with generateText function: import { createLangDB } from '@langdb/vercel-provider'; import { generateText } from 'ai'; const langdb = createLangDB({ apiKey: process.env.LANGDB_API_KEY, projectId: 'your-project-id', }); export async function generateTextExample() { const { text } = await generateText({ model: langdb('openai/gpt-4o-mini'), prompt: 'Write a Python function that sorts a list:', }); console.log(text); }

LangDB generateImage example

Example of using LangDB with generateImage function: import { createLangDB } from '@langdb/vercel-provider'; import { generateImage } from 'ai'; import fs from 'fs'; import path from 'path'; const langdb = createLangDB({ apiKey: process.env.LANGDB_API_KEY, projectId: 'your-project-id', }); export async function generateImageExample() { const { images } = await generateImage({ model: langdb.image('openai/dall-e-3'), prompt: 'A delighted resplendent quetzal mid-flight amidst raindrops', }); const imagePath = path.join(__dirname, 'generated-image.png'); fs.writeFileSync(imagePath, images[0].uint8Array); console.log(`Image saved to: ${imagePath}`); }

LangDB embed example

Example of using LangDB with embed function: import { createLangDB } from '@langdb/vercel-provider'; import { embed } from 'ai'; const langdb = createLangDB({ apiKey: process.env.LANGDB_API_KEY, projectId: 'your-project-id', }); export async function generateEmbeddings() { const { embedding } = await embed({ model: langdb.embeddingModel('text-embedding-3-small'), value: 'sunny day at the beach', }); console.log('Embedding:', embedding); }

Give your agent this brain