Closed Christolito closed 1 year ago
Hey @Christolito, you can customize the system prompt with SYSTEM_TEXT env variable. Can you explore a reasonable one for your use case? Refer to https://github.com/seratch/ChatGPT-in-Slack#running-the-app-on-your-local-machine for more details.
From my experience, whether the bot includes mentions depends on how a human asks a question. So, adjusting the system text plus how your end-users ask questions may change the behavior.
Thx. It's just that it seems to use it's own Slack ID / pings it self, in its reply - instead of the user asking the question... Is this because of the prepended part of the prompt, that it gets confused?
Hmm, I’ve never observed the behavior with my app
I have seen this too, and it is caused by the prompt Each message has the author id prepended, like this: "<@U1234> message text"
, since the Slack messages don't seem to have the user IDs prepended in the message text as the prompt would suggest.
When you start a new thread with @ChatGPT initial prompt
, it is interpreted as if @ChatGPT
said initial prompt
.
As a workaround, you can change this part of the prompt to Slack user IDs match the regex `<@U.*?>`.
so that it knows what the tags are that appear in messages, but it still doesn't know who sent each message.
A better fix might actually be to prepend the messages sent to OpenAI with the user ID that sent them, but then we need to ensure that the prompt tells the bot what its own user ID is, and that it shouldn't include it in its own replies.
So, this might be down to the prompt. But im not shure. The bot keeps referencing itself with @, in its reply. Could i change something here, so that it references the user instead? I added the "prepend part" in the prompt, is i because of that? (See included screen shot of my bot - and system prompt)
System message;