This is a demo of an interactive financial assistant. It can show you stocks, tell you their prices, and even help you buy shares.
Check out our blog post for a more detailed breakdown of the codebase and how this app works.
- An Astra DB account. You can create one here.
- An Astra Vector Database
- An OpenAI account and api key create one here
- Clone this repository to your local machine.
- Install the dependencies by running
npm install
in your terminal. - Set up the following environment variables in your IDE or
.env
file:OPENAI_API_KEY
: api key for OPENAIASTRA_DB_ENDPOINT
: Your Astra DB vector database endpoint- Copy from the
Database Detail
- Copy from the
ASTRA_DB_APPLICATION_TOKEN
: The generated app token for your Astra database- To create a new token go to your database's
Connect
tab and clickGenerate Token
. (your Application Token begins withAstraCS:...
)
- To create a new token go to your database's
- Create a collection (vector disabled) and load the
data/sp500_companies.csv
data into it
To start the development server, run npm run dev
in your terminal. Open http://localhost:3000 to view the chatbot in your browser.