Closed churchmice closed 1 year ago
Thank you for using this bot.
Before implementing auto-refresh of the access token, more information about the following questions is needed:
If the answers to these questions are negative, we may have to use acheong08/OpenAIAuth to refresh the token. However, integrating Python scripts into a Node project is not the most elegant solution. It would be ideal to have a Node package that handles this.
Update: I have found some node.js ports of the OpenAIAuth (ericlewis/openai-authenticator, michael-dm/openai-token). And I believe Travis will implement the auto-refresh feature in the upstream API if necessary. So let's wait a little bit 😂.
I see your points. Thank you. I tried to send /reload command after the session expires, and it works.
@churchmice You're welcome. You can actually send messages as usual, instead of sending /reload
(which clears the conversation context)
Looking forward to the this function
how to Obtain admin authority
how to Obtain admin authority
@kintong3000 Add your telegram user id to bot.userIds
in the config file.
how to Obtain admin authority
@kintong3000 Add your telegram user id to
bot.userIds
in the config file.
thanks!
Closed as the access token lasts for a month and gets renewed at each request.
HI, first thanks for the great project. I have set it up and running fine with the 'unofficial' api_type. However, the access token seems will be invalid for roughly every 8 hours. From the linked resource, I find a script to get the access token, as described in https://github.com/acheong08/OpenAIAuth.
I am wondering whether this can be integrated into the bot to make it refresh the token automatically once it is invalid ? My current approach is writing a crontab job to get the token, update the config file and restart the bot, which is not elegant.
Anyhow, thanks for your great work.