multimodal/tarko/llm/README.md
A TypeScript SDK to call multiple LLM Providers in OpenAI format.
pnpm install @agent-infra/llm
import { LLMClient } from '@agent-infra/llm';
const client = new LLMClient('openai', {
apiKey: '',
baseUrl: '',
});
const result = await client.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'gpt-4o',
});
import { LLMClient } from '@agent-infra/llm';
const client = new LLMClient('openrouter', {
apiKey: '',
baseUrl: '',
});
const result = await client.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'openai/gpt-4o',
});
import { LLMClient } from '@agent-infra/llm';
const client = new LLMClient('anthropic', {
apiKey: '',
baseUrl: '',
});
const result = await client.chat.completions.create({
messages: [{ role: 'user', content: 'Say this is a test' }],
model: 'openai/gpt-4o',
});