{"id":25808838,"url":"https://github.com/haseebahmed49/langchain-weather-api-agent","last_synced_at":"2026-05-26T16:08:29.021Z","repository":{"id":276887042,"uuid":"930604275","full_name":"HaseebAhmed49/langchain-weather-api-agent","owner":"HaseebAhmed49","description":"The AI-Powered Weather Aggregator that combines the capabilities of FastAPI, LangChain, and Streamlit to provide real-time weather information using an AI agent. The application fetches weather data from the OpenWeatherMap API and uses LangChain for intelligent querying. The backend is built with FastAPI, and the frontend is built using Streamlit.","archived":false,"fork":false,"pushed_at":"2025-02-11T18:34:46.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-28T06:16:25.204Z","etag":null,"topics":["external-api","fastapi","langchain","langchain-python","python3","streamlit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HaseebAhmed49.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-10T22:45:16.000Z","updated_at":"2025-02-12T22:11:59.000Z","dependencies_parsed_at":"2025-02-11T01:36:01.090Z","dependency_job_id":null,"html_url":"https://github.com/HaseebAhmed49/langchain-weather-api-agent","commit_stats":null,"previous_names":["haseebahmed49/langchain-weather-api-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HaseebAhmed49/langchain-weather-api-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaseebAhmed49%2Flangchain-weather-api-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaseebAhmed49%2Flangchain-weather-api-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaseebAhmed49%2Flangchain-weather-api-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaseebAhmed49%2Flangchain-weather-api-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaseebAhmed49","download_url":"https://codeload.github.com/HaseebAhmed49/langchain-weather-api-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaseebAhmed49%2Flangchain-weather-api-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33528197,"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":"ssl_error","status_checked_at":"2026-05-26T15:22:15.568Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["external-api","fastapi","langchain","langchain-python","python3","streamlit"],"created_at":"2025-02-27T22:38:33.972Z","updated_at":"2026-05-26T16:08:29.000Z","avatar_url":"https://github.com/HaseebAhmed49.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Powered Weather Aggregator\n\n## 📌 Project Overview\nThe **AI-Powered Weather Aggregator** that combines the capabilities of FastAPI, LangChain, and Streamlit to provide real-time weather information using an AI agent. The application fetches weather data from the OpenWeatherMap API and uses LangChain for intelligent querying. The backend is built with FastAPI, and the frontend is built using Streamlit.\n\n---\n## Project Structure\n\n```sh\nlangchain-weather-api-agent/\n│── backend/  \n│   ├── main.py       # FastAPI backend with LangChain  \n│   ├── .env          # API keys \n│── frontend/  \n│   ├── app.py        # Streamlit frontend \n│── requirements.txt  # Dependencies  \n│── README.md         # Project documentation\n```\n\n---\n## Technologies Used\n* **FastAPI** for backend API\n* **Streamlit** for frontend UI\n* **LangChain** for AI-based responses\n* **OpenAI** for using with LangChain\n\n---\n## 📌 Prerequisites\nEnsure you have the following installed on your system:\n- **Python 3.13+**\n- **pip** (Python package manager)\n\n---\n## 🛠 Installation \u0026 Setup\n\n### 1️⃣ Clone the Repository\n```sh\ngit clone https://github.com/haseebahmed49/langchain-weather-api-agent.git\ncd langchain-weather-api-agent\n```\n\n### 2️⃣ Create a Virtual Environment\n```sh\npython -m venv venv\nsource venv/bin/activate\n```\n\n### 3️⃣ Install Dependencies\n```sh\npip install -r requirements.txt\n```\n\n### 4️⃣ Set Up Environment Variables\nCreate a `.env` file in the backend directory and add your OpenAI/OpenWeatherMap API key:\n```sh\necho \"OPENAI_API_KEY=your_openai_api_key_here\" \u003e .env\necho \"WEATHER_API_KEY=your_weather_api_key_here\" \u003e .env\n```\n\n---\n## 🖥 Backend (FastAPI)\n\n### 📌 Start the FastAPI Server\nRun the backend using:\n```sh\nuvicorn backend.main:app --reload\n```\nThe API will be available at `http://127.0.0.1`.\n## Backend (FastAPI) - main.py\n\n### Functionality:\n- Uses FastAPI to create an API that fetches weather data from OpenWeatherMap.\n- Calls OpenAI's model via LangChain for summary of the weather.\n- Handles weather datails filtering by location.\n\n### API Endpoints:\n#### 1. Fetch News Articles\n**Get/weather** - Fetches weather details based on the location provided.\n\n---\n## 🎨 Frontend (Streamlit)\n\n### 📌 Run the Streamlit App\n```sh\nstreamlit run app.py\n```\n\n### Functionality:\n- Accepts user input for location.\n- Calls the FastAPI backend to fetch weather details for the location.\n- Displays a summary of weather.\n\n### Key Features:\n- Interactive UI with Streamlit.\n- Real-time weather fetching based on user input.\n- Error handling for API failures.\n\n---\n## Application View\n\n\n## 📜 License\nThis project is licensed under the MIT License.\n\n---\n## Contact\nFor any queries or issues, feel free to reach out:\n* Email: haseebahmed02@gmail.com\n* GitHub: https://github.com/HaseebAhmed49\n\n💡 **Happy Coding!** 🚀\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaseebahmed49%2Flangchain-weather-api-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaseebahmed49%2Flangchain-weather-api-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaseebahmed49%2Flangchain-weather-api-agent/lists"}