This commit is contained in:
parent
2a1e568111
commit
8958941758
1 changed files with 1 additions and 1 deletions
|
@ -535,7 +535,6 @@ while True:
|
||||||
try:
|
try:
|
||||||
aiconnector = cai.connect()
|
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:])
|
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:
|
if channel in ai_storage:
|
||||||
aimsg = aiconnector.send_message(CAImodel, ai_storage[channel], chatquery)
|
aimsg = aiconnector.send_message(CAImodel, ai_storage[channel], chatquery)
|
||||||
else:
|
else:
|
||||||
|
@ -545,6 +544,7 @@ while True:
|
||||||
aimsg = aiconnector.send_message(CAImodel, new.chat_id, chatquery)
|
aimsg = aiconnector.send_message(CAImodel, new.chat_id, chatquery)
|
||||||
ai_storage[channel] = new.chat_id
|
ai_storage[channel] = new.chat_id
|
||||||
multiline(aimsg.text, channel)
|
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:
|
except:
|
||||||
multiline("Something went wrong while connecting to Character.AI.", channel)
|
multiline("Something went wrong while connecting to Character.AI.", channel)
|
||||||
print(traceback.format_exc())
|
print(traceback.format_exc())
|
||||||
|
|
Loading…
Reference in a new issue