Experimental reddit bot that responds to reddit summons with response generated by OpenAI's text completion endpoint.
To use, simply make a comment that mentions the username /u/ask-chat-gpt
. Everything after the mention will be
used for the prompt.
ℹ️ Disclaimers:
- This is not the same as ChatGPT, but once support is available in dependencies I might look to migrate
- The bot may not always be available so replies may be delayed
There are three bots that can be mentioned in total, corresponding to different environments. Here are all three:
/u/ask-chat-gpt
, which targets the latest stable release/u/ask-chat-gpt-stage
, which targets therelease-*
tag for the latest stable release- This will only differ from the first version when a new release is being tested
/u/ask-chat-gpt-dev
, which targets themaster
tag- This can be unstable but will have the latest changes
This is a pretty standard .NET 7 project, and can be built from command line if you have the .NET 7 SDK
installed - dotnet build
.
You can also use Docker, or an IDE like Visual Studio Community.
Setup the reddit bot info and OpenAI token using the SDK's secrets manager tool. Here is a JSON example of the required settings:
{
"Reddit": {
"AppId": "<appId>",
"AppSecret": "<appSecret>",
"RefreshToken": "<refreshToken>"
},
"OpenAIServiceOptions": {
"ApiKey": "<apiKey>"
}
}
When running under docker, the path to a JSON file that contains this config can
be supplied using the DOTNET_CONFIGPATH
environment variable.