chrisrude / oobabot-plugin

A Discord bot plugin to text-generation-webui, based on oobabot.
https://github.com/chrisrude/oobabot
MIT License
41 stars 11 forks source link

Altering default prompt #9

Open Wrexthor opened 1 year ago

Wrexthor commented 1 year ago

First i just wanted to say that this is incredibly easy to use and all around awesome as a plugin!

I checked under the advanced settings and the template/prompt and am a bit confused regarding what parts should/should not be copied over if i want to override the prompt. If i simply copy everything (removing commenting) in default and replace the first lines it refuses to save, would be great with some documentation on how to do it :)

chrisrude commented 1 year ago

Thanks for the feedback, and glad you love it! Super great to hear it.

Customizing the yaml in that way is not at all obvious, but here's how you do it:

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# template
# .
template:

  # The main prompt sent to Oobabooga to generate a response from the bot AI.  The AI's
  # reply to this prompt will be sent to discord as the bot's response.
  # .
  # Allowed tokens: {AI_NAME}, {IMAGE_COMING}, {MESSAGE_HISTORY}, {PERSONA}
  # .
  #   default:  You are in a chat room with multiple participants. Below is a transcript of
  # recent messages in the conversation. Write the next one to three messages that you would
  # send in this conversation, from the point of view of the participant named {AI_NAME}.
  # {PERSONA}  All responses you write must be from the point of view of {AI_NAME}. ###
  # Transcript: {MESSAGE_HISTORY} {IMAGE_COMING}
  prompt: |
    You are in a chat room with multiple participants. Below is a transcript of
    recent messages in the conversation. Write the next one to three messages that you would
    send in this conversation, from the point of view of the participant named {AI_NAME}.
    {PERSONA}  All responses you write must be from the point of view of {AI_NAME}. ###
    Transcript: {MESSAGE_HISTORY} {IMAGE_COMING}

I think I'll put in an example of this into the FAQ / default .yml so that it will be easier for newer folks to figure out in the future!