Commit Graph

115 Commits

Author SHA1 Message Date
24d73b6bf8 Aggiunta validazione dei provider nella configurazione API e tests 2025-11-05 20:12:14 +01:00
trojanhorse47
2996bd4616 Add custom CSS styles and improve chat interface layout (#77) 2025-10-31 18:05:20 +01:00
Giacomo Bertolazzi
52a25e3804 Update README.md (#75)
* update readme
* fixed links
2025-10-31 17:47:32 +01:00
Simo
424735e547 Riduzione dimensione di prompts e instructions (#72) 2025-10-31 14:24:49 +01:00
trojanhorse47
5bda06823e Update chat interface (#70)
* Update chat interface to fill height and width in Gradio blocks
* Implement asynchronous streaming for Gradio responses and enhance pipeline event handling
* Refactor tool event handling to provide user-friendly messages and add utility function for descriptive tool actions
2025-10-31 14:24:39 +01:00
Giacomo Bertolazzi
fe6974e938 Copia della cartella resources nel Dockerfile (#71) 2025-10-31 13:07:43 +01:00
Simo
c501a58bf4 Added Prompt for tools (#68)
* Create detailed markdown instructions for all toolkits
* Update all toolkit classes to load instructions from external .md files
* Add query examples for cryptocurrency report generation
2025-10-31 00:13:02 +01:00
Giacomo Bertolazzi
df14ae5bc6 Fix configs validation (#66)
* fix configs validation of models

* added validation for defaults configs

* better error handling in main if any of error occurs during setup
2025-10-30 15:47:07 +01:00
Simo
b480888806 Refactoring post PRs (#61)
* - File configs.yaml.example impostato con modelli ollama piccoli di default (come in fasi iniziali progetto). Eliminati altri provider con chiavi a pagamento. Eliminato GPT-OSS poiché modello problematico e incompatibile con metodi standard ollama. Gemini 2.5 sembra funzionare ma è sempre intasato e non ne abbiamo assoluta conferma.
- Eliminati documenti inutili e datati

* doc esame reintrodotto

* configs.yaml.example riaggiunto dati completi

* fix

* Add ReasoningTools for enhanced decision-making and analysis processes

---------

Co-authored-by: Berack96 <giacomobertolazzi7@gmail.com>
2025-10-29 22:05:08 +01:00
trojanhorse47
ff6f422fe1 Align Gradio interface dropdowns with logical default values for models and strategies (#59) 2025-10-29 17:21:57 +01:00
trojanhorse47
3871a94481 55 configsyaml condivisi (#57)
* feat: make configs.yaml local and add configs.yaml.example template

- Add configs.yaml.example with all available configurations
- Add configs.yaml to .gitignore to prevent tracking local configs
- Remove configs.yaml from git tracking with git rm --cached
- Update README with separate sections for configs.yaml and .env
- Maintain consistent naming convention with .env.example

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove gemini-2.0-pro from configs.yaml.example

Removed Gemini Pro model from configs example

---------

Co-authored-by: Simone Garau <20005068@studenti.uniupo.it>
Co-authored-by: Giacomo Bertolazzi <31776951+Berack96@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-29 15:16:16 +00:00
Simo
4ba44abb19 Better Prompt (#45)
* Enhance report generation and team leader prompts with conditional output rules for empty sections.

* Update .gitignore and configuration for model adjustments; refine query classification prompt

* Enforce max response length in prompts

* Documentazione tool essenziale per il loro utilizzo da parte degli LLM.

* istruzioni chiare sui tool disponibili nei promt degli agenti

* corretto incongruenze nel report generation prompt

* convertito i promt in file markdown
2025-10-29 15:45:05 +01:00
Nunzi99
6d0b816033 LLM Providers (#52)
* Refactor configs dei modelli
* Aggiunti Providers
* Update .env.example
* Xai Aggiunto ma commentato (problemi di dependency)
2025-10-27 21:07:30 +01:00
Copilot
c7a3199f27 Implement configurable API providers from configs.yaml (#43)
* Implement configurable API providers from configs.yaml
* Refactor provider filtering to use WrapperHandler helper function
* Refactor API wrapper initialization to streamline configuration handling
* Refactor agent retrieval to use specific API tools directly
2025-10-27 17:53:36 +00:00
Giacomo Bertolazzi
6a9d8b354b Fix socials timestamp (#50)
* Fix Dockerfile per dipendenze di X
* time --> timestamp
* fix X command
2025-10-27 11:45:40 +00:00
Giacomo Bertolazzi
08774bee1b Demos (#42)
* Rimossi old docs & demos
* Aggiornata la documentazione dell'architettura dell'app
* Aggiunti nuovi script demo per i provider di mercato
* Fix problems with socials
* Fix Dockerfile per dipendenze di X
2025-10-27 12:42:58 +01:00
Giacomo Bertolazzi
551b6a049f Update telegram interface (#44)
* Rename telegram file
* Added LLM providers selection
* Updated callback handlers
* Improved telegram user waiting message
2025-10-27 12:42:13 +01:00
Giacomo Bertolazzi
93174afc81 Fix chat defaults (#46)
* Aggiornato il gestore della chat per impostare i valori predefiniti per il modello e la strategia nel dropdown.
2025-10-27 12:41:49 +01:00
Giacomo Bertolazzi
830d1933b1 Revert "Aggiungere LLM Providers (#48)" (#51)
This reverts commit 6ff2fcc2a7.
2025-10-26 16:56:21 +01:00
Nunzi99
6ff2fcc2a7 Aggiungere LLM Providers (#48)
* Refactor configs dei modelli
* Aggiunti Providers
2025-10-26 14:07:44 +01:00
Giacomo Bertolazzi
2e092d3f25 Lista di cryptovalute (#36)
* CryptoSymbolsTool per recuperare TUTTI i simboli delle criptovalute da Yahoo Finance
* CryptoSymbolsTools integrazione nel sistema di strumenti.
* Removed currency from config
* fix format symbol in all markets
2025-10-21 15:58:42 +02:00
Giacomo Bertolazzi
12339ccbff Team Workflow aggiornato (#37)
* Rimuovi la classe Predictor e aggiorna le importazioni in Pipeline e __init__.py
* Aggiungi modelli per l'analisi delle query e la generazione di report; aggiorna le configurazioni degli agenti
* Tests for report generation and team agent responses
* Aggiorna i prompt degli agenti
* Changed defaults models
* Aggiunta della classe PlanMemoryTool per la gestione dei task e aggiornamento della logica del team leader per un'esecuzione più dinamica del piano.
2025-10-20 22:05:58 +02:00
Giacomo Bertolazzi
885a70d748 Chat bug fix (#40)
* Update chat.py
* fixed chat not sending message & types

Co-authored-by: Nunzi99 <claudionunziante@gmail.com>
2025-10-20 17:12:29 +02:00
Nunzi99
06c660b659 14 socials integration (#34)
* Create XWrapper.py & ChanWrapper.py
* Tests for in XWrapper & ChanWrapper
* MAX_COMMENTS in social.py
* Soddisfatto Giacomo
* unified_timestamp
2025-10-20 16:56:11 +02:00
Nunzi99
3adf7ed250 Update chat.py (#39)
fixed chat bug by using gradio ChatInterface
2025-10-20 16:49:38 +02:00
Giacomo Bertolazzi
38daafce9a Refactor team management (#26)
* Refactor pipeline integration
* remove direct pipeline dependency from ChatManager and TelegramApp
* introduce PipelineInputs for better configuration management
* listener personalizzati per eventi nella funzione di interazione della pipeline
* added demos for agno
* USD in configs
* Dockerfile better cache
2025-10-15 14:00:39 +02:00
Giacomo Bertolazzi
d85d6ed1eb Fix event loop (#32)
* Fix main by ensuring a new event loop is created
* fix Dockerfile workspace error
2025-10-13 22:34:28 +02:00
Giacomo Bertolazzi
c96617a039 Telegram bot support (#23)
* Aggiungi supporto per il bot Telegram: aggiorna .env.example, pyproject.toml e uv.lock

* demo per bot Telegram con gestione comandi e inline keyboard

* Implementazione del bot Telegram con gestione dei comandi e stati di conversazione iniziali

* Aggiorna la gestione delle configurazioni nel bot Telegram: modifica gli stati della conversazione e aggiungi il supporto per la gestione dei messaggi.

* fix static models & readme

* aggiunto il supporto per la query dell'utente e modificata la visualizzazione dei messaggi di stato.

* Aggiunto il supporto per la gestione del bot Telegram e aggiornata la configurazione del pipeline

* Aggiornato .gitignore per includere la cartella .gradio e rimosso chroma_db. Aggiunto il supporto per la generazione di report in PDF utilizzando markdown-pdf nel bot Telegram.

* Refactor pipeline and chat manager for improved structure and functionality

* Better logging

* Aggiornato il comportamento del logging per i logger di agno. Aggiunto il supporto per l'opzione check_for_async nella configurazione di RedditWrapper.

* Rimosso codice commentato e import non utilizzati nella classe Pipeline per semplificare la struttura

* Aggiornata la sezione "Applicazione" nel README & fix main

* Telegram instance instead of static

* Fix logging to use labels for team model, leader model, and strategy

* Rinomina il lock da _lock a __lock per garantire l'incapsulamento nella classe AppConfig

* Rinomina i logger per una migliore identificazione e gestisce le eccezioni nel bot di Telegram

* Aggiorna i messaggi di errore nel gestore Telegram per una migliore chiarezza e modifica il commento nel file di configurazione per riflettere lo stato del modello.

* Aggiungi un messaggio di attesa durante la generazione del report nel bot di Telegram
2025-10-13 10:49:46 +02:00
Giacomo Bertolazzi
45a17d4570 lock variable fix (#28)
Refactor the lock variable in AppConfig to use ClassVar for pydantic error.
2025-10-12 23:47:56 +02:00
Giacomo Bertolazzi
862525cc62 Configurazioni dell'app (#27)
* Prompt messi in una cartella apposta
* Aggiorna importazioni demo per riflettere la nuova struttura delle cartelle API
* Aggiunto configurazione dell'applicazione
* Spostato ChatManager in app.interface
* Update README.md
* Aggiornato config per app & api
* Rinominato il modulo NewsAPI
* fix main infinite loop
* API base --> core
* pattern singleton per AppConfig.
* Estratto i tools nella loro cartella --> api/tools
* fix main KeyboardInterrupt
* update tests
* Docker & libs
* fix copilot suggestions
2025-10-12 18:05:43 +02:00
Giacomo Bertolazzi
093a7f5a48 Refactor project structure to organize APIs (#24)
* Refactor project structure "api"
* fix bug conversione delle valute fiat in stablecoin in BinanceWrapper
* Refactor: WrapperHandler for managing API wrappers with retry logic; update related modules and tests
* Refactor: Update ProductInfo and Price classes to include aggregation methods; remove standalone aggregation functions
* fix docs
2025-10-11 21:36:13 +02:00
Giacomo Bertolazzi
517842c834 Refactor and update structure (#20)
* Aggiorna gli agenti e il modello del team per utilizzare OLLAMA_QWEN_1B

* Riorganizza e rinomina funzioni di estrazione in moduli di mercato e notizie; migliora la gestione delle importazioni

* Spostato main nel corretto file __main__ e aggiornato il README.md

* Aggiunta cartella per i modelli, agenti e team

* Aggiornata la posizione delle istruzioni

* Rimossi TODO e Aggiunto documentazione per metodi aggregated

* Aggiornate le istruzioni del coordinatore del team

* utils type checks

* Rinominato BaseWrapper in MarketWrapper e fix type check markets

* fix type checks di notizie e social.

* Aggiunti type hints finali

* Riorganizzati gli import

* Refactoring architetturale e spostamento classi base

- Eliminazione del file __init__.py obsoleto che importava ChatManager e Pipeline
- Spostamento della classe Pipeline in agents/pipeline.py
- Spostamento della classe ChatManager in utils/chat_manager.py
- Aggiornamento di __main__.py per importare da app.utils e app.agents, e modifica della logica per utilizzare Pipeline invece di chat per la selezione di provider e stile
- Creazione della cartella base con classi base comuni: markets.py (ProductInfo, Price, MarketWrapper), news.py (Article, NewsWrapper), social.py (SocialPost, SocialComment, SocialWrapper)
- Aggiornamento di tutti gli import nel progetto (markets/, news/, social/, utils/, tests/) per utilizzare la nuova struttura base/

* Aggiornato Readme

* Corretto il valore predefinito della valuta in BinanceWrapper da "USDT" a "USD"

* fix type in tests

* fix type per models

* Rinominato 'quote_currency' in 'currency' e aggiornato il trattamento del timestamp in Price

* fix errors found by Copilot

* WrapperHandler: semplificata la logica di chiamata delle funzioni sui wrapper

* fix docs

* fix demos, semplificata logica lista ollama
2025-10-08 16:21:09 +02:00
trojanhorse47
85153c405b Tool (#15)
* Refactor market agent and toolkit to support batch price retrieval

* 1. Correzione del modello base del Team: inizializzato con qwen3:latest
2. Modifica dell'interfaccia e inserimento di un ChatManager per gestire interazione, salvataggio e caricamento della chat.

* * Fix degli import
+ Aggiunta cancellazione casella di input all'invio della richiesta dell'utente

* Riorganizzazione degli import per utilizzare il percorso corretto in tutti i moduli

* Remove unused imports from __init__.py

* Update __all__ in __init__.py to include MARKET_INSTRUCTIONS

---------

Co-authored-by: Berack96 <giacomobertolazzi7@gmail.com>
2025-10-03 11:42:11 +02:00
Giacomo Bertolazzi
d2fbc0ceea 12 fix docs (#13)
* fix dependencies uv.lock

* refactor test markers for clarity

* refactor: clean up imports and remove unused files

* refactor: remove unused agent files and clean up market API instructions

* refactor: enhance wrapper initialization with keyword arguments and clean up tests

* refactor: remove PublicBinanceAgent

* refactor: aggregator
- simplified MarketDataAggregator and related models to functions

* refactor: update README and .env.example to reflect the latest changes to the project

* refactor: simplify product info and price creation in YFinanceWrapper

* refactor: remove get_all_products method from market API wrappers and update documentation

* fix: environment variable assertions

* refactor: remove status attribute from ProductInfo and update related methods to use timestamp_ms

* feat: implement aggregate_history_prices function to calculate hourly price averages

* refactor: update docker-compose and app.py for improved environment variable handling and compatibility

* feat: add detailed market instructions and improve error handling in price aggregation methods

* feat: add aggregated news retrieval methods for top headlines and latest news

* refactor: improve error messages in WrapperHandler for better clarity

* fix: correct quote currency extraction in create_product_info and remove debug prints from tests
2025-10-02 01:40:59 +02:00
Simo
a8755913d8 Merge pull request #10 from Berack96/2-news-api
Va bene così 2
2025-10-01 16:22:43 +02:00
Simo
646efe27e6 Merge branch 'main' into 2-news-api 2025-10-01 16:22:08 +02:00
Simo
6512d78ab3 Merge pull request #11 from Berack96/9-enhancement-con-financialdatasettool-e-yfinance
Va bene così
2025-10-01 16:19:21 +02:00
e284006a6d Pre-merge main conflicts 2025-10-01 16:15:09 +02:00
Simo
dc9dc98298 3 market api (#8)
* Creazione branch tool, refactor degli import e soppressione dei warning

* Update pytest configuration and dependencies in pyproject.toml

* Add news API integration and related configurations

- Update .env.example to include NEWS_API_KEY configuration
- Add newsapi-python dependency in pyproject.toml
- Implement NewsAPI class for fetching news articles
- Create Article model for structured news data
- Add tests for NewsAPI functionality in test_news_api.py
- Update pytest configuration to include news marker

* Add news API functionality and update tests for article retrieval

* ToDo:
1. Aggiungere un aggregator per i dati recuperati dai provider.
2. Lavorare effettivamente all'issue

Done:
1. creati test per i provider
2. creato market_providers_api_demo.py per mostrare i dati recuperati dalle api dei providers
3. aggiornato i provider
4. creato il provider binance sia pubblico che con chiave
5. creato error_handler.py per gestire decoratori e utilità: retry automatico, gestione timeout...

* Refactor news API integration to use NewsApiWrapper and GnewsWrapper; add tests for Gnews API functionality

* Add CryptoPanic API integration and related tests; update .env.example and test configurations

* Implement WrapperHandler for managing multiple news API wrappers; add tests for wrapper functionality

* Enhance WrapperHandler
- docstrings
- add try_call_all method
- update tests

* pre merge con phil

* Add DuckDuckGo and Google News wrappers; refactor CryptoPanic and NewsAPI

- Implemented DuckDuckGoWrapper for news retrieval using DuckDuckGo tools.
- Added GoogleNewsWrapper for accessing Google News RSS feed.
- Refactored CryptoPanicWrapper to unify get_top_headlines and get_latest_news methods.
- Updated NewsApiWrapper to simplify top headlines retrieval.
- Added tests for DuckDuckGo and Google News wrappers.
- Enhanced documentation for CryptoPanicWrapper and NewsApiWrapper.
- Created base module for social media integrations.

* - Refactor struttura progetto: divisione tra agent e toolkit

* Refactor try_call_all method to return a dictionary of results; update tests for success and partial failures

* Fix class and test method names for DuckDuckGoWrapper

* Add Reddit API wrapper and related tests; update environment configuration

* pre merge con giacomo

* Fix import statements

* Fixes
- separated tests
- fix tests
- fix bugs reintroduced my previous merge

* Refactor market API wrappers to streamline product and price retrieval methods

* Add BinanceWrapper to market API exports

* Finito ISSUE 3

* Final review
- rm PublicBinanceAgent & updated demo
- moved in the correct folder some tests
- fix binance bug

---------

Co-authored-by: trojanhorse47 <cosmomemory@hotmail.it>
Co-authored-by: Berack96 <giacomobertolazzi7@gmail.com>
Co-authored-by: Giacomo Bertolazzi <31776951+Berack96@users.noreply.github.com>
2025-10-01 15:51:25 +02:00
Simone Garau
42690acfbb feat(markets): add yfinance integration for stock and crypto data
- Add yfinance wrapper with support for stocks and cryptocurrencies
- Update aggregated models to recognize yfinance products
- Include yfinance in market APIs tool and demo script
- Add comprehensive tests for yfinance functionality
- Update dependencies to include yfinance and required packages
2025-10-01 15:46:46 +02:00
6ebd58bdb7 Fixes
- MarketAPIs to include BinanceWrapper
- update RedditWrapper & tests
2025-10-01 14:53:00 +02:00
Simone Garau
31057007fb Finito ISSUE 3 2025-10-01 13:01:51 +02:00
2aa97e264a Enhance error logging in WrapperHandler to provide concise traceback information 2025-10-01 12:49:43 +02:00
73dcbbe12b Refactor WrapperHandler
- validation checks for initialization logic
- fix SocialAPIsTool
- fix RedditWrapper
2025-10-01 11:05:44 +02:00
e4e7023c17 Refactor news API methods to use 'limit' parameter instead of 'total' for consistency across wrappers 2025-10-01 10:26:21 +02:00
99ebb420fa Refactor news and social instructions
- enhance logging in WrapperHandler
- add parameterized mock wrappers for testing
2025-09-30 23:10:53 +02:00
01e7bf58f1 Refactor news & social modules
- update NewsAPIsTool
- update SocialAPIsTool
- add tests for NewsAPIsTool
- added some missing docs
2025-09-30 22:13:12 +02:00
3bc24afcea Refactor NewsAPIsTool to aggregate multiple news API wrappers and enhance functionality 2025-09-30 21:09:24 +02:00
f6d7ff6499 Refactor market toolkit to remove unused methods and streamline API calls 2025-09-30 20:43:05 +02:00
e8bf835fb3 Add BinanceWrapper to market API exports 2025-09-30 17:37:36 +02:00