.env
file:
text-embedding-ada-002
embedding model.
text-embedding-ada-002
generates embeddings with 1536 dimensions, so the index we created must have 1536 dimensions.
/api/chat
with the conversation state. We’ll define that route and specify the AI model, system instructions, and any tools we’d like the model to use.
useChat
hook to render the chat UI. By default, the Vercel AI SDK will POST to /api/chat
on submit.
Adding information to the knowledge base
Added information can be seen in Upstash Console
Retrieving information from the knowledge base in another conversation