Documentation Index
Fetch the complete documentation index at: https://langchat.neurobrains.co/llms.txt
Use this file to discover all available pages before exploring further.
Install
Requires Python 3.9 or higher.
Set environment variables
All providers read credentials from the environment automatically. Create a.env file:
Your first chatbot
Sync alternative
Don’t wantasync? Use the sync wrapper:
What LangChat does automatically
When you callchat():
- Reformulates the question as a standalone query (resolves “it”, “that”, etc.)
- Searches your Pinecone index for relevant context
- Reranks results with Flashrank for better precision
- Calls the LLM with context + conversation history
- Saves the exchange to Supabase
- Returns a typed
ChatResponseobject
What you get back
chat() returns a ChatResponse dataclass:
| Field | Type | Description |
|---|---|---|
text | str | The AI’s response |
status | "success" | "error" | Whether the call succeeded |
user_id | str | Echo of the user ID you passed |
platform | str | Platform namespace (default: "default") |
response_time | float | Latency in seconds |
timestamp | str | ISO 8601 UTC timestamp |
error | str | None | Error message if status == "error" |
Launch as an API server
One line to expose a full REST API with a built-in chat UI:http://localhost:8000/frontend to use the built-in chat interface.
Next steps
Installation
Virtual environments, uv, and dependency setup
Configuration
All providers and configuration options
Document Indexing
Load PDFs, CSVs, and other documents into Pinecone
API Reference
Complete method and parameter reference
