mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-04-08 11:24:14 +00:00
enhanced personality
This commit is contained in:
parent
3dedbf8e1d
commit
06f55ce29a
@ -1193,7 +1193,7 @@ class APScript(StateMachine):
|
||||
if callback:
|
||||
callback(info, MSG_TYPE.MSG_TYPE_INFO)
|
||||
|
||||
def json(self, json_infos:dict, callback: Callable[[str, int, dict], bool]=None):
|
||||
def json(self, json_infos:dict, callback: Callable[[str, int, dict], bool]=None, indent=4):
|
||||
"""This sends json data to front end
|
||||
|
||||
Args:
|
||||
@ -1201,7 +1201,7 @@ class APScript(StateMachine):
|
||||
callback (callable, optional): A callable with this signature (str, MSG_TYPE) to send the step to. Defaults to None.
|
||||
"""
|
||||
if callback:
|
||||
callback(json.dumps(json_infos), MSG_TYPE.MSG_TYPE_JSON_INFOS)
|
||||
callback(json.dumps(json_infos, indent=indent), MSG_TYPE.MSG_TYPE_JSON_INFOS)
|
||||
|
||||
def ui(self, html_ui:str, callback: Callable[[str, int, dict], bool]=None):
|
||||
"""This sends ui elements to front end
|
||||
|
Loading…
x
Reference in New Issue
Block a user