seratch / ChatGPT-in-Slack

Swift demonstration of how to build a Slack app that enables end-users to interact with a ChatGPT bot
MIT License
441 stars 168 forks source link

Update default system prompt to include Slack user ID of bot #14

Closed c-renton closed 1 year ago

c-renton commented 1 year ago

Update the default system prompt and introduce a placeholder that can be replaced with the Slack user ID of the bot when the thread is first created. This can be used to tell the bot who it is on Slack, so it doesn't confuse @ChatGPT initial prompt with @ChatGPT saying initial prompt.

Example 1 with this PR: Initial prompt: Who is @ChatGPT? Example reply: That is my Slack user ID! I am a bot designed to help with various tasks in this Slack chat room.

Example 2 with this PR: Initial prompt: @ChatGPT What is your Slack user ID? Example reply: My Slack user ID is @ChatGPT

Fixes #12.