Skip to main content

Chatbots

Create AI chatbots with customizable personalities and RAG integration.

What You'll Learn

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

FeatureChatbotsRaw LLM API
PersonalityBuilt-in system promptManual system message each request
Conversation memoryAutomaticManual message tracking
RAG accessOne-click enableManual document search and context injection
Multi-tenancyMultiple bots, isolatedSingle configuration

Use Cases

Use CaseRecommended Approach
Customer supportChatbot with RAG from documentation
Internal Q&AChatbot with company knowledge base
General assistantSimple chatbot with personality
Domain expertChatbot with specialized system prompt

Next Steps

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"])