from langchat import LangChat
from langchat.llm import OpenAI
from langchat.vector_db import Pinecone
from langchat.database import Supabase
# Custom prompt
custom_prompt = """You are a helpful assistant.
Answer questions clearly.
Context: {context}
History: {chat_history}
Question: {question}
Answer:"""
# Setup
llm = OpenAI(api_key="sk-...", model="gpt-4o-mini")
vector_db = Pinecone(api_key="...", index_name="...")
db = Supabase(url="https://...", key="...")
# Use custom prompt
ai = LangChat(
llm=llm,
vector_db=vector_db,
db=db,
prompt_template=custom_prompt
)