A chat interface for your Pinecone Assistant to answer complex questions on your proprietary data
$ npx create-pinecone-app@latest --template pinecone-assistant
The Pinecone Assistant sample app demonstrates how to connect a chat interface to your Pinecone Assistant to answer complex questions on your proprietary data. This app allows users to upload PDF documents, process them, and then ask questions about the content using a chat interface.
The fastest way to get started is to use the create-pinecone-app
CLI tool to get up and running:
You need an API key to make API calls to your Pinecone project:
Then copy your generated key:
Alternatively, follow these steps:
You can create a Pinecone Assistant in the console, or by following the instructions here.
Requires Node version 20+
From the project root directory, run the following command:
Make sure you have populated the .env
file with relevant keys:
Start the app:
This project uses a standard Next.js application structure with API routes for backend functionality.
Frontend client
The frontend uses Next.js, Tailwind CSS, and custom React components to power the chat interface.
Backend server
This project uses Next.js API routes to proxy requests to the Pinecone Assistant API.
Connect to existing Pinecone Assistant: Connect to an existing Pinecone Assistant to provide a chat experience that can be hosted privately or publicly.
Streaming responses: Ask questions of the assistant and get responses streamed to the frontend in real-time.
Reference highlighting: Documents that were used in answering user questions are highlighted as references.
Server action for chat
The server action creates a stream with Pinecone Assistants:
Chat functionality
The chat functionality in the Home component consumes the stream from the server action and updates the UI in real-time:
Experiencing any issues with the sample app? Submit an issue, create a PR, or post in our community forum!
A chat interface for your Pinecone Assistant to answer complex questions on your proprietary data
$ npx create-pinecone-app@latest --template pinecone-assistant
The Pinecone Assistant sample app demonstrates how to connect a chat interface to your Pinecone Assistant to answer complex questions on your proprietary data. This app allows users to upload PDF documents, process them, and then ask questions about the content using a chat interface.
The fastest way to get started is to use the create-pinecone-app
CLI tool to get up and running:
You need an API key to make API calls to your Pinecone project:
Then copy your generated key:
Alternatively, follow these steps:
You can create a Pinecone Assistant in the console, or by following the instructions here.
Requires Node version 20+
From the project root directory, run the following command:
Make sure you have populated the .env
file with relevant keys:
Start the app:
This project uses a standard Next.js application structure with API routes for backend functionality.
Frontend client
The frontend uses Next.js, Tailwind CSS, and custom React components to power the chat interface.
Backend server
This project uses Next.js API routes to proxy requests to the Pinecone Assistant API.
Connect to existing Pinecone Assistant: Connect to an existing Pinecone Assistant to provide a chat experience that can be hosted privately or publicly.
Streaming responses: Ask questions of the assistant and get responses streamed to the frontend in real-time.
Reference highlighting: Documents that were used in answering user questions are highlighted as references.
Server action for chat
The server action creates a stream with Pinecone Assistants:
Chat functionality
The chat functionality in the Home component consumes the stream from the server action and updates the UI in real-time:
Experiencing any issues with the sample app? Submit an issue, create a PR, or post in our community forum!