{"id":25979145,"url":"https://github.com/developer-utkarsh/ai-math-assistant","last_synced_at":"2025-03-05T06:22:24.538Z","repository":{"id":280574107,"uuid":"931075778","full_name":"Developer-Utkarsh/ai-math-assistant","owner":"Developer-Utkarsh","description":"A friendly command-line calculator powered by Google's Gemini AI that understands natural language and provides step-by-step explanations of calculations.","archived":false,"fork":false,"pushed_at":"2025-02-11T17:21:00.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-04T07:02:22.525Z","etag":null,"topics":["agent","ai","bun","gemini","gemini-api","js","langchain","langgraph","maths","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Developer-Utkarsh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-11T17:18:51.000Z","updated_at":"2025-02-25T08:45:28.000Z","dependencies_parsed_at":"2025-03-04T07:02:30.755Z","dependency_job_id":"f1996857-1281-4dfc-9fb5-adfa009fa0c2","html_url":"https://github.com/Developer-Utkarsh/ai-math-assistant","commit_stats":null,"previous_names":["developer-utkarsh/ai-math-assistant"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-Utkarsh%2Fai-math-assistant","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-Utkarsh%2Fai-math-assistant/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-Utkarsh%2Fai-math-assistant/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Developer-Utkarsh%2Fai-math-assistant/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Developer-Utkarsh","download_url":"https://codeload.github.com/Developer-Utkarsh/ai-math-assistant/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241976156,"owners_count":20051587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","ai","bun","gemini","gemini-api","js","langchain","langgraph","maths","nodejs"],"created_at":"2025-03-05T06:22:23.860Z","updated_at":"2025-03-05T06:22:24.531Z","avatar_url":"https://github.com/Developer-Utkarsh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Math Assistant CLI\n\nA friendly command-line calculator powered by Google's Gemini AI that understands natural language and provides step-by-step explanations of calculations.\n\n## Features\n\n- 🧮 Natural language math calculations\n- 💬 Friendly, conversational responses\n- 📝 Step-by-step explanations\n- ⚡ Fast and efficient processing\n- 🔄 Interactive CLI interface\n- 🎯 Precise numerical results\n\n## Prerequisites\n\nBefore you begin, ensure you have installed:\n\n- [Node.js](https://nodejs.org/) (v16 or higher)\n- [Bun](https://bun.sh/) (v1.0 or higher)\n- A Google Gemini API key ([Get it here](https://makersuite.google.com/app/apikey))\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/Developer-Utkarsh/ai-math-assistant.git\ncd ai-math-assistant\n```\n\n2. Install dependencies:\n\n```bash\nbun install\n```\n\n3. Create a `.env` file in the root directory:\n\n```bash\nGOOGLE_API_KEY=your_gemini_api_key_here\n```\n\n## Usage\n\n1. Start the application:\n\n```bash\nbun run index.ts\n```\n\n2. The manual will be displayed showing available commands and examples.\n\n3. Enter mathematical queries in natural language:\n\n```\n\u003e add 25 and 35, then multiply by 2\n\u003e what is 13 plus 14 times 5\n\u003e multiply 6 by 8 and add 10\n```\n\n### Special Commands\n\n- `help` - Display the user manual\n- `clear` - Clear the screen\n- `exit` - Exit the program\n- `Ctrl+C` - Force exit the program\n\n### Example Interactions\n\n```\n\u003e add 25 and 35, then multiply by 2\nFirst, I added 25 and 35 to get 60. Then, I multiplied 60 by 2.\nFinal result: 120\n\n\u003e what is 13 plus 14 times 5\nFirst, I added 13 and 14 to get 27. Then, I multiplied 27 by 5.\nFinal result: 135\n```\n\n## Technical Details\n\n### Architecture\n\nThe application uses:\n\n- LangChain.js for AI agent orchestration\n- Google's Gemini Pro model for natural language understanding\n- Custom tools for mathematical operations\n- State Graph for managing conversation flow\n\n### Tools Available\n\n1. `addTool`: Performs addition of two numbers\n2. `multiplyTool`: Performs multiplication of two numbers\n3. `divideTool`: Performs Division of two numbers\n\n### Response Format\n\nEach response includes:\n\n- Step-by-step explanation of the calculation\n- Clear final numerical result\n- Friendly, conversational tone\n\n## Contributing\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Google Gemini AI for natural language processing\n- LangChain.js for agent framework\n- Bun for TypeScript runtime\n\n## Support\n\nIf you encounter any issues or have questions:\n\n1. Check the [Issues](https://github.com/Developer-Utkarsh/ai-maths-assistant/issues) page\n2. Create a new issue with detailed description\n\n## Security\n\nThe application uses environment variables for API key management. Never commit your `.env` file or share your API keys.\n\n## Best Practices\n\n1. Always use clear, natural language for queries\n2. One calculation per query for best results\n3. Use 'help' command when unsure\n4. Check error messages for troubleshooting\n\n## Troubleshooting\n\nCommon issues and solutions:\n\n1. **Slow responses:**\n\n   - Check your internet connection\n   - Verify API key status\n\n2. **Invalid API Key:**\n\n   - Ensure `.env` file is properly configured\n   - Verify API key is valid and active\n\n3. **Calculation Errors:**\n   - Try rephrasing your question\n   - Break complex calculations into steps\n\n## Stay Connected\n\n- Follow on [Twitter](https://x.com/UtkarshTheDev/)\n- Star the repository for updates\n- Join our community discussions\n\n---\n\nMade with ❤️ by Utkarsh Tiwari\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-utkarsh%2Fai-math-assistant","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeveloper-utkarsh%2Fai-math-assistant","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeveloper-utkarsh%2Fai-math-assistant/lists"}