Docs / AI Providers

AI Providers Configuration

Configure and manage multiple AI providers including Google Gemini, OpenAI GPT, and Claude. Set up API keys, select models, and configure fallback options for reliable chatbot performance.

Overview

WooAI Chatbot Pro supports multiple AI providers, giving you flexibility to choose the best solution for your needs. The plugin features a multi-provider architecture that allows you to:

Choose Your Provider Select from Google Gemini, OpenAI, or Claude based on your preferences
Configure Fallbacks Set backup providers to ensure 100% uptime for your chatbot
Model Selection Choose specific AI models optimized for different use cases
Cost Optimization Use affordable providers for simple queries, premium for complex ones
AI Providers Settings Panel
The AI Providers settings panel in WooAI Chatbot Pro admin dashboard

Accessing AI Provider Settings

To configure your AI providers:

  1. Navigate to Settings

    In your WordPress admin, go to WooAI ChatAI Providers from the left sidebar menu.

  2. Select Provider Tab

    Click on the tab for the AI provider you want to configure: Google Gemini, OpenAI, or Claude.

  3. Enter API Credentials

    Input your API key and select your preferred model from the dropdown options.

  4. Save Changes

    Click the Save Settings button to apply your configuration.

Google Gemini (Recommended)

🔷
Google Gemini
Google's most capable AI model with multimodal understanding

Google Gemini is the recommended provider for WooAI Chatbot Pro due to its excellent performance, competitive pricing, and seamless integration with Google's ecosystem.

Getting Your Gemini API Key

Follow these steps to obtain your Google Gemini API key:

  1. Visit Google AI Studio

    Go to aistudio.google.com and sign in with your Google account.

  2. Navigate to API Keys

    Click on Get API key in the left sidebar, or go directly to API Keys section.

  3. Create API Key

    Click Create API key button. You can either create a key in a new project or select an existing Google Cloud project.

  4. Copy Your Key

    Once generated, copy the API key immediately. For security reasons, you won't be able to view it again after leaving the page.

Google AI Studio API Keys Page
Google AI Studio API Keys management page
💡 Free Tier Available

Google Gemini offers a generous free tier that includes up to 60 queries per minute for Gemini 1.5 Flash. This is perfect for small to medium WooCommerce stores.

Available Gemini Models

Model Best For Context Window Pricing
gemini-1.5-flash Fast responses, general queries 1M tokens Free tier available
gemini-1.5-pro Complex reasoning, detailed analysis 2M tokens Pay per use
gemini-2.0-flash Latest model, best performance 1M tokens Pay per use

Configuring Gemini in WooAI

  1. Select Google Gemini

    In the AI Providers tab, click on Google Gemini to expand its settings.

  2. Enter API Key

    Paste your API key into the API Key field. The key will be securely stored in your WordPress database.

  3. Choose Model

    Select your preferred model from the Model dropdown. We recommend gemini-1.5-flash for most use cases.

  4. Set as Primary (Optional)

    Enable the Set as Primary Provider toggle if you want Gemini to handle all chatbot queries.

⚠️ API Key Security

Never share your API key publicly or commit it to version control. The plugin stores your key securely, but always treat it as sensitive information.

OpenAI GPT

🟢
OpenAI GPT
Industry-leading language models from OpenAI

OpenAI's GPT models are renowned for their exceptional language understanding and generation capabilities. They're an excellent choice for sophisticated customer interactions.

Getting Your OpenAI API Key

  1. Create an OpenAI Account

    Visit platform.openai.com and sign up or log in to your account.

  2. Navigate to API Keys

    Go to API Keys in your account settings.

  3. Create New Secret Key

    Click Create new secret key, give it a descriptive name like "WooAI Chatbot", and copy the generated key.

  4. Set Up Billing

    Ensure you have billing configured in your OpenAI account, as API usage requires payment beyond the free credits.

Available OpenAI Models

Model Best For Context Window Pricing
gpt-4o Fastest GPT-4 class model 128K tokens $5/$15 per 1M tokens
gpt-4o-mini Cost-effective, fast responses 128K tokens Budget-friendly
gpt-4-turbo Complex reasoning tasks 128K tokens Premium pricing

Configuring OpenAI in WooAI

  1. Select OpenAI

    In the AI Providers tab, click on OpenAI to expand its configuration options.

  2. Enter API Key

    Paste your OpenAI API key (starts with sk-) into the API Key field.

  3. Select Model

    Choose your preferred model. gpt-4o-mini offers the best balance of performance and cost.

  4. Configure Organization ID (Optional)

    If you're part of multiple OpenAI organizations, enter your Organization ID to ensure correct billing.

Anthropic Claude

🟠
Anthropic Claude
Advanced AI assistant focused on safety and helpfulness

