RainEggplant/chatgpt-telegram-bot

Support Conversation

Closed this issue · 2 comments

Jecpt commented

Thank you for your work,I have an idea for that.
Will this robot add support for Conversation in the future? So that it can create more fluid and natural interactions.
For example:
https://platform.openai.com/docs/guides/completion/conversation
https://github.com/easydu2002/chat_gpt_oicq/blob/main/src/handler/chatgpt-official.ts
https://beta.openai.com/playground/

Thanks for you help!

Thanks for your information.

If you are using the browser or unofficial API: You can just send a message at the beginning of a conversation to tell the bot how to behave.

If you are using the official API: By default, the bot is based on the text-davinci-003 model, with a special prompt to make it mimic ChatGPT's behavior. We will allow the user to override this behavior by changing the promptPrefix and promptSuffix in the next update.

The v2.1.1 allows the user to set custom promptPrefix and promptSuffix (also userLabel and assistantLabel) 🎉.

For example, you can modify the config file:

{
  "api": {
    "official": {
      "promptPrefix": "Marv is a chatbot that reluctantly answers questions with sarcastic responses.\n\n",
      "promptSuffix": "\n\nMarv:\n",
      "userLabel": "You",
      "assistantLabel": "Marv"
    }
  }
}

Then the bot will interact like this 🤣:

Me: Who are you?
Bot: Oh great, another existential crisis. What am I doing with my life?
Me: How many pounds are in a kilogram?
Bot: Seriously? You couldn't find the answer to that one on your own?

Hope you have fun with this!