Switch editor and topic arguments

This commit is contained in:
Fierelier 2023-10-31 00:00:45 +01:00
parent 19d9d4d9a9
commit d3718bb297
1 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ def convertHumanReadableToList(txt):
lst.append(message)
return lst
userFile = os.path.join(userDir,"conversations",sys.argv[1] + ".txt")
userFile = os.path.join(userDir,"conversations",sys.argv[2] + ".txt")
userFileTmp = userFile + ".tmp"
if not os.path.isfile(userFile):
lst = []
@ -58,7 +58,7 @@ if not os.path.isfile(userFile):
open(userFile,"w",encoding="utf-8").write(convertListToHumanReadable(lst).strip(" \t\r\n") + "\n")
while True:
subprocess.Popen([sys.argv[2],userFile]).wait()
subprocess.Popen([sys.argv[1],userFile]).wait()
lst = convertHumanReadableToList(open(userFile,"r",encoding="utf8").read())
if lst[-1]["role"] != "user" or lst[-1]["content"].strip(" \t\r\n") == "": sys.exit(0)
print("Awaiting response ...")