A simple example showing how to retrieve results from pinecone using Mastra and OpenAI.
- Node.js v20.0+
- pnpm (recommended) or npm
- OpenAI API key
- Pinecone API key
-
Clone the repository and navigate to the project directory:
git clone https://github.com/mastra-ai/mastra cd examples/basics/rag/retrieve-results
-
Copy the environment variables file and add your OpenAI API key:
cp .env.example .env
Then edit
.env
and add your OpenAI API key:OPENAI_API_KEY=sk-your-api-key-here PINECONE_API_KEY=your-pinecone-api-key-here
-
Install dependencies:
pnpm install
-
Run the example:
pnpm start