Commit Graph

80 Commits

Author SHA1 Message Date
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
f7dec6fdb6 Refactor market API wrappers to streamline product and price retrieval methods 2025-09-30 17:30:14 +02:00
754d43771d Merge branch '2-news-api' into 3-market-api 2025-09-30 17:30:01 +02:00
a5ef982e12 Fixes
- separated tests
- fix tests
- fix bugs reintroduced my previous merge
2025-09-30 16:38:25 +02:00
3074b58ea5 Fix import statements 2025-09-30 15:58:52 +02:00
7c61b311aa Merge branch '2-news-api' into 3-market-api 2025-09-30 15:50:49 +02:00
Simone Garau
8304cf9ea8 pre merge con giacomo 2025-09-30 15:36:50 +02:00
43b2bddba5 Add Reddit API wrapper and related tests; update environment configuration 2025-09-30 15:36:37 +02:00
c1952526ad Fix class and test method names for DuckDuckGoWrapper 2025-09-30 12:54:19 +02:00
15182e23c2 Refactor try_call_all method to return a dictionary of results; update tests for success and partial failures 2025-09-30 12:41:45 +02:00
trojanhorse47
cce09b493e Merge remote-tracking branch 'origin/3-market-api' into tool
# Conflicts:
#	src/app.py
#	src/app/agents/market_agent.py
#	src/app/markets/__init__.py
#	src/app/markets/coinbase.py
#	src/app/markets/cryptocompare.py
#	src/app/pipeline.py
#	tests/agents/test_market.py
#	tests/agents/test_predictor.py
2025-09-30 12:37:46 +02:00
trojanhorse47
fcbb312d08 - Refactor struttura progetto: divisione tra agent e toolkit 2025-09-30 12:28:44 +02:00
dfe3b4ad90 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.
2025-09-30 12:24:43 +02:00
Simone Garau
fb38aef790 pre merge con phil 2025-09-30 12:11:10 +02:00
40fb400a9c Enhance WrapperHandler
- docstrings
- add try_call_all method
- update tests
2025-09-30 11:46:52 +02:00
912a9b9c8d Implement WrapperHandler for managing multiple news API wrappers; add tests for wrapper functionality 2025-09-30 02:55:09 +02:00
6aa9d4969f Add CryptoPanic API integration and related tests; update .env.example and test configurations 2025-09-30 01:54:26 +02:00
c17a948ae0 Refactor news API integration to use NewsApiWrapper and GnewsWrapper; add tests for Gnews API functionality 2025-09-30 00:34:07 +02:00
Simone Garau
dfca44c9d5 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...
2025-09-29 21:28:41 +02:00
fc4753a245 Add news API functionality and update tests for article retrieval 2025-09-29 19:21:08 +02:00
badd3e2a6c 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
2025-09-29 15:15:18 +02:00
2be9e0f319 Update pytest configuration and dependencies in pyproject.toml 2025-09-29 14:39:31 +02:00
trojanhorse47
c82f10b32c Creazione branch tool, refactor degli import e soppressione dei warning 2025-09-29 12:22:02 +02:00
4615ebe63e Pydantic
- use Pydantic for input & output for models
- update ToolAgent to utilize new model definitions
- improve test cases for consistency
2025-09-27 18:51:20 +02:00
03d8523a5a Refactor market system and improve app configuration
- Refactor market system from singleton function to class-based architecture with MarketAPIs
- Add automatic API key detection for Coinbase and CryptoCompare wrappers
- Improve error handling and logging with agno.utils.log throughout the application
- Split Models class into separate methods for online and local model availability
- Add proper JSON response extraction with thinking pattern support
- Enhance ToolAgent with better state management for provider and style selection
- Update Gradio app with proper server configuration and logging
2025-09-27 17:49:32 +02:00
a51ec67ac1 Add TODO comments for request analysis and sentiment handling in ToolAgent 2025-09-26 16:17:30 +02:00
eaa2e9e12a Merge branch 'market-agent' 2025-09-26 13:38:32 +02:00
c826a8e093 Refactor
- ToolAgent initialization
- market API handling list
2025-09-26 13:38:14 +02:00
Giacomo Bertolazzi
058ecb9d9d Update README.md
- fixed todo list
2025-09-26 13:22:10 +02:00
a3824489ed Refactor pytest configuration:
- streamline marker addition
- remove unused OLLAMA_MODELS_PATH (OLLAMA_HOST should be enough even for Docker)
2025-09-26 13:15:50 +02:00
3e746cdd45 Fixed Docker
- Update Dockerfile, docker-compose
- fixed app instructions not working
- fixed json ouput sanification
- added tests for predictor
2025-09-26 12:45:05 +02:00
d8ed299724 Remove pytest configuration file and clean up test suite by optimizing imports and simplifying test methods 2025-09-26 05:03:18 +02:00
89c8faf1be Update README and tests: improve test instructions and add new test suite for market system 2025-09-26 04:52:49 +02:00
576d69921b Enhance documentation 2025-09-26 04:11:04 +02:00
148bff7cfd Refactor Predictor and market data handling
- Added Predictor class with input preparation and instructions for financial strategy generation.
- Removed PredictorAgent class and integrated its functionality into the new Predictor module.
- Created a base market API wrapper and specific implementations for Coinbase and CryptoCompare.
- Introduced PublicBinanceAgent for fetching public prices from Binance.
- Refactored ToolAgent to utilize the new Predictor and market API wrappers for improved data handling and predictions.
- Updated models to streamline the selection of available LLM providers.
- Removed deprecated signer classes for Coinbase and CryptoCompare.
2025-09-26 03:43:31 +02:00
48502fc6c7 !! Broken for now !!
Refactor environment variables and remove unused API key checks; introduce Models enum for supported models.
2025-09-25 22:24:24 +02:00