Adapters
Anthropic Adapter
The tekimax-anthropic package adapts Anthropic's Messages API to the standard Tekimax interface.
Installation
Code
npm install tekimax-anthropicUsage
Code
import { Tekimax } from 'tekimax-ts';
import { AnthropicProvider } from 'tekimax-anthropic';
const client = new Tekimax({
provider: new AnthropicProvider({
apiKey: process.env.ANTHROPIC_API_KEY,
})
});
const result = await client.chat.completions.create({
model: 'claude-3-5-sonnet-20240620',
messages: [{ role: 'user', content: 'Hello Claude' }]
});Notes
- System Prompts: Tekimax automatically extracts
systemmessages from the message list and passes them to Anthropic's top-levelsystemparameter. - Max Tokens: Defaults are handled by the adapter, but you can override them in the request.
