fix : jsonify problem in server
This commit is contained in:
@@ -41,6 +41,7 @@ class GeneratorLLM():
|
||||
|
||||
def get_status(self) -> dict:
|
||||
with self.state.lock:
|
||||
print("Returning status:\n", self.state.status())
|
||||
return jsonify(self.state.status())
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@@ -121,6 +121,7 @@ class Provider:
|
||||
is_complete = False
|
||||
while not is_complete:
|
||||
response = requests.get(f"http://{self.server_ip}/get_updated_sentence")
|
||||
print("raw:", response.json())
|
||||
thought = response.json()["sentence"]
|
||||
is_complete = bool(response.json()["is_complete"])
|
||||
time.sleep(2)
|
||||
|
||||
Reference in New Issue
Block a user