Skip to main content

Configuration Issues

Missing API Keys

Error: At least one OpenAI API key is required Solution:
from langchat.llm import OpenAI

# ✅ Provide API key
llm = OpenAI(api_key="sk-...", model="gpt-4o-mini")

Missing Database Credentials

Error: Supabase URL and key must be provided Solution:
from langchat.database import Supabase

# ✅ Provide credentials
db = Supabase(url="https://...", key="...")

Missing Pinecone Index

Error: Index not found Solution:
  • Create index in Pinecone console first
  • Verify index name is correct
  • Check API key permissions

Runtime Issues

Rate Limit Errors

Error: Rate limit exceeded Solutions:
  • Use multiple API keys: OpenAI(api_keys=["key1", "key2"])
  • Reduce request frequency
  • Upgrade OpenAI plan

No Search Results

Solutions:
  • Check Pinecone index has documents
  • Verify documents are indexed
  • Increase retrieval count: k=10
  • Try different embedding model

Context Lost Between Messages

Solution: Ensure same user_id and domain:
# ✅ Same session
await ai.chat(query="Q1", user_id="user123", domain="default")
await ai.chat(query="Q2", user_id="user123", domain="default")

# ❌ Different sessions
await ai.chat(query="Q1", user_id="user123", domain="default")
await ai.chat(query="Q2", user_id="user456", domain="default")

Vector Search Issues

Dimension Mismatch

Error: Dimension mismatch Solution: Ensure index dimensions match embedding model:
  • text-embedding-3-large: 3072 dimensions
  • text-embedding-3-small: 1536 dimensions
Solutions:
  • Reduce retrieval count: k=5
  • Use smaller embedding model
  • Optimize Pinecone index

Document Indexing Issues

No Chunks Indexed

Check:
  • All chunks were duplicates? (check chunks_skipped)
  • Document is empty?
  • File path correct?

Unsupported File Type

Solution:
  • Check file extension (PDF, TXT, CSV supported)
  • Convert to supported format

Getting Help

If you’re still stuck:
  1. Check Configuration Guide
  2. Review Examples
  3. Join Discord community

Built with ❤️ by NeuroBrain