mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-09 03:44:14 +00:00
Merge branch 'main' of https://github.com/ParisNeo/lollms
This commit is contained in:
commit
3758f218e5
@ -1088,6 +1088,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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user