Unified provider interface — both Anthropic and OpenAI adapters implement this.
You can also implement this interface for custom providers (e.g. Gemini, Ollama):
Example
importtype { LlmProvider } from'rageval'
constmyProvider: LlmProvider = { name:'my-provider', model:'my-model', asynccomplete(prompt) { // call your LLM and return the text response returnmyLlm.generate(prompt) }, }
Unified provider interface — both Anthropic and OpenAI adapters implement this.
You can also implement this interface for custom providers (e.g. Gemini, Ollama):
Example