Switch editor and topic arguments
This commit is contained in:
parent
19d9d4d9a9
commit
d3718bb297
|
@ -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 ...")
|
||||
|
|
Loading…
Reference in New Issue