An open API service indexing awesome lists of open source software.

https://github.com/darkdk123/news_ai_bot

A Small project for Telegram BOT, providing concise, digestible chunks of news updates from various sources as per desired news topics
https://github.com/darkdk123/news_ai_bot

aiogram-bot function-calling gemini-api google-gemini-ai news-api-org news-bot newsapi python-bot python3 telegram-bot

Last synced: 3 months ago
JSON representation

A Small project for Telegram BOT, providing concise, digestible chunks of news updates from various sources as per desired news topics

Awesome Lists containing this project

README

          

# Telegram - News AI Bot
Bot Profile




[TeleNewsPy🕊️](https://web.telegram.org/k/#@TeleNewsPy_Bot)

[![TeleNewsPy Status](https://cronitor.io/badges/WwEpyi/production/_tkad06ybaR-xchTipqEpYL9_10.svg)](https://news-ai-bot.onrender.com)

![GitHub stars](https://img.shields.io/github/stars/DarkDk123/News_AI_BOT?style=plastic&label=Stars&color=blue&labelColor=grey&logo=github)
[![license](https://img.shields.io/github/license/DarkDk123/News_AI_BOT?color=blue&label=License&style=plastic)](https://github.com/DarkDk123/News_AI_BOT/blob/main/LICENSE)
[![developer](https://img.shields.io/static/v1?label=Author&message=DarkDk123&color=blue&style=plastic)](https://github.com/DarkDk123)

## Description

The **Telegram News AI Bot** is an intelligent bot that fetches and delivers the latest news to users on Telegram.
It leverages [Gemini AI](https://ai.google.dev/gemini-api) to process **NLP queries** and
provide interactive news updates based on user queries (topics & keywords). This project is built using
[AIOgram](https://github.com/aiogram/aiogram), [FastAPI](https://github.com/tiangolo/fastapi) and other python libraries!

It uses [NewsAPI](https://newsapi.org) to fetch recent news data!

### BOT GIFs


     

     

## Features

- Recent news articles
- NLP Prompt with AI
- Quick & Personalized Updates
- Concise, readable chunks of news
- Easy Interface with Telegram

## Usage

There are two ways to use the Telegram News AI Bot:

1. **Live Deployed Bot**:
- Interact with the live bot on Telegram: [TeleNewsPy🕊️](https://web.telegram.org/k/#@TeleNewsPy_Bot)
- Simply start the bot and follow the prompts to receive news updates.

2. **Local Installation**:
- Follow the installation instructions below to set up and run the bot on your local machine.

## Setup

### Prerequisites

- Python 3.8+
- pip (Python package installer)

### Installation

#### 1. Clone the repository:

```sh
git clone https://github.com/DarkDk123/News_AI_BOT.git
cd News_AI_BOT
```

#### 2. Install the required dependencies:

```sh
pip install -r "requirements.txt"
```

#### 3. Set up environment variables:
> Create a `.env` file in the root directory and add the necessary environment variables. Refer to the [`env_example`](https://github.com/DarkDk123/News_AI_BOT/blob/main/env_example) file for guidance.

### Running the Bot

#### 1. Run the `main.py` file from root directory:

```sh
python "TelegramBot/main.py" # Command should be the same!
```

Once the server is running, the bot will deliver articles to the configured Telegram chat.
You can interact with the bot using the Telegram app to make NLP queries and receive
interactive news updates based on your queries.

## Contributing Guidelines

We welcome contributions! Follow these steps:

1. **[Fork](https://github.com/DarkDk123/News_AI_BOT/fork) the repository** and **clone your fork** locally:

```sh
git clone https://github.com/your-username/News_AI_BOT.git
cd News_AI_BOT
```

2. **Set up the project**:

```sh
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
```

3. **Set up pre-commit hooks**:

```sh
pip install pre-commit
pre-commit install # Checks code quality & other formatting.
```

4. **Create a branch**:

```sh
git checkout -b feature-branch
```

5. **Ensure code quality**:

* Format: `ruff format --check .`
* Lint: `ruff check .`

6. **Make your changes**, then commit and push:

```sh
git commit -m "Describe your changes"
git push origin feature-branch
```

7. **Open a pull request** on GitHub.

For any questions or feedback, please open an issue on GitHub or contact the [project maintainers](https://github.com/DarkDk123/News_AI_BOT/contributors).

## License

This project is licensed under the ***GPL 3.0*** License. See the [`LICENSE`](https://github.com/DarkDk123/News_AI_BOT/blob/main/LICENSE) file for more details.