@sola-air-ui/providers
v1.0.2
Published
Server-side LLM provider adapters for Sola AIR — Anthropic, OpenAI, Gemini, Ollama
Downloads
217
Maintainers
Readme
@sola-air-ui/providers
Server-side LLM provider adapters for Sola AIR's $intent/createIntent primitive — a common streaming interface over Anthropic, OpenAI, Gemini, and Ollama so your .sola components don't need to know which model is answering.
Install
npm install @sola-air-ui/providersUsage
Import the adapter for whichever provider you're using, on the server side (never ship API keys to the browser):
import { anthropic } from '@sola-air-ui/providers/anthropic';
// or: import { openai } from '@sola-air-ui/providers/openai';
// or: import { gemini } from '@sola-air-ui/providers/gemini';
// or: import { ollama } from '@sola-air-ui/providers/ollama';
const provider = anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
export async function handleIntentRequest(prompt) {
return provider.stream(prompt);
}Wire this into whatever API route your framework compiles $intent calls to hit — configureIntent({ endpoint: '/api/intent' }) on the client side points Sola at it.
Supported providers
| Provider | Import path |
|---|---|
| Anthropic (Claude) | @sola-air-ui/providers/anthropic |
| OpenAI | @sola-air-ui/providers/openai |
| Google Gemini | @sola-air-ui/providers/gemini |
| Ollama (local models) | @sola-air-ui/providers/ollama |
All four adapters support streaming responses.