Claude is Anthropic's AI assistant, known for its thoughtful responses, strong reasoning abilities, and emphasis on being helpful and harmless.

Getting Your Claude API Key

  1. Visit Anthropic Console

    Go to console.anthropic.com and create an account or sign in.

  2. Navigate to API Keys

    Click on API Keys in the left sidebar of your dashboard.

  3. Generate New Key

    Click Create Key, provide a name for identification, and copy the generated API key.

  4. Add Credits

    Ensure you have credits in your Anthropic account. New accounts may receive free credits for testing.

Available Claude Models

Model Best For Context Window Pricing
claude-3-5-sonnet Best balance of intelligence and speed 200K tokens Recommended
claude-3-opus Most capable, complex analysis 200K tokens Premium pricing
claude-3-haiku Fastest, cost-effective 200K tokens Budget-friendly

Configuring Claude in WooAI

  1. Select Claude

    In the AI Providers tab, click on Claude (Anthropic) to expand its settings.

  2. Enter API Key

    Paste your Anthropic API key (starts with sk-ant-) into the API Key field.

  3. Choose Model

    Select claude-3-5-sonnet for the best overall performance, or claude-3-haiku for cost optimization.

Fallback Provider Configuration

WooAI Chatbot Pro allows you to configure fallback providers to ensure your chatbot remains operational even if the primary provider experiences issues.

How Fallback Works

When a request to the primary provider fails (due to rate limits, downtime, or errors), the plugin automatically retries the request with your configured fallback provider. This happens seamlessly without any user intervention.

1
Primary Request Query sent to primary provider (e.g., Gemini)
2
Failure Detection System detects error or timeout
3
Automatic Switch Request redirected to fallback (e.g., OpenAI)
4
Response Delivered User receives response without interruption

Setting Up Fallback

  1. Configure Multiple Providers

    First, ensure you have at least two AI providers configured with valid API keys.

  2. Set Primary Provider

    In the provider settings, toggle Set as Primary for your preferred main provider.

  3. Enable Fallback

    Toggle Enable as Fallback on your secondary provider(s).

  4. Set Fallback Order

    If you have multiple fallbacks, drag and drop to arrange the fallback priority order.

✅ Best Practice

We recommend setting up Google Gemini as your primary provider and OpenAI GPT-4o-mini as your fallback. This combination offers excellent reliability with cost-effective redundancy.

Testing Your Configuration

After configuring your AI providers, it's important to test that everything works correctly.

Using the Test Feature

  1. Navigate to Test Panel

    In the AI Providers settings, locate the Test Connection section at the bottom of each provider card.

  2. Click Test Button

    Click the Test API Connection button to verify your API key and selected model work correctly.

  3. Review Results

    A success message confirms the connection. Error messages will indicate issues with your API key or configuration.

Common Test Errors

Error Cause Solution
Invalid API Key API key is incorrect or expired Generate a new API key from provider's dashboard
Rate Limit Exceeded Too many requests in short time Wait a few minutes and try again
Insufficient Credits No billing or credits configured Add payment method or purchase credits
Model Not Found Selected model unavailable Choose a different model from the dropdown

Best Practices

Security

  • Rotate API keys regularly - Generate new keys every 90 days and update your configuration
  • Use separate keys - Create dedicated API keys for WooAI rather than sharing with other applications
  • Monitor usage - Regularly check your provider dashboards for unexpected usage spikes
  • Set usage limits - Configure spending caps in your provider accounts to prevent unexpected charges

Performance

  • Choose appropriate models - Use faster, cheaper models for simple queries and reserve premium models for complex tasks
  • Configure fallbacks - Always have a backup provider to ensure uptime
  • Test before launch - Verify all providers work correctly before going live
  • Monitor response times - Use the Analytics dashboard to track AI response performance

Cost Management

  • Start with free tiers - Google Gemini's free tier is excellent for testing and small stores
  • Use cost-effective fallbacks - Set cheaper models as fallback options
  • Review monthly usage - Check provider billing dashboards regularly
  • Optimize prompts - Shorter, focused system prompts reduce token usage

Troubleshooting

API Key Not Working

If your API key isn't being accepted:

  • Verify you copied the entire key without extra spaces
  • Check that the key hasn't expired or been revoked
  • Ensure billing is configured in your provider account
  • Try generating a new API key

Slow Responses

If the chatbot is responding slowly:

  • Switch to a faster model (e.g., gemini-1.5-flash or gpt-4o-mini)
  • Check your internet connection
  • Review your system prompt length - shorter prompts process faster
  • Consider disabling RAG search for non-product queries

High Costs

If you're experiencing unexpectedly high API costs:

  • Switch to more cost-effective models
  • Review your conversation history length settings
  • Implement rate limiting in Playbooks
  • Use Google Gemini's free tier for development and testing
← Dashboard RAG & Search →