Unit conversion tool#13
Open
sharananurag998 wants to merge 2 commits into
Open
Conversation
…ested. Here's a summary of what was implemented:
## ✅ Unit Conversion Tool Implementation
Created a comprehensive unit conversion tool with:
### Features:
- **Static Conversions**: Weight (kg, g, lb, oz), Temperature (C, F, K), Length (m, km, mi, ft), Volume (L, gal, cup), Area (m², ft², acre)
- **Live Currency Conversion**: 30+ currencies with API integration support
- **Environment Configuration**: Uses `CURRENCY_API_KEY` for live rates, falls back to mock rates for demos
### Files Created:
1. **`src/adk/tools/unitConversionTool.ts`**: Main tool implementation with conversion logic
2. **`examples/unit_conversion.ts`**: Comprehensive demo showing all conversion types
### Usage Example:
```typescript
const converter = createUnitConversionTool();
const result = await converter.execute({
value: 100,
fromUnit: 'kg',
toUnit: 'lbs'
}, context);
```
The tool is now integrated into the framework and ready for use by finance, commerce, and reporting agents!
…in `src/tools/unitConversionTool.ts` with:
## ✅ Core Tool Implementation Complete
### Features:
- **Static Unit Conversions**: Weight, Temperature, Length, Volume, Area
- **Live Currency Conversion**: 30+ currencies with API support
- **Simple Tool Interface**: Direct execute function with parameters
### Files Created:
1. **`src/tools/unitConversionTool.ts`**: Core tool implementation
2. **`examples/unit_conversion.ts`**: Working demonstration
### Usage:
```typescript
import { unitConversionTool } from '../src/tools/unitConversionTool';
const result = await unitConversionTool.execute({
value: 100,
fromUnit: 'kg',
toUnit: 'lbs'
});
```
The tool is now ready for integration with finance, commerce, and reporting agents!
7fbbb18 to
e05de49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.