Synced from GitLab - Deploy your own Serverless Discord bot integration to quickly interface with OpenAI's ChatGPT Completion API (gpt-3.5-turbo / gpt-4)
Hey @jarylc, I gave this a try and it looks good, thank you!
I might be creating a pull request regarding this issue, and a few other things on my mind. For now, here's the issue.
The kv_namespaces in wrangler.toml needs to be set up. https://github.com/jarylc/cf-workers-chatgpt-discord-bot/blob/66d1205c25bdeb9c1b8bda5ea60cc66292010d9a/wrangler.toml#LL7C62-L7C62
I ran npx wrangler kv:namespace create CHATGPT_DISCORD_BOT_KV in order to create a new namespace and pasted that ID in my wrangler.toml. This should be a step in 'Getting Started'.
Sending a system message is an easy way of customizing the chatbot. With the help of it, a developer can customize the behavior of the endpoint. Example: You're a class mentor chatbot developed by @jarylc. Only respond to math questions., etc.
When adding the INTERACTIONS ENDPOINT URL for the discord application
I always got the notofication the URL could not be verified and the changes not be saved. When I checked the code I saw, that entries in DISCORD_USERID_WHITELIST prevent Discord's check requests from going through.
It would be good to at least mention in the readme, that the whitelist must be empty and can be set after registering the URL.