added support for instring variables and made character IDs
be always stored in lowercase
This commit is contained in:
+7
-5
@@ -2,11 +2,11 @@ import requests
|
||||
import os
|
||||
import time
|
||||
import sys
|
||||
debug = False
|
||||
debug = True
|
||||
try:
|
||||
if sys.argv[1] == "debug": debug = True
|
||||
if sys.argv[1] == "silent": debug = False
|
||||
except:
|
||||
debug = False
|
||||
debug = True
|
||||
|
||||
# Loop and get new api
|
||||
def main():
|
||||
@@ -22,7 +22,9 @@ def main():
|
||||
output(character, response["content"])
|
||||
case "choice":
|
||||
user_choice = choice(response["choices"])
|
||||
time.sleep(0.5)
|
||||
continue
|
||||
case "input":
|
||||
get_input()
|
||||
continue
|
||||
case "end":
|
||||
print("Exitting successfully")
|
||||
@@ -46,7 +48,7 @@ def choice(choices):
|
||||
|
||||
def get_input():
|
||||
api_url = "http://localhost:20264/input"
|
||||
input_string = input()
|
||||
input_string = input("Input: ")
|
||||
requests.post(api_url, json=input_string);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user