leafduo / chatgpt-telegram-bot

Telegram bot for ChatGPT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hi there..

kingofkillers91 opened this issue · comments

I run the bot with: "GO RUN MAIN.GO" and got this:

panic: Not Found

goroutine 1 [running]:
main.main()
/usr/local/chatgpt-telegram-bot/main.go:42 +0xd66
exit status 2

Go i guess it's installed
──(root㉿kali)-[/usr/local/chatgpt-telegram-bot]
└─# go version
go version go1.20.1 linux/amd64

Can you help?
thanks

Please check if telegram bot API token is set in environment variable TELEGRAM_APITOKEN.

i put this into a .env file into the chatgpt-telegram-bot folder

export OPENAI_API_KEY= sk-nS8xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

export TELEGRAM_APITOKEN= 6233xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

optional, default is empty. Only allow these users to use the bot. Empty means allow all users.

export ALLOWED_TELEGRAM_ID=<your_telegram_id>,<your_friend_telegram_id>

optional, default is 1.0. Higher temperature means more random responses.

See https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature

export MODEL_TEMPERATURE=1.0

optional, default is 900. Max idle duration for a certain conversation.

After this duration, a new conversation will be started.

export CONVERSATION_IDLE_TIMEOUT_SECONDS=900

chatgpt-telegram-bot

Is that correct?

You should run exports in your shell instead of putting them in .env file

Now it's working just fine. I love it!! Please keep updating it. Do you have a discord where you talk and keep your community updated ?

oh, how can i make the bot reply only by running a specific command? I need this if i want it to be in TG group. Thanks

Now it's working just fine. I love it!! Please keep updating it. Do you have a discord where you talk and keep your community updated ?

Thank you! But at this time, maybe you and I are the only users.

oh, how can i make the bot reply only by running a specific command? I need this if i want it to be in TG group. Thanks

Using bot in group is currently not supported.

Oh that's why it crashes.. can you implement it?