Skip to content

Streamlit based Gen AI chatbot that allows users to get answers to queries related to financial documents.

License

Notifications You must be signed in to change notification settings

gkamboj/finance-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

finance-gpt

Finance GPT is a generative AI chatbot built on Streamlit 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.

Table of Contents

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:
      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:

    streamlit run finance-gpt.py
  6. Access the user interface: Open your web browser and navigate to 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:
1-interaction-types
  • PDF interaction type:
2-pdf-1 3-pdf-2
  • EXCEL interaction type:
4-csv-line 5-csv-bar

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:

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.

About

Streamlit based Gen AI chatbot that allows users to get answers to queries related to financial documents.

Topics

Resources

License

Stars

Watchers

Forks

Languages