A fictitious internal company database that employees can query via natural language.
- Replace the database with your own and you have an incredibly powerful open-source tool at your disposal.
- Clone the repository by running
git clone https://github.com/delfortrie/langchain_sql.git - I recommend setting up a virtual environment for this project ( step 3 & 4 )
- Run
python3 -m venv environment_namein the root directory of the project - Activate the virtual environment in Linux or Mac by running
source path/to/environment_name/bin/activate - Install the project dependencies by running
pip install -r path/to/requirements.txt - Open the .environment file and add your OpenAI API key to the
OPEN_API_KEYvariable - Rename the
.environmentfile to.env - Run the application with
streamlit run app.pyin the terminal
- You can obtain your API key by signing up for an account at https://openai.com/.
- I recommend placing a soft and hard limit on your billing, requests are not "cheap".
- Upload a document on the fly ( held in memory ) and make requests on said document.
- These might include: PDF, CSV, JSON, etc.
- Input a URL and make requests about the link provided ( news article, blog, etc. )