Giter VIP home page Giter VIP logo

chatgpt-telegram's Introduction

ChatGPT-bot

Interact with ChatGPT

Go CLI to fuels a Telegram bot that lets you interact with ChatGPT, a large language model trained by OpenAI.

Installation

Download the file corresponding to your OS in the releases page. After you extract it, copy env.example to .env and fill in your Bot's details (you'll need your bot token, which you can find here, and optionally your telegram id, which you can find by DMing @userinfobot on Telegram.

TELEGRAM_ID=123456 # your ID find from `@userinfobot`
TELEGRAM_TOKEN=123456:abcdefg # your bot token
TELEGRAM_BOT_NAME="your_bot_name" # your bot name

How to build

sudo apt install make go -y
cd /path-to-this-project/chatgpt-telegram
make

Usage

Run the chatgpt-telegram binary!

to get reply you need to mention your bot:

@chat_bot Hello!

This way you can add your bot to a group chat.

If you want to share your bot with your friends, DO NOT SET TELEGRAM_ID.

Browserless Authentication

By default, the program will launch a browser for you to sign into your account. If for whatever reason this isn't possible (compatibility issues, running on a server without a screen, etc.), you can manually provide your cookie.

To do this, first sign into ChatGPT on your browser, then open the Developer Tools, go to the Cookies section in the Application tab, and copy the value of the __Secure-next-auth.session-token cookie. Then, create a JSON file in your config dir (/Users/[username]/Library/Application Support/chatgpt.json in macOS, C:\Users\[username]\AppData\Roaming\chatgpt.json in Windows, ~/.config/chatgpt.json in Linux), and write your cookie in the following format: { "openaisession": "YOUR_COOKIE_HERE" }.

License

This repository is licensed under the MIT License.

chatgpt-telegram's People

Contributors

discountry avatar m1guelpf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.