https://github.com/gkamboj/finance-gpt
Streamlit based Gen AI chatbot that allows users to get answers to queries related to financial documents.
https://github.com/gkamboj/finance-gpt
analytics cloud-foundry csv-files genai-chatbot langchain openai python rag sap-btp streamlit text-embedding
Last synced: 8 months ago
JSON representation
Streamlit based Gen AI chatbot that allows users to get answers to queries related to financial documents.
- Host: GitHub
- URL: https://github.com/gkamboj/finance-gpt
- Owner: gkamboj
- License: mit
- Created: 2024-11-03T14:45:15.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-28T14:51:47.000Z (10 months ago)
- Last Synced: 2025-01-06T20:58:56.323Z (10 months ago)
- Topics: analytics, cloud-foundry, csv-files, genai-chatbot, langchain, openai, python, rag, sap-btp, streamlit, text-embedding
- Language: Python
- Homepage:
- Size: 465 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# finance-gpt
Finance GPT is a generative AI chatbot built on [Streamlit](https://streamlit.io/) that effectively addresses user queries by utilizing a vector-based document database. It allows users to get answers to queries related to any financial documents such as annual reports of listed companies or CSV/Excel of their financial figures. By employing the Retrieval-Augmented Generation (RAG) framework, uploaded document serve as context for generating responses through a large language model (LLM) using [LangChain](https://www.langchain.com/).
## Table of Contents
- [Setup Instructions](#setup-instructions)
- [Usage](#usage)
- [Screenshots](#screenshots)
- [Customizations](#customizations)
- [Deployment](#deployment)
- [Contributing](#contributing)
- [License](#license)
## Setup Instructions
After cloning the repository, follow these steps to set up the project:
1. **Set Up your development environment**:
- Download and install JetBrains PyCharm IDE or your preferred IDE.
- The following instructions will focus on PyCharm, but most IDEs provide similar features.
2. **Open the project**:
- In PyCharm, navigate to `File -> Open` and select the cloned repository folder.
3. **Set Up a local virtual environment**:
- Go to `Settings` > `Project: finance-gpt` > `Python Interpreter` > `Add Interpreter`.
- Choose `Add Local Interpreter` > `Virtualenv Environment`.
1. Select `Environment` -> `New`.
2. Set `Base Interpreter` to your installed Python version (e.g., Python 3.x).
3. Click `OK`.
4. **Install dependencies**:
- Run the following commands in your terminal:
```bash
pip install "generative-ai-hub-sdk[all]==1.2.2" --extra-index-url https://int.repositories.cloud.sap/artifactory/api/pypi/proxy-deploy-releases-hyperspace-pypi/simple/
pip install -r requirements.txt
```
- If you prefer to connect directly to the LLM via OpenAI instead of using the SAP proxy, you can skip the installation of `generative-ai-hub-sdk` and install required LangChain libraries instead.
5. **Run the application**:
```bash
streamlit run finance-gpt.py
```
6. **Access the user interface**:
Open your web browser and navigate to [http://localhost:8500/](http://localhost:8500/) (or the appropriate port if different).
## Usage
Once the application is running, you can interact with finance-gpt by uploading your file and entering your in the selected interface. The chatbot will retrieve relevant information from the document and generate responses based on the context.
## Screenshots
Here are some screenshots showcasing working deployments of the application.
- Chat inteerface selection:

- _PDF_ interaction type:


- _EXCEL_ interaction type:


## Customizations
You can easily customize the application in the following ways:
- Financial documents are just a use case for the RAG, same application can be generalised to query any kind of PDFs and CSVs.
- Modify the `properties.yml` file to adjust various flags and properties (e.g., enabling calls to the LLM without context if call with context does not give relevant response) to suit your requirements.
## Deployment
Here are a few options for deploying the application:
- [Streamlit Community Cloud](https://share.streamlit.io/deploy)
- Cloud Foundry: Relevant files for deployment through SAP BTP are included in the repository.
## Contributing
We welcome contributions to enhance finance-gpt! Please fork the repository and submit a pull request for any new features or bug fixes.
## License
This project is licensed under the MIT License. See the LICENSE file for more details.