Setting Up & Running "Chat" Function on Database

Some dependdencies of the chat function need very specific package versions, so to keep everything isolated, please create a new seperate conda enviornment by:

conda env create

For Mac users, if you want to use GPT with API, you need to create your own OpenAI account and then embed your API key in your system with writing this in your .bash file:

export OPENAI_API_KEY = "your api key"

Run the following to update system file and the new key should be incorporated:

source ~/.bash_profile

Activate the conda environment again after you have updated the system file

conda activate ucsd_study

Then run an instance (chat_with_feedback) of our chat function by:

python chat/chat_with_feedback.py

We have created a few versions of our chat functions: - chat_base.py is the vanill implementation of the chat function. - chat_langchain.py atampts to us the langchain package (not working yet). - chat_standard.py is the currently useful standard version. - chat_with_feedcack.py is chat_standard.py but implemented a feedcak for follow up questions, which is much smarter and useful than the standard version.

An example of chat feedback in in here and we have a demo of chat function in here: