Guide
Configure the chatbot and AI features under Settings → Artificial Intelligence. The help links in that area point to this guide.
Aysali Bot supports multiple LLM providers. Training, flows, Q&A, human takeover, and channel integrations work the same way — only the API credentials and model list change per provider.
AI provider
Select the active engine at Settings → Artificial Intelligence → AI provider:
| Provider | Settings section | Default model | API keys |
|---|---|---|---|
| OpenAI | OpenAI | gpt-5-mini | platform.openai.com/api-keys |
| Claude (Anthropic) | Claude | claude-sonnet-4-20250514 | console.anthropic.com |
| Google Gemini | Google Gemini | gemini-2.0-flash | Google AI Studio |
| DeepSeek | DeepSeek | deepseek-chat | platform.deepseek.com |
| Qwen (Alibaba) | Qwen | qwen-plus | Alibaba DashScope |
Other AI providers
Claude, Gemini, DeepSeek, and Qwen expose the same chatbot options as OpenAI (where applicable):
- Chatbot, Chatbot mode, Model, Prompt, Fallback message
- Small talk, Spelling correction, Smart reply, Speech recognition
- Image and file analysis, Source links, Note data scraping
- Training via cron job, Use conversations for training, Context awareness
- Training data language, Troubleshoot
Differences:
| Feature | OpenAI | Other providers |
|---|---|---|
| Assistant mode | Yes — OpenAI Assistants API | No — use All questions or sources modes |
| Department-linked Assistants | Yes | N/A |
| Embedding model for training | text-embedding-3-small | Provider-specific (see Training) |
| Message rewriting | Uses active provider when enabled | Same |
After changing AI provider, open that provider’s settings block, paste the API key, enable Chatbot, and run Troubleshoot if needed.
Synchronization
Manual sync (Aysali Bot)
- Create an API key with your chosen provider (links in the table above).
- Paste it into Settings → Artificial Intelligence → [Provider] → API key.
- Enable Chatbot and save.
- Open the Chatbot area (🙂 icon in the left menu) to test in the playground.
Automatic sync
Available only on legacy cloud deployments with bundled credits. Not used on standard Aysali Bot hosting — always supply your own API key.
Chatbot setup
- •
Complete synchronization
Enter a valid API key for the active provider and save settings.
- •
Enable the chatbot
Check Settings → Artificial Intelligence → [Provider] → Chatbot and save.
- •
Test
Open Chatbot from the left menu (🙂). If replies fail, click Troubleshoot problems in the provider settings.
- •
Train (optional)
Add sources under Chatbot → Training when using source-based modes. See Training.
Explore Human takeover and Training to refine behavior.
Chatbot mode
Settings → Artificial Intelligence → [Provider] → Chatbot mode
| Mode | Behavior |
|---|---|
| Only general questions | Answers general knowledge and conversation context only — no custom training sources |
| Only questions related to your sources | Answers only from trained content; ignores unrelated user messages |
| All questions (recommended with training) | Trained sources + general knowledge + conversation context |
| Assistant (OpenAI only) | Uses an OpenAI Assistant instead of embeddings + prompt |
Small talk
Pre-built polite chit-chat (“Hello”, “How are you?”, jokes) so the bot feels conversational, not only task-focused.
OpenAI Assistants
Use OpenAI’s Assistants API instead of embedding-based training.
- •
Set mode
Chatbot mode → Assistant. Enter Assistant ID from OpenAI Assistants.
- •
Manual API key
Use Manual sync and your own OpenAI API key.
- •
Department linking (optional)
In OpenAI Assistants - Department linking, map each department to a different Assistant ID. Both the conversation and the Assistant must share the same department.
Assistants power the chatbot and smart replies only — not message rewriting or other auxiliary AI features.
The in-conversation Train chatbot panel does not work with Assistant mode.
OpenAI settings reference
Most options exist under each provider’s settings block with the same names.
| Setting | Purpose |
|---|---|
| Fallback message | Sent when the AI cannot understand the question |
| Prompt | Instructions and business context for replies. With human takeover, include: Respond “I don’t know” if not sure about the answer. |
| Max tokens / Temperature / Penalties | Model behavior — leave defaults unless you know the OpenAI parameters |
| Logit bias | JSON string with string keys, e.g. \{"2435":-100, "640":-100} |
| Custom model ID | Override the model dropdown |
| Training data language | Default language of training content when the bot is multilingual |
| Generate user questions | Suggests new training questions when opening the training panel |
| Use conversations for training | Cron-based import of agent/user messages — see Conversations training |
| Training via cron job | Schedule automatic website re-training (external cron on Aysali) |
| Context awareness | Sends page meta title/description to the AI — widget only, not messaging channels |
Spelling correction
Fixes spelling in agent messages before send.
Smart reply
Suggests agent replies in real time. Works with the active AI provider when the chatbot is on; OpenAI Smart reply checkbox also enables it without the chatbot.
Speech recognition
Converts user voice messages to text shown beside the audio player. Chatbot audio understanding is always on; this option adds visible transcription. Pair with language detection for best results.
Image and file analysis
Analyzes user images/files. Requires capable models (GPT-4 class and newer for OpenAI). Needs a live HTTPS server (not localhost) or S3-backed uploads.
Source links
Appends links to training sources in answers. Set Settings → Articles → Articles page URL to include articles as sources.
Note data scraping
Adds a notes-panel menu to extract structured data (URLs, credentials, summaries) from user messages.
Integrations
Chatbot integrations are conversational, multilingual, and work on WhatsApp, Messenger, Telegram, live chat, and other channels.
Google Calendar
Lets the chatbot book, update, cancel, and list calendar events.
- •
Activate
Settings → Artificial Intelligence → Google Calendar integration → Active
- •
Sync Google
Complete Google synchronization first.
- •
Office hours
Set availability under Settings → General → Scheduled office hours — see Office hours.
| Setting | Meaning |
|---|---|
| Slot time | Event duration (minutes) |
| Buffer time | Gap between bookings |
| Minimum booking time | Earliest bookable slot from now |
| Max advance booking | How far ahead users can book |
Google synchronization
Settings → Artificial Intelligence → Google
Connect Google for Calendar, translation, and language detection:
- Create OAuth credentials in Google Cloud Console.
- Enter Client ID and Client secret.
- Click Get URL for Authorised redirect URI and add it in Google.
- Click Synchronize and complete OAuth.
- Copy the Refresh token if shown and save.
Related checkboxes:
Multilingual via translation
Translates messages on the fly using Google Translate. Works with the chatbot and all channels. Requires Google sync.
Automatic translation
Automatically translates admin and/or user-facing text. Requires Google sync.
Language detection
Detects the user’s language automatically. Recommended for WhatsApp and other messaging channels when Settings → Chat → Language is set to Multilingual.
Google search
Settings → Artificial Intelligence → Google search
Lets the chatbot search Google for real-time answers. Requires Search engine ID and API key from Programmable Search Engine.
When training embeddings are active, real-time questions may return “I don’t know” so Google search can handle them instead.
Human takeover
Settings → Artificial Intelligence → Human takeover
When the chatbot cannot answer, offer to connect a human agent.
| Option | Purpose |
|---|---|
| Automatic human takeover | Skip confirmation and assign immediately |
| Disable chatbot | Stop bot replies after takeover |
| Disable outside office hours | Limit takeover to office hours |
Include Respond “I don’t know” in your Prompt when human takeover is active.
When an agent takes control, the chatbot is deactivated for that conversation.
Message rewriting
Settings → Artificial Intelligence → Message rewriting
Adds a rewrite button in the conversation composer.
- Greetings are added when there are no prior agent messages.
- Set agent/admin profile language for non-English rewriting.
- Execution mode: Manual, Automatic, or Negative sentiment only.
Training
Train the chatbot on your content so it answers from your knowledge base. Training is shared across providers — embeddings use the active provider’s embedding model.
| Source | Where | Notes |
|---|---|---|
| Files | Chatbot → Training → Files | PDF and TXT only; files removed after training |
| Website | Chatbot → Training → Website | URL crawl or XML sitemap; delete old website data before re-training same site |
| Q&A | Chatbot → Training → Q&A | Manual question/answer pairs — see Q&A |
| Articles | Articles admin + Train | Requires Articles; re-train after edits |
| Flows | Chatbot → Flows | Structured conversations — see Flows |
| Conversations | Enable setting + Chatbot → Training → Conversations | Automated — review quality regularly |
| Training panel | Message menu → Train chatbot | Add/improve Q&A from live messages |
Website tips
- Prefer an XML sitemap over crawling huge sites (xml-sitemaps.com).
- Split sitemaps over 1000 URLs into batches.
- Host large sitemaps externally (e.g. tmpfiles.org) and paste the URL.
Cron job training
On Aysali Bot, create a server cron that hits:
YOUR-BOT-URL/include/api.php?open-ai-training=true
Example: */59 * * * * wget -q -O /dev/null "YOUR-BOT-URL/include/api.php?open-ai-training=true"
- Automatic cron re-trains websites only and replaces previous website embeddings.
- Files, Q&A, and articles are excluded from cron training.
Multilingual training
Enable Multilingual Training Sources (provider settings) to limit answers to sources in the user’s language.
| Source type | Language behavior |
|---|---|
| Files | Single language |
| Websites | Detected from <html lang="…"> |
| Q&A | Single language |
| Articles | All article languages |
| Conversations | Agent-language messages when auto-translation is on |
Training notes
- Re-training adds new sources; use Chatbot → Training → Information → Delete all training data to reset.
- Embeddings are stored as secured JSON in the uploads folder.
- Set Training data language when content is not English.
- Training sources priority weights specific sources higher.
- Embedding pricing: see provider docs (OpenAI:
text-embedding-3-small).
Training using conversations
Powerful but can produce low-quality data from bad agent replies. Review regularly — prefer the training panel for most bots.
Q&A
Chatbot → Training → Q&A
| Field | Usage |
|---|---|
| Question | User phrases that trigger the answer (add variations: “Who are you?”, “Are you a bot?”) |
| Answer | Reply text; supports merge fields like \{language\} |
| Tools calling | HTTP actions and user-field updates — see Tools calling |
Flows
Chatbot → Flows — guided multi-step conversations.
| Block | Purpose |
|---|---|
| Start | New conversation, keyword, page load; optional department/source filters |
| Send message / choices / video | User-facing steps |
| Get user details / Set data | Store profile fields |
| Actions | Tags, departments, agents |
| Conditions | Branch true/false |
| REST API | POST JSON to your server (sb key includes user/conversation IDs) |
| Tools calling | External data lookup |
| Flow connector | Chain another flow |
Conversational mode on WhatsApp/Instagram hides buttons; the AI maps free-text replies to choices (Yes\|Yeah\|Sure).
Flows support translations and multilingual via translation. Set Training data language if the default flow language is not English.
Users can go back and correct details (“wrong email, go back”).
Tools calling
Connect Q&A and Flows to your REST API.
Request body example:
{
"sb": {
"user_id": "123",
"conversation_id": "456",
"user_language": "ar"
},
"arguments": {
"order-number": "ABC123"
}
}
Response example:
{
"order_status": "Delivered 2 hours ago",
"success": true
}
Include success: true only when data is valid. Use \{order-number\} merge fields in URLs. Retrieve full user/conversation data via the Admin API token REST API.
Advanced feature — requires custom server code.
Global AI options
| Setting | Purpose |
|---|---|
| Disable during office hours | Chatbot active only outside office hours |
| Disable for tickets area | No chatbot on ticket widget |
| Bot response delay | Seconds before bot replies |
| Reply to user emails | Chatbot answers email piping when it knows the answer |
| Usage limit | Cap messages per device to prevent abuse |
Set chatbot UI language under Settings → Chat → Language. Use Multilingual for websites; enable language detection for messaging apps.
Compatibility summary
Works with OpenAI and other providers (unless noted):
- Smart reply, human takeover, office-hours disable, tickets disable, response delay
- Email piping replies, Google translation, language detection, Google search
- Consecutive user messages are merged into one bot reply
Default OpenAI model: gpt-5-mini. Change via Model or Custom model ID.