Chatbots
Create AI chatbots with customizable personalities and RAG integration.
What You'll Learn
- Overview - What chatbots are and when to use them
- Creating Chatbots - Configure chatbot settings
- Chatting - Interact with your chatbots
- Managing - Update and maintain chatbots
- Examples - Integration examples in multiple languages
Overview
Chatbots are pre-configured AI assistants with:
- Custom personalities - Define system prompts and behavior
- RAG integration - Connect to your document knowledge base
- Model selection - Choose appropriate LLM models
- Conversation memory - Track message history
- Fallback responses - Handle unknown queries
Chatbots vs. Raw LLM API
| Feature | Chatbots | Raw LLM API |
|---|---|---|
| Personality | Built-in system prompt | Manual system message each request |
| Conversation memory | Automatic | Manual message tracking |
| RAG access | One-click enable | Manual document search and context injection |
| Multi-tenancy | Multiple bots, isolated | Single configuration |
Use Cases
| Use Case | Recommended Approach |
|---|---|
| Customer support | Chatbot with RAG from documentation |
| Internal Q&A | Chatbot with company knowledge base |
| General assistant | Simple chatbot with personality |
| Domain expert | Chatbot with specialized system prompt |
Next Steps
- Create Your First Chatbot - Set up a chatbot
- RAG Documentation - Build your knowledge base first
- Examples - See how to integrate
Quick Example
Create a customer support bot with RAG:
import requests
# Create chatbot
create_response = requests.post(
"http://localhost/api/v1/chatbot/create",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"name": "Support Bot",
"model": "gpt-3.5-turbo",
"system_prompt": "You are a helpful customer support agent.",
"use_rag": True,
"rag_collection": "docs_collection",
"rag_top_k": 5
}
)
chatbot_id = create_response.json()["id"]
# Chat with it
chat_response = requests.post(
"http://localhost/api/v1/chatbot/chat",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"chatbot_id": chatbot_id,
"message": "How do I reset my password?"
}
)
print(chat_response.json()["response"])