Skip to content

Comments

feat: Add Math Assistant ability#120

Open
AstralDrift wants to merge 5 commits intoopenhome-dev:devfrom
AstralDrift:add-math-assistant
Open

feat: Add Math Assistant ability#120
AstralDrift wants to merge 5 commits intoopenhome-dev:devfrom
AstralDrift:add-math-assistant

Conversation

@AstralDrift
Copy link

Math Assistant Ability

A voice-enabled math assistant that performs calculations, solves equations, converts units, and explains mathematical concepts.

Features

  • Basic Calculations: Addition, subtraction, multiplication, division
  • Unit Conversions: Miles ↔ Kilometers, Feet ↔ Meters, Pounds ↔ Kilograms, Fahrenheit ↔ Celsius
  • Equation Solving: Simple linear equations (e.g., "2x + 3 = 7")
  • Percentages: "What is X% of Y?", "X is what percent of Y?"
  • Powers & Roots: Square roots, cubes, custom powers
  • Random Generation: Dice rolls, coin flips, random numbers

Example Triggers

  • "calculate 5 plus 3"
  • "convert 5 miles to kilometers"
  • "solve 2x plus 3 equals 7"
  • "roll a dice"
  • "what is 20 percent of 100"

Technical Details

  • Uses safe evaluation (no code injection)
  • Natural language math expression support
  • Multi-turn conversational interface
  • No external API required
  • Comprehensive error handling

Testing

  • Code follows template structure
  • README included with examples
  • No external API dependencies
  • Safe evaluation implemented

A voice-enabled math assistant that performs:
- Basic calculations (add, subtract, multiply, divide)
- Unit conversions (miles/km, feet/meters, lbs/kg, F/C)
- Equation solving (simple linear equations)
- Percentage calculations
- Powers and roots
- Random number generation (dice, coin flip)

Features:
- Natural language math expression support
- Safe evaluation (no code injection)
- Conversational multi-turn interface
- No external API required
- Graceful error handling

Example triggers:
- 'calculate 5 plus 3'
- 'convert 5 miles to kilometers'
- 'solve 2x plus 3 equals 7'
- 'roll a dice'
@AstralDrift AstralDrift requested a review from a team as a code owner February 23, 2026 16:39
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

✅ Ability Validation Passed

📋 Validating: community/math-assistant
  ✅ All checks passed!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

🔍 Lint Results

__init__.py — Empty as expected

Files linted: community/math-assistant/main.py

✅ Flake8 — Passed

✅ All checks passed!

@github-actions github-actions bot added first-contribution First-time contributor community-ability Community-contributed ability and removed first-contribution First-time contributor labels Feb 23, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 23, 2026

🔀 Branch Merge Check

PR direction: add-math-assistantdev

Passedadd-math-assistantdev is a valid merge direction

OmaClaw and others added 3 commits February 23, 2026 15:38
- Removed all eval() calls for security compliance
- Implemented safe token-based math parser using shunting yard algorithm
- Added resume_normal_flow() calls before all exit points
- All validation checks now pass
@github-actions github-actions bot added the first-contribution First-time contributor label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-ability Community-contributed ability first-contribution First-time contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant