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

portkey/capabilities

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

Portkey chat and completion model methods

Portkey supports both chat and completion models. Use `portkey.chatModel()` for chat models and `portkey.completionModel()` for completion models. Both methods accept a model name string, which can be empty if the model is already defined in the portkeyConfig.

Portkey generateText example

Example using Portkey with the `generateText` function: ```javascript import { createPortkey } from '@portkey-ai/vercel-provider'; import { generateText } from 'ai'; const portkey = createPortkey({ apiKey: 'YOUR_PORTKEY_API_KEY', config: portkeyConfig, }); const { text } = await generateText({ model: portkey.chatModel(''), prompt: 'What is Portkey?', }); console.log(text); ```

Portkey streamText example

Example using Portkey with the `streamText` function: ```javascript import { createPortkey } from '@portkey-ai/vercel-provider'; import { streamText } from 'ai'; const portkey = createPortkey({ apiKey: 'YOUR_PORTKEY_API_KEY', config: portkeyConfig, }); const result = streamText({ model: portkey.completionModel(''), prompt: 'Invent a new holiday and describe its traditions.', }); for await (const chunk of result) { console.log(chunk); } ```

Portkey tool use support

Portkey supports Tool use with the AI SDK.

Portkey structured output not supported

Structured output with Output is currently not supported in Portkey.

Portkey interoperability across 250+ LLMs

Portkey provides interoperability across 250+ LLMs, allowing you to easily switch between different AI models by changing the provider and model name in your configuration.

Portkey observability and tracing

Portkey offers full-stack observability and tracing for all requests, providing comprehensive analytics and logs.

Portkey guardrails feature

Portkey includes built-in 50+ state-of-the-art guardrails to enforce LLM behavior in real-time with input and output checks.

Portkey caching feature

Portkey provides simple and semantic caching to save costs and time.

Portkey routing and reliability features

Portkey supports conditional request routing with fallbacks, load-balancing, and automatic retries for enhanced reliability.

Portkey security and compliance features

Portkey provides security and compliance features including budget limits and fine-grained user roles and permissions.

Give your agent this brain