/chatgpt-bot

Another python3 chatgpt project. Made with pyrogram library.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

chatgpt-bot

Python Version Issues Forks Stars

Disclaimer

️                       ⚠️ WARNING FOR YOU ️ ️⚠️
   chatgpt is used to help your account activities on Telegram
   We are not responsible for what you misuse in this repository
   !  Be careful when using this repository!
   If one of the members misuses this repository, we are forced to ban you
   Never ever abuse this repository

Deploy to Branch [Heroku]

  1. Go to github, your fork
  2. Delete your fork. If you didn't fork, go to step
  3. Fork repo.
  4. edit 👉 config.py
  5. Go to heroku
  6. Desktop view
  7. Go to deploy tab
  8. Connect your github account
  9. Deploy Main branch.

Deploy to Heroku

Deploy to Heroku

Tutorial Vps

Rendy@Ubuntu~ $ git clone https://github.com/TeamKillerX/chatgpt-bot
Rendy@Ubuntu~ $ cd chatgpt-bot
Rendy@Ubuntu~ $ pip3 install -r requirements.txt
Rendy@Ubuntu~ $ nano config.py
Rendy@Ubuntu~ $ python3 bot.py

Example payload

# chatGPT-3

payload = {
   "model": "text-davinci-003", 
   "prompt": "Hello World", 
   "max_tokens": 200, 
   "temperature": 0, 
   "top_p": 1, 
   "n": 1, 
   "stream": False, 
   "logprobs": None, 
   "stop": None
}

headers = {
   "Content-Type": "application/json", 
   "Authorization": f"Bearer {OPENAI_API}"
}

url = "https://api.openai.com/v1/completions"

response = requests.post(url, json=payload, headers=headers)
data_example = response.json()

message_text = data_example["choices"][0]["text"]

await message.edit_text(message_text) # await or client.send_message(message.chat.id, message_text, reply_to_message_id=message.id)

Library

Contributors

you can pull requests here https://github.com/TeamKillerX/chatgpt-bot/pulls

Credits

https://github.com/TeamKillerX/chatgpt-bot

Donate

Donate