Backend provider adapters for AI Matey - Universal AI Adapter System
npm install ai.matey.backendServer-side backend provider adapters for AI Matey - Universal AI Adapter System.
Part of the ai.matey monorepo.
``bash`
npm install ai.matey.backend
This package includes adapters for 24 AI providers:
For browser-compatible adapters (Chrome AI, Function, Mock), see ai.matey.backend.browser.
`typescript
import { OpenAIBackendAdapter, AnthropicBackendAdapter } from 'ai.matey.backend';
// Create an OpenAI backend
const openaiBackend = new OpenAIBackendAdapter({
apiKey: process.env.OPENAI_API_KEY,
});
// Create an Anthropic backend
const anthropicBackend = new AnthropicBackendAdapter({
apiKey: process.env.ANTHROPIC_API_KEY,
});
`
You can also import specific providers directly:
`typescript``
import { OpenAIBackendAdapter } from 'ai.matey.backend/openai';
import { AnthropicBackendAdapter } from 'ai.matey.backend/anthropic';
See the TypeScript definitions for detailed API documentation.
MIT - see LICENSE for details.