Browse Source

more f's

master
Hendrik Langer 2 years ago
parent
commit
a985bffad0
  1. 4
      matrix_pygmalion_bot/ai/koboldcpp.py
  2. 4
      matrix_pygmalion_bot/ai/runpod_pygmalion.py
  3. 2
      matrix_pygmalion_bot/core.py

4
matrix_pygmalion_bot/ai/koboldcpp.py

@ -82,8 +82,8 @@ async def generate_sync(
complete_reply = complete_reply.removesuffix('<|endoftext|>').strip() complete_reply = complete_reply.removesuffix('<|endoftext|>').strip()
complete_reply = complete_reply.replace(f"\n{bot.name}: ", " ") complete_reply = complete_reply.replace(f"\n{bot.name}: ", " ")
complete_reply = complete_reply.replace(f"\n<BOT>: ", " ") complete_reply = complete_reply.replace(f"\n<BOT>: ", " ")
complete_reply = complete_reply.replace(f"<BOT>", "{bot.name}") complete_reply = complete_reply.replace(f"<BOT>", f"{bot.name}")
complete_reply = complete_reply.replace(f"<USER>", "You") complete_reply = complete_reply.replace(f"<USER>", f"You")
return complete_reply.strip() return complete_reply.strip()
else: else:
continue continue

4
matrix_pygmalion_bot/ai/runpod_pygmalion.py

@ -89,8 +89,8 @@ async def generate_sync(
reply = answer.removesuffix('<|endoftext|>').strip() reply = answer.removesuffix('<|endoftext|>').strip()
reply = reply.replace(f"\n{bot.name}: ", " ") reply = reply.replace(f"\n{bot.name}: ", " ")
reply = reply.replace(f"\n<BOT>: ", " ") reply = reply.replace(f"\n<BOT>: ", " ")
reply = reply.replace(f"<BOT>", "{bot.name}") reply = reply.replace(f"<BOT>", f"{bot.name}")
reply = reply.replace(f"<USER>", "You") reply = reply.replace(f"<USER>", f"You")
return reply return reply
else: else:
err_msg = r_json["error"] if "error" in r_json else "" err_msg = r_json["error"] if "error" in r_json else ""

2
matrix_pygmalion_bot/core.py

@ -286,7 +286,7 @@ class ChatBot(object):
self.persona = None self.persona = None
self.scenario = None self.scenario = None
self.greeting = None self.greeting = None
self.temperature = 0.80 self.temperature = 0.90
self.events = [] self.events = []
self.global_tick = 0 self.global_tick = 0
self.chat_history = None self.chat_history = None

Loading…
Cancel
Save