-
Create or sign in to your Astra DB account.
-
Create a vector database. Store the database id, region and namespace, and token for later.
-
Create or sign in to your OpenAI account. Store your OpenAI key for later.
-
Click to deploy the app to Vercel: .
Set your environment variables to the values created in steps 1 and 3.
Set python virtual environment on linux apt-get install python3.11-venv python3 -m venv venv source venv/bin/activate clone repository and install all requirements.txt
- Navigate to your IDE, set up the following environment variables:
- ASTRA_DB_APPLICATION_TOKEN=Generate app token for Astra database
- ASTRA_DB_NAMESPACE=existing Astra DB namespace in vector database
- ASTRA_DB_API_ENDPOINT="https://ASTRA_DB_ID-ASTRA_REGION.apps.astra.datastax.com"
- ASTRA_DB_COLLECTION=Name of collection/table to be created in Astra database
- VECTOR_DIMENSION=Collection to be created with number of vector dimensions
- SCRAPED_FILE=Scraped data file location
- OPENAI_API_KEY=api key for OPENAI
- VECTOR_MODEL = Vector Model to be used. Future, models are expected to change due to deprecation and expect new model to be used
- Install Python dependencies:
pip install -r requirements.txt
- Run the collection creation script:
python populate_db/create_collection.py
- Run the data loading script:
python populate_db/load_data.py