{"id":50400227,"url":"https://github.com/deypadma2020/currencyconversiontool","last_synced_at":"2026-05-30T23:02:18.872Z","repository":{"id":308111826,"uuid":"1031434173","full_name":"deypadma2020/CurrencyConversionTool","owner":"deypadma2020","description":"Smart assistant that fetches real-time exchange rates and performs dynamic currency conversions based on user input.","archived":false,"fork":false,"pushed_at":"2025-08-16T18:54:26.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-16T20:29:34.208Z","etag":null,"topics":["exchangerate-api","groq-api","langchain-python","streamlit"],"latest_commit_sha":null,"homepage":"https://currencyconversiontool.onrender.com/","language":"Python","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/deypadma2020.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,"zenodo":null}},"created_at":"2025-08-03T18:21:04.000Z","updated_at":"2025-08-16T18:54:30.000Z","dependencies_parsed_at":"2025-08-04T09:37:28.822Z","dependency_job_id":"b57d4c76-a8dc-4f8c-9fc8-d21e8aa14062","html_url":"https://github.com/deypadma2020/CurrencyConversionTool","commit_stats":null,"previous_names":["deypadma2020/currencyconversiontool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deypadma2020/CurrencyConversionTool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FCurrencyConversionTool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FCurrencyConversionTool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FCurrencyConversionTool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FCurrencyConversionTool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deypadma2020","download_url":"https://codeload.github.com/deypadma2020/CurrencyConversionTool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deypadma2020%2FCurrencyConversionTool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33712579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["exchangerate-api","groq-api","langchain-python","streamlit"],"created_at":"2026-05-30T23:02:16.273Z","updated_at":"2026-05-30T23:02:18.863Z","avatar_url":"https://github.com/deypadma2020.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"````markdown\n# 💱 Currency Converter with LangChain + Groq\n\nThis project is a **currency conversion assistant** powered by [LangChain](https://www.langchain.com/), [Groq LLM](https://groq.com/), and [Streamlit](https://streamlit.io/).  \nIt demonstrates how to integrate tools (API calls + custom functions) with an LLM to fetch live exchange rates and perform currency conversion interactively.\n\n---\n\n## 🚀 Features\n- Fetches live currency conversion rates using [ExchangeRate API](https://www.exchangerate-api.com/).  \n- Uses **LangChain tool binding** to let the LLM decide when to call APIs.  \n- Convert any base currency (e.g., INR) to any target currency (e.g., USD).  \n- Provides a **Streamlit web UI** for ease of use.  \n- Can also be run **directly from the terminal**.\n\n---\n\n## 📦 Installation\n\n1. Clone this repository or copy the code:\n   ```bash\n   git clone https://github.com/your-username/currency-converter-langchain.git\n   cd currency-converter-langchain\n````\n\n2. Install dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. Create a `.env` file in the project root with your Groq API key:\n\n   ```\n   GROQ_API_KEY=your_groq_api_key_here\n   ```\n\n---\n\n## 🖥️ Usage\n\n### Run via Streamlit UI\n\nStart the web application:\n\n```bash\nstreamlit run app.py\n```\n\nOpen the link shown in your terminal (default: [http://localhost:8501](http://localhost:8501)).\nYou’ll see an interface like this:\n\n1. Enter **base currency** (e.g., `INR`).\n2. Enter **target currency** (e.g., `USD`).\n3. Enter the **amount** (e.g., `10`).\n4. Click **Convert**.\n5. The app will fetch the conversion rate via API → ask Groq to call the converter tool → and display the converted value.\n\n---\n\n### Run via Terminal\n\nIf you want to run the conversion without UI, you can directly execute the script with Python:\n\n```bash\npython app.py\n```\n\nSince `app.py` is built with Streamlit, running directly will just launch the UI in the browser.\nTo test tool usage in terminal only, you can create a small script `cli.py` like this:\n\n```python\nfrom app import get_conversion_factor, converter\n\nif __name__ == \"__main__\":\n    base_currency = \"INR\"\n    target_currency = \"USD\"\n    amount = 10\n\n    # Get conversion rate\n    rate = get_conversion_factor.invoke({\"base_currency\": base_currency, \"target_currency\": target_currency})\n    conversion_rate = rate[\"conversion_rate\"]\n\n    # Convert\n    converted = converter.invoke({\"base_currency_value\": amount, \"conversion_rate\": conversion_rate})\n    print(f\"{amount} {base_currency} = {converted:.2f} {target_currency}\")\n```\n\nRun:\n\n```bash\npython cli.py\n```\n\n---\n\n## 📂 Project Structure\n\n```\ncurrency-converter/\n│── app.py          # Streamlit application (UI + LangChain tools)\n│── cli.py          # Simple terminal script (optional)\n│── .env            # Environment variables (Groq API key)\n│── requirements.txt# Dependencies\n│── README.md       # Documentation\n```\n\n---\n\n## 🛠️ Tech Stack\n\n* **Python 3.9+**\n* **LangChain** (tool orchestration)\n* **Groq LLM** (LLM backend)\n* **ExchangeRate API** (live FX rates)\n* **Streamlit** (UI)\n* **dotenv** (environment management)\n\n---\n\n## ✅ Example\n\nFrom UI:\n\n```\nInput: 10 INR → USD\nOutput: 10 INR = 0.12 USD\n```\n\nFrom Terminal:\n\n```\n10 INR = 0.12 USD\n```\n\n---\n\n## 📜 License\n\nMIT License – feel free to modify and use this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeypadma2020%2Fcurrencyconversiontool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeypadma2020%2Fcurrencyconversiontool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeypadma2020%2Fcurrencyconversiontool/lists"}