LLM Providers
Choose your AI's brain! From lightning-fast Groq to privacy-focused local models, Vizra ADK supports 9 different LLM providers via Prism PHP. Find the perfect match for your use case! 🚀
🎯 Why Provider Choice Matters
Not all AI models are created equal! Some excel at creative writing, others at coding, and some are just blazing fast. With Vizra ADK, you can mix and match providers to give each agent the perfect brain for its job! 🎨
⚡ Quick Setup
Getting started is as easy as 1-2-3!
1️⃣ Set Your Default Provider
VIZRA_ADK_DEFAULT_PROVIDER=openai
VIZRA_ADK_DEFAULT_MODEL=gpt-4-turbo
# Don't forget your API key!
OPENAI_API_KEY=sk-...
2️⃣ Or Configure Per Agent
use Prism\Prism\Enums\Provider;
class CustomerSupportAgent extends BaseLlmAgent
{
protected ?Provider $provider = Provider::Anthropic;
protected string $model = 'claude-3-opus-20240229';
}
3️⃣ Or Switch on the Fly!
$agent->setProvider('groq')
->setModel('mixtral-8x7b-32768')
->setTemperature(0.7);
🌟 Meet the Providers
Each provider brings something special to the table. Let's meet the team!
OpenAI
The industry leader - GPT-4 is your Swiss Army knife for any task!
Best For:
General purpose, creative tasks, code generation
Popular Models:
gpt-4-turbo, gpt-3.5-turbo, o1-preview
ENV: OPENAI_API_KEY
protected ?Provider $provider = Provider::OpenAI;
protected string $model = 'gpt-4-turbo';
Anthropic
Claude is thoughtful, careful, and great at complex reasoning!
Best For:
Analysis, writing, safe & ethical responses
Popular Models:
claude-3-opus, claude-3-sonnet
ENV: ANTHROPIC_API_KEY
protected ?Provider $provider = Provider::Anthropic;
protected string $model = 'claude-3-opus-20240229';
Google Gemini
Multimodal magic - handles text, images, and more!
Best For:
Multimodal tasks, fast responses, cost efficiency
Popular Models:
gemini-1.5-pro, gemini-1.5-flash
ENV: GEMINI_API_KEY
protected ?Provider $provider = Provider::Gemini;
protected string $model = 'gemini-1.5-flash';
Groq
Speed demon! Insanely fast inference for real-time applications
Best For:
Real-time chat, low latency needs
Popular Models:
mixtral-8x7b-32768, llama2-70b-4096
ENV: GROQ_API_KEY
protected ?Provider $provider = Provider::Groq;
protected string $model = 'mixtral-8x7b-32768';
Ollama
Run models locally - your data never leaves your machine!
Best For:
Privacy, offline use, experimentation
Popular Models:
llama2, codellama, mistral, phi
protected ?Provider $provider = Provider::Ollama;
protected string $model = 'llama2';
⚠️ Note: Requires Ollama to be installed and running locally
▶ Show More Providers (4 more)
DeepSeek
Specialized models for chat and code generation
ENV: DEEPSEEK_API_KEY
protected ?Provider $provider = Provider::DeepSeek;
protected string $model = 'deepseek-coder';
Mistral AI
Open-weight models with impressive performance
ENV: MISTRAL_API_KEY
protected ?Provider $provider = Provider::Mistral;
protected string $model = 'mistral-large-latest';
xAI
Grok models from Elon's xAI team
ENV: XAI_API_KEY
protected ?Provider $provider = Provider::XAI;
protected string $model = 'grok-beta';
Voyage AI
Embedding specialist for semantic search
ENV: VOYAGEAI_API_KEY
protected ?Provider $provider = Provider::VoyageAI;
protected string $model = 'voyage-large-2';
⚠️ Note: Primarily for embeddings, not text generation
🎪 Cool Provider Tricks
🎯 Auto-Detection Magic
Just set the model name and Vizra figures out the provider!
// These auto-detect the provider!
protected string $model = 'gpt-4'; // → OpenAI
protected string $model = 'claude-3-opus'; // → Anthropic
protected string $model = 'gemini-pro'; // → Gemini
protected string $model = 'llama2'; // → Ollama
🔄 Runtime Switching
Change providers on the fly based on user needs!
// Premium users get the good stuff!
if ($user->isPremium()) {
$agent->setProvider('anthropic')
->setModel('claude-3-opus-20240229');
} else {
$agent->setProvider('openai')
->setModel('gpt-3.5-turbo');
}
🎯 Choosing the Right Provider
Not sure which to pick? Here's your cheat sheet!
💼 For Business Apps
OpenAI GPT-4 or Anthropic Claude - reliable and versatile
💨 For Speed Demons
Groq or Gemini Flash - when milliseconds matter
🔒 For Privacy First
Ollama - keep everything local and secure
💻 For Code Generation
DeepSeek Coder or GPT-4 - they speak fluent code
📚 For Long Context
Claude 3 or Gemini 1.5 Pro - handle entire books!
💰 For Budget Conscious
GPT-3.5 Turbo or local Ollama models
🔑 API Keys Setup
Don't forget to add your API keys to the .env
file!
# OpenAI
OPENAI_API_KEY=sk-...
# Anthropic
ANTHROPIC_API_KEY=sk-ant-...
# Google Gemini
GEMINI_API_KEY=...
# Add others as needed!
GROQ_API_KEY=...
MISTRAL_API_KEY=...
# etc...
🚀 Ready to Build?
Now that you've picked your provider, let's create some amazing agents!
Ready for Professional AI Agent Evaluation? 🚀
Evaluate and debug your Vizra ADK agents with professional cloud tools. Get early access to Vizra Cloud and be among the first to experience advanced evaluation and trace analysis at scale.
Join other developers already on the waitlist. No spam, just launch updates.