{"id":28555128,"url":"https://github.com/armanjscript/article-summary-generator","last_synced_at":"2026-05-08T13:13:38.952Z","repository":{"id":297761907,"uuid":"997825099","full_name":"armanjscript/Article-Summary-Generator","owner":"armanjscript","description":"A powerful Streamlit application that generates concise summaries of articles from Wikipedia and Medium based on user queries and automatically posts them to a Telegram channel. Perfect for researchers, students, and knowledge enthusiasts looking to quickly digest information from trusted sources.","archived":false,"fork":false,"pushed_at":"2025-06-07T09:10:35.000Z","size":11,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-06T09:40:04.791Z","etag":null,"topics":["article","langchain","langchain-ollama","langgraph","medium","serperapi","streamlit","summarization","summarizer","telegram-api","telegram-bot","wikipedia"],"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/armanjscript.png","metadata":{"files":{"readme":"README.markdown","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,"zenodo":null}},"created_at":"2025-06-07T09:08:19.000Z","updated_at":"2025-06-17T07:42:38.000Z","dependencies_parsed_at":"2025-06-07T10:29:46.871Z","dependency_job_id":null,"html_url":"https://github.com/armanjscript/Article-Summary-Generator","commit_stats":null,"previous_names":["armanjscript/article-summary-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/armanjscript/Article-Summary-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FArticle-Summary-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FArticle-Summary-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FArticle-Summary-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FArticle-Summary-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armanjscript","download_url":"https://codeload.github.com/armanjscript/Article-Summary-Generator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanjscript%2FArticle-Summary-Generator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32781863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["article","langchain","langchain-ollama","langgraph","medium","serperapi","streamlit","summarization","summarizer","telegram-api","telegram-bot","wikipedia"],"created_at":"2025-06-10T05:35:09.005Z","updated_at":"2026-05-08T13:13:38.925Z","avatar_url":"https://github.com/armanjscript.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Article Summary Generator for Telegram\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Python 3.8+](https://img.shields.io/badge/Python-3.8%2B-blue.svg)](https://www.python.org/downloads/release/python-380/)\n\nA powerful Streamlit application that generates concise summaries of articles from Wikipedia and Medium based on user queries and automatically posts them to a Telegram channel. Perfect for researchers, students, and knowledge enthusiasts looking to quickly digest information from trusted sources.\n\n## Features\n\n- **Intuitive Web Interface**: Built with Streamlit for seamless user interaction.\n- **Smart Article Search**: Uses the Serper API to find relevant articles on Wikipedia and Medium.\n- **AI-Powered Summarization**: Leverages LangChain and Ollama to create concise, high-quality summaries.\n- **Telegram Integration**: Automatically posts summaries to a specified Telegram channel.\n- **Structured Workflow**: Managed by LangGraph for efficient and reliable processing.\n\n## Technologies Used\n\n| Technology          | Description                                                  |\n|---------------------|--------------------------------------------------------------|\n| **Python**          | Core programming language for the application.                |\n| **Streamlit**       | Creates the interactive web-based user interface.             |\n| **LangChain**       | Framework for building applications with language models.     |\n| **LangChain-Ollama**| Integrates Ollama for advanced summarization tasks.           |\n| **LangGraph**       | Manages the workflow of keyword suggestion, search, and more. |\n| **Serper API**      | Enables web searches for relevant articles.                   |\n| **Telegram API**    | Sends summaries to a Telegram channel.                        |\n\n## Prerequisites\n\n- **Python 3.8 or later**: Ensure you have Python installed ([Python Downloads](https://www.python.org/downloads/)).\n- **Ollama**: A local AI server for running the \"qwen2.5:latest\" model. Install it from the [Ollama GitHub repository](https://github.com/ollama/ollama).\n\n## Installation\n\n1. **Install Ollama**:\n   - Follow the instructions at the [Ollama GitHub repository](https://github.com/ollama/ollama).\n   - Pull the required model:\n     ```bash\n     ollama pull qwen2.5:latest\n     ```\n   - Start the Ollama server:\n     ```bash\n     ollama serve\n     ```\n\n2. **Clone the Repository**:\n   ```bash\n   git clone https://github.com/armanjscript/Article-Summary-Generator.git\n   cd Article-Summary-Generator\n   ```\n\n3. **Install Python Libraries**:\n   ```bash\n   pip install streamlit langchain langchain-ollama langgraph python-telegram-bot python-dotenv nest_asyncio\n   ```\n\n4. **Set Up Environment Variables**:\n   - Create a `.env` file in the project root with the following:\n     ```\n     SERPER_API_KEY=your_serper_api_key\n     TELEGRAM_BOT_TOKEN=your_telegram_bot_token\n     TELEGRAM_CHANNEL_ID=your_telegram_channel_id\n     ```\n   - Obtain the keys:\n     - **SERPER_API_KEY**: Sign up at [Serper API](https://serper.dev/) to get your API key.\n     - **TELEGRAM_BOT_TOKEN**: Create a bot via [@BotFather](https://t.me/BotFather) on Telegram.\n     - **TELEGRAM_CHANNEL_ID**: Find your channel ID using @RawDataBot by sending `/start` and `/id` in your channel.\n\n## Running the Application\n\n1. Ensure the Ollama server is running in the background:\n   ```bash\n   ollama serve\n   ```\n2. Start the Streamlit app:\n   ```bash\n   streamlit run main.py\n   ```\n3. Open your browser and navigate to `http://localhost:8501` to access the application.\n\n## How It Works\n\nThe application uses LangGraph to orchestrate a workflow with the following steps:\n\n1. **Keyword Suggestion**:\n   - The user’s query is processed by the Ollama model (\"qwen2.5:latest\") to generate up to 3 relevant keywords.\n2. **Article Search**:\n   - The Serper API searches for articles on Wikipedia and Medium using the keywords, selecting up to 3 URLs per source.\n3. **Article Loading**:\n   - LangChain’s WebBaseLoader fetches the content of selected articles, adding metadata like source and title.\n4. **Summarization**:\n   - The Ollama model generates concise summaries (under 350 characters each) for each article, combining them into a final output with the query, keywords, and sources.\n5. **Telegram Posting**:\n   - The summary is sent to the specified Telegram channel via the Telegram Bot API.\n6. **Result Display**:\n   - The Streamlit interface shows the keywords, article URLs, summary, and a confirmation of the Telegram post.\n\n## Example Usage\n\n1. Run the app:\n   ```bash\n   streamlit run main.py\n   ```\n2. In the web interface at `http://localhost:8501`:\n   - Enter a query, e.g., \"Machine learning.\"\n   - Click \"Generate Summary.\"\n3. View the results:\n   - **Keywords**: e.g., \"machine learning, artificial intelligence, deep learning.\"\n   - **Article URLs**: Links to Wikipedia and Medium articles.\n   - **Summary**: A concise summary of the articles.\n4. Check your Telegram channel for the posted summary.\n\n## Dependencies\n\n| Library                | Purpose                                                  |\n|------------------------|----------------------------------------------------------|\n| `streamlit`            | Web interface creation                                   |\n| `langchain`            | Language model framework                                 |\n| `langchain-ollama`     | Ollama integration for summarization                     |\n| `langgraph`            | Workflow management                                      |\n| `python-telegram-bot`  | Telegram API interaction                                 |\n| `python-dotenv`        | Environment variable management                          |\n| `nest_asyncio`         | Asynchronous operation support                           |\n\n## Environment Variables\n\n| Variable               | Description                                                  |\n|------------------------|--------------------------------------------------------------|\n| `SERPER_API_KEY`       | API key for Serper ([Serper API](https://serper.dev/)).      |\n| `TELEGRAM_BOT_TOKEN`   | Telegram bot token from [@BotFather](https://t.me/BotFather).|\n| `TELEGRAM_CHANNEL_ID`  | Channel ID from @RawDataBot.                                 |\n\n## Limitations\n\n- Searches are limited to Wikipedia and Medium, with up to 3 articles per source.\n- Summaries are capped at 350 characters to fit Telegram’s limits.\n- Requires a running Ollama server with the \"qwen2.5:latest\" model.\n- Ensure API keys and Telegram credentials are correctly configured to avoid errors.\n\n## Contributing\n\nContributions are welcome! Fork the repository, make your changes, and submit a pull request. Please ensure your code follows the project’s style and includes appropriate tests.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor questions or feedback, please contact [armanjscript] at [armannew73@gmail.com].\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanjscript%2Farticle-summary-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanjscript%2Farticle-summary-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanjscript%2Farticle-summary-generator/lists"}