upgraded personality

This commit is contained in:
saloui 2023-07-25 16:49:43 +02:00
parent 74d07a0814
commit 7dcb97c151

View File

@ -1083,6 +1083,22 @@ class APScript(StateMachine):
).strip()
return self.bot_says
def execute_command(self, command:dict):
"""Executes a command
Args:
command (dict): command information in form:
name: (command name)
value: (command value)
params: (command parameters)
"""
if command["value"] in self.states_dict[self.current_state_id]["commands"]:
return self.states_dict[self.current_state_id]["commands"][command["value"]](command)
else:
return False
def run_workflow(self, prompt:str, previous_discussion_text:str="", callback=None):
"""
Runs the workflow for processing the model input and output.