https://github.com/datastaxdevs/python_vector_shakespeare
https://github.com/datastaxdevs/python_vector_shakespeare
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/datastaxdevs/python_vector_shakespeare
- Owner: datastaxdevs
- Created: 2023-09-14T15:59:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-27T02:35:05.000Z (about 2 years ago)
- Last Synced: 2023-12-27T03:23:35.299Z (about 2 years ago)
- Language: Jupyter Notebook
- Size: 6.24 MB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Shakespeare sample application for DataStax Python driver
1. Using astra cli or manually grabbing from the Astra UI, populate a .env file with the following items:
```
OPENAI_API_KEY=
ASTRA_DB_APPLICATION_TOKEN=
ASTRA_DB_ID=
ASTRA_DB_KEYSPACE="vector"
ASTRA_DB_REGION="us-east1"
ASTRA_DB_SECURE_BUNDLE_PATH=
```
2. Create a "vector" keyspace in your database using the Astra UI
3. `python -m pip -i requirements.txt`
4. Run the population command with `python populate.py` - this will take a while
5. Run the query with `python query.py ""
Example: python query.py 50 "How did Juliet die?"