Add bot prefix modifier option in extensions

This commit is contained in:
oobabooga 2023-01-29 10:11:59 -03:00
parent c1c129196e
commit e5ff4ddfc8
3 changed files with 25 additions and 5 deletions

View file

@ -1,5 +1,6 @@
params = {
"input suffix": " *I say as I make a funny face*",
"bot prefix": " *I speak in a cute way*",
}
def input_modifier(string):
@ -16,3 +17,12 @@ def output_modifier(string):
"""
return string
def bot_prefix_modifier(string):
"""
This function is only applied in chat mode. It modifies
the prefix text for the Bot and can be used to bias its
behavior.
"""
return string + params["bot prefix"]

View file

@ -20,3 +20,12 @@ def output_modifier(string):
"""
return translator.translate(string, src="en", dest=params['language string']).text
def bot_prefix_modifier(string):
"""
This function is only applied in chat mode. It modifies
the prefix text for the Bot and can be used to bias its
behavior.
"""
return string