Skip to content

An immersive chatbot using augmented generation methods.

License

Notifications You must be signed in to change notification settings

mansa-team/prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus

A immersive chatbot using augmented generation techniques linked to the Mansa's Stocks API that generates in-depth, updated and trust-worthy data to help users manage their assets and investments, using an extensive workflow to generate responses using graphs, charts and etc.

With a full-on Chat History that can be integrated with the in-construction Mansa's main database and user data to provide the user a full chatbot experience inside our project that differs from just using normal chatbots like ChatGPT or Gemini, even tho the Large Language Model (LLM) used is Google's Gemini because of the use of exclusive and updated data on the Brazilian Stocks Market.

Important

New changes made to this project are now made in the Mansa's Server repository, consult it for more info

Installation

  1. Clone the repository:

    git clone https://github.com/heitorrosa/prometheus
    cd prometheus
  2. Install dependencies:

    pip install -r requirements.txt
  3. Create environment configuration (.env):

     #
     #$ DATABASE CONFIGURATION
     #
     MYSQL_USER=user
     MYSQL_PASSWORD=password
     MYSQL_HOST=localhost
     MYSQL_DATABASE=database
    
     #
     #$ STOCKS API
     #
     STOCKSAPI_HOST=localhost
     STOCKSAPI_PORT=3200
     STOCKSAPI_PRIVATE.KEY=your_api_key_here
    
     #
     #$ PROMETHEUS
     #
     PROMETHEUS_ENABLED=TRUE
    
     PROMETHEUS_HOST=localhost
     PROMETHEUS_PORT=3201
    
     PROMETHEUS_KEY.SYSTEM=TRUE
     PROMETHEUS_PRIVATE.KEY=your_api_key_here
    
     GEMINI_API.KEY=your_api_key_here
  4. Run the server:

    python src/__init__.py

Workflow

graph TD
    A["User Input"] --> B["Stage 1: Query Parser<br/>Gemini 2.5 Flash Lite"]
    B --> C["Parse and Extract Parameters"]
    C --> E["Stage 2: Data Retrieval<br/>Mansa Stocks API"]
    E --> G["Stage 3: Report Generation<br/>Gemini 2.5 Flash Lite"]
    G --> H["Analyze Data"]
    G --> I["Generate Insights"]
    G --> J["Create Visualizations"]
    H --> K["Final Output<br/>Markdown + Charts"]
    I --> K
    J --> K
    K --> L["Frontend Rendering<br/>Interactive Chat"]
Loading

TODO

  • CORS environment validation to prevent API requests outside the website
  • Single initialization engine for the modules that depend on FastAPI, so I can have on port binded for all the modules (prob to be implemented in the server repository)

License

Mansa Team's MODIFIED GPL 3.0 License. See LICENSE for details.

About

An immersive chatbot using augmented generation methods.

Resources

License

Stars

Watchers

Forks

Contributors