Skip to content

madzai/chatbot_llm

Repository files navigation

Chainlit Chatbot

A Chatbot which analyzes stock analysts' forecast on the stock market
The chatbot can store stock articles found online, and extract information such as market outlook from the articles.



chat_image

chat_image

Copy the code

Run the following command in your local folder after logging in with your Github account:

git clone https://github.com/madzai/chatbot_llm.git

Install required Python packages

Create and activate a virtual environment. Then run the following code in the parent folder:

pip install -r requirements.txt

Update the variables in .env file

Update variable KEY_TOGETHERAI (you need a Together AI account) for the Chatbot to run.
Update variable SERPER_API_KEY (you need a Serper account) for the Chatbot to be able to do web search for new stock articles.

Run the code

Run the chatbot with the following code in the parent folder:

chainlit run app.py

The chatbot will be available in http://localhost:8000/

Update the data

Search for newest stock articles in order to get the most updated market information.
Use function Update_all_data() and run the code in webSearch.py to search for new stock articles and store for use.

python webSearch.py

About the stock article data

The stock articles are stored in guru_urls.json.
File guru_source.json defines the data source and stock analysts to search for when updating the data.

About

A Chatbot which analyzes stock analysts' forecast on the stock market

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published