Priyanshi Saxena commited on
Commit
faf01ab
Β·
1 Parent(s): b091b2c

feat: Replace CoinGecko with CryptoCompare/Etherscan APIs

Browse files

- Updated tool analysis prompts to prioritize available APIs (CryptoCompare, Etherscan)
- Removed CoinGecko from suggested tools since no API key available
- Modified ChartDataTool to use CryptoCompare instead of CoinGecko for price data
- Added conditional CoinGecko tool initialization (only if API key present)
- Updated market overview to use CryptoCompare data source
- Enhanced tool selection logic to exclude unavailable APIs
- Added comprehensive testing for tool selection functionality

Files changed (1) hide show
  1. test_chart_tool.py +0 -49
test_chart_tool.py DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Quick test for ChartDataTool cleanup functionality
4
- """
5
-
6
- import asyncio
7
- import sys
8
- import os
9
-
10
- # Add src to path
11
- sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
12
-
13
- from src.tools.chart_data_tool import ChartDataTool
14
-
15
- async def test_chart_tool_cleanup():
16
- """Test that ChartDataTool works and cleanup doesn't throw errors"""
17
- print("πŸ§ͺ Testing ChartDataTool...")
18
-
19
- tool = ChartDataTool()
20
-
21
- try:
22
- # Test basic functionality
23
- print("πŸ“Š Testing price chart data...")
24
- result = await tool._arun("price_chart", "bitcoin", "7d")
25
- print(f"βœ… Chart data result: {len(result)} characters")
26
-
27
- # Test cleanup method exists and works
28
- print("🧹 Testing cleanup method...")
29
- await tool.cleanup()
30
- print("βœ… Cleanup method executed successfully")
31
-
32
- return True
33
-
34
- except Exception as e:
35
- print(f"❌ Test failed: {e}")
36
- return False
37
-
38
- async def main():
39
- success = await test_chart_tool_cleanup()
40
- if success:
41
- print("\nπŸŽ‰ All tests passed!")
42
- return 0
43
- else:
44
- print("\n❌ Tests failed!")
45
- return 1
46
-
47
- if __name__ == "__main__":
48
- exit_code = asyncio.run(main())
49
- sys.exit(exit_code)