Skip to content

This project is created to link telegram bot to opanAI ChatGPT API.

Notifications You must be signed in to change notification settings

jifanchn/telegram-to-openai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this

This project links a Telegram bot and the OpenAI API together.

Instead of using an online browser-based token, this project uses the OpenAI official RESTful API.

The result is that users will not be annoyed with endless waiting and red alerts, but the downside is that you may be charged for this service by OpenAI.

Prepare

Before start, you must create an OPENAI api token and a telegram bot token.

Build

Use golang to build the project

go mod download
go build .

Deploy on VPS

Copy the binary file to where you want

copy telegram-to-openai /usr/bin/

Copy .service file to systemd folder

copy telegram-to-openai.service /etc/systemd/system/

Change parameters

vi /etc/systemd/system/telegram-to-openai.service

Enable && start service

systemctl daemon-reload
systemctl enable telegram-to-openai --now

Other

You can also write a docker file to run it

About

This project is created to link telegram bot to opanAI ChatGPT API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages