Step 1 β Install and configure
Install LangChat and create your.env file:
.env
Step 2 β Index your documents
Before the chatbot can answer questions, it needs to read your content. Put your documents (PDFs, text files, CSVs) in a folder and index them:LangChat automatically detects duplicate chunks using a content hash, so re-running
index() on the same files is safe.Step 3 β Build the chatbot
Step 4 β Handle multiple users
Eachuser_id gets its own conversation history. Use platform to separate different applications sharing the same backend:
Step 5 β Add a custom persona
Make the bot speak in your brand voice by customizing the prompt:{context}, {chat_history}, and {question} are filled in automatically.
Step 6 β Deploy as an API
Turn your chatbot into a production REST API in one step:Whatβs next
Configuration
Switch LLM providers, configure Pinecone namespaces, tune history length
Custom Prompts
Full guide to prompt templating and standalone question customization
Document Indexing
Supported file formats, chunking strategy, namespace organization
API Server
Production server setup, CORS, Docker, environment configuration
