Update sweebot.py
All checks were successful
Check syntax / check (push) Successful in 8s

This commit is contained in:
Nova Cat 2024-12-28 20:56:44 -08:00
parent 2a1e568111
commit 8958941758

View file

@ -535,7 +535,6 @@ while True:
try:
aiconnector = cai.connect()
chatquery = f"--Listen Up--\nYour happiness level is {happiness} (Maximum 10), your emotion level will impact the conversation's tone.\n--END Listen Up--\n--IRC recieve--\n<{nick}> " + " ".join(command[1:])
lastquery = chatquery
if channel in ai_storage:
aimsg = aiconnector.send_message(CAImodel, ai_storage[channel], chatquery)
else:
@ -545,6 +544,7 @@ while True:
aimsg = aiconnector.send_message(CAImodel, new.chat_id, chatquery)
ai_storage[channel] = new.chat_id
multiline(aimsg.text, channel)
lastquery = f"<p>Channel: {channel}</p><p>Request:</p><br><br><textarea class=code width=100% spellcheck=\"false\" autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" readonly=\"true\">{chatquery}</textarea><hr><p>Response</p><br><br><textarea class=code width=100% spellcheck=\"false\" autocapitalize=\"off\" autocomplete=\"off\" autocorrect=\"off\" readonly=\"true\">{aimsg.text}</textarea>"
except:
multiline("Something went wrong while connecting to Character.AI.", channel)
print(traceback.format_exc())