Configuring Vector Database
Superagent supports two primary methods for integrating vector databases: using environment variables and leveraging the Superagent SDK. This guide will walk you through both methods.
Environment variables
This is the easiest way to get started.
You can see supported vector databases in Superagent, and their corresponding environment variables.
Step-by-step guide
After setting the environment variables for one of the supported vector databases, you can create a datasource with the vector database:
Using the SDK
This is more flexible and allows you to use multiple databases in the same project.
Step-by-step guide
Note that we will be using Pinecone as an example, but the same steps apply to all supported vector databases.
- Initialize the Superagent client with your API key:
- Create a vector database:
- Create a datasource with the vector database:
For more information on interacting with datasources, refer to the example.
Additional Resources: