Quick Start
Get your chatbot running in 5 minutes:
import asyncio
from langchat import LangChat
from langchat.llm import OpenAI
from langchat.vector_db import Pinecone
from langchat.database import Supabase
async def main():
# Setup providers
llm = OpenAI(api_key="sk-...", model="gpt-4o-mini", temperature=0.7)
vector_db = Pinecone(api_key="...", index_name="...")
db = Supabase(url="https://...", key="...")
# Create chatbot
ai = LangChat(llm=llm, vector_db=vector_db, db=db)
# Chat!
result = await ai.chat(
query="Hello! What can you help me with?",
user_id="user123"
)
print(result["response"])
asyncio.run(main())
What You Need
Before starting, get these accounts:
- OpenAI - platform.openai.com - For AI models
- Pinecone - pinecone.io - For search (create an index)
- Supabase - supabase.com - For chat history
Make sure your Pinecone index exists before running. Supabase tables are created automatically.
Next Steps
Built with ❤️ by NeuroBrain