Hendrik Langer 2 years ago
parent
commit
6c5a906f3d
  1. 1
      .~lock.model-roleplay-evaluation.ods#
  2. 18
      matrix_pygmalion_bot/ai/model_helpers.py
  3. BIN
      model-roleplay-evaluation.ods

1
.~lock.model-roleplay-evaluation.ods#

@ -0,0 +1 @@
,hendrik,deep-thought,16.04.2023 14:39,file:///home/hendrik/.config/libreoffice/4;

18
matrix_pygmalion_bot/ai/model_helpers.py

@ -45,7 +45,7 @@ async def get_full_prompt(simple_prompt: str, bot, chat_history, model_name: str
elif model_name.startswith("alpaca"): elif model_name.startswith("alpaca"):
ai_name = bot.name # ToDo ai_name = bot.name # ToDo
user_name = bot.user_name # ToDo user_name = bot.user_name # ToDo
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
ai_name = bot.name ai_name = bot.name
user_name = "You" user_name = "You"
else: else:
@ -69,20 +69,20 @@ async def get_full_prompt(simple_prompt: str, bot, chat_history, model_name: str
prompt += f"NSFW content allowed.\n" # ToDo prompt += f"NSFW content allowed.\n" # ToDo
prompt += f"\n" prompt += f"\n"
prompt += "### Input:\n" prompt += "### Input:\n"
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
prompt = "" prompt = ""
else: else:
prompt = "" prompt = ""
# Character description # Character description
if model_name.startswith("pygmalion"): if model_name.startswith("pygmalion"):
prompt = bot.name + "'s Persona: " + bot.get_persona() + "\n" prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n"
elif model_name.startswith("vicuna"): elif model_name.startswith("vicuna"):
prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo
elif model_name.startswith("alpaca"): elif model_name.startswith("alpaca"):
prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
prompt = f"[Character: {bot.get_persona()}]\n" prompt += f"[Character: {bot.get_persona()}]\n"
else: else:
prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo prompt += bot.name + "'s Persona: " + bot.get_persona() + "\n" # ToDo
@ -93,8 +93,8 @@ async def get_full_prompt(simple_prompt: str, bot, chat_history, model_name: str
prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo
elif model_name.startswith("alpaca"): elif model_name.startswith("alpaca"):
prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
prompt = f"[Start Scene: {bot.get_scenario()}]\n\n" prompt += f"[Start Scene: {bot.get_scenario()}]\n\n"
else: else:
prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo prompt += "Scenario: " + bot.get_scenario() + "\n\n" # ToDo
@ -105,7 +105,7 @@ async def get_full_prompt(simple_prompt: str, bot, chat_history, model_name: str
prompt += "### Response:\n" # ToDo prompt += "### Response:\n" # ToDo
elif model_name.startswith("alpaca"): elif model_name.startswith("alpaca"):
prompt += "### Response:\n" prompt += "### Response:\n"
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
pass pass
else: else:
pass pass
@ -125,7 +125,7 @@ async def get_full_prompt(simple_prompt: str, bot, chat_history, model_name: str
pass # ToDo pass # ToDo
elif model_name.startswith("alpaca"): elif model_name.startswith("alpaca"):
pass # ToDo pass # ToDo
elif mode_name.startswith("koboldai"): elif model_name.startswith("koboldai"):
pass pass
else: else:
pass # ToDo pass # ToDo

BIN
model-roleplay-evaluation.ods

Binary file not shown.
Loading…
Cancel
Save