Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simatwa/telegram-chatbots
Personal Telegram bot for ChatGPT and Bard
https://github.com/simatwa/telegram-chatbots
bard bard-bot bot bots chatgpt chatgpt-bot telegram-bot
Last synced: 10 days ago
JSON representation
Personal Telegram bot for ChatGPT and Bard
- Host: GitHub
- URL: https://github.com/simatwa/telegram-chatbots
- Owner: Simatwa
- License: mit
- Created: 2023-12-18T08:40:48.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2023-12-22T18:02:22.000Z (11 months ago)
- Last Synced: 2024-10-18T00:53:14.995Z (29 days ago)
- Topics: bard, bard-bot, bot, bots, chatgpt, chatgpt-bot, telegram-bot
- Language: Python
- Homepage:
- Size: 326 KB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
telegram-chatbots
Unofficial Telegram bot for ChatGPT and Bard
## Features
* Intergratin with [Bard](https://bard.google.com)
* Intergration with [ChatGPT](https://chat.openai.com)
* Parse [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts) on the fly.## Pre-requisites
1. [Python](https://python.org)>=3.10 Installed
2. [Telegram Bot token](https://core.telegram.org/bots#botfather)## Installation
Clone and install dependencies
```
git clone https://github.com/Simatwa/telegram-bots
cd telegram-chatbots
pip install -r requirements.txt
```## Usage
It is presumed that you're in possession of [Telegram Bot Token](https://telegram/), if that's not the case then have one from [@BotFather](https://core.telegram.org/bots#botfather).
Since this script depends on [GoogleBard](https://github.com/acheong08/Bard) and [WebChatGPT](https://github.com/Simatwa/WebChatGPT) libraries, purpose to walkthrough their documentations then use that knowledge to find the required information stated in the [env](env) file.
They include :
| Variable | Info |
| ---------- | ------- |
| [bard](https://github.com/acheong08/Bard) | Google's bard session key |
| [openai_cookie_file](https://github.com/Simatwa/WebChatGPT) | Path to openai-cookie-file.json |After filling the [env](env) file, rename it to `.env` and vallah! You're just one step away.
Since this is a **personal** bot, you have to uniquely identify yourself with the bot, so you'll be required to hunt down your **user id**.
So fire up the bot, `python user_id.py` and then on the chat panel, send this command `myId` inorder for the bot to echo back your *Telegram's User ID*. Add the id to the [`.env`](env) file as `users_id=`. If you would like multiple users to access the bot, add their IDs as well separated by commas. i.e `users_id=11223344,55667788`.
Simply run `python main.py` and have some fun.
## Disclaimer
The code in this repository is an unofficial implementation and integration of OpenAI's ChatGPT and Bard models. It is not endorsed or supported by either partys. In addition, this code might not reflect the latest practices or updates from them. It is provided as-is, and there are no guarantees regarding its performance, reliability, or security. Use it at **Your Own Risk**. The developer of this repository disclaim any liability for the usage or consequences of utilizing these scripts.