pycoze 0.1.193__py3-none-any.whl → 0.1.195__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycoze/bot/agent_chat.py +5 -0
- pycoze/reference/bot.py +4 -2
- pycoze/reference/tool.py +4 -2
- pycoze/reference/workflow.py +6 -4
- {pycoze-0.1.193.dist-info → pycoze-0.1.195.dist-info}/METADATA +1 -1
- {pycoze-0.1.193.dist-info → pycoze-0.1.195.dist-info}/RECORD +9 -9
- {pycoze-0.1.193.dist-info → pycoze-0.1.195.dist-info}/LICENSE +0 -0
- {pycoze-0.1.193.dist-info → pycoze-0.1.195.dist-info}/WHEEL +0 -0
- {pycoze-0.1.193.dist-info → pycoze-0.1.195.dist-info}/top_level.txt +0 -0
pycoze/bot/agent_chat.py
CHANGED
@@ -26,6 +26,11 @@ def load_abilities(bot_setting_file: str):
|
|
26
26
|
abilities.append(bot)
|
27
27
|
for tool_id in role_setting["tools"]:
|
28
28
|
abilities.extend(ref_tools(tool_id, as_agent_tool=True))
|
29
|
+
|
30
|
+
for workflow_id in role_setting["workflows"]:
|
31
|
+
workflow = ref_workflow(workflow_id, as_agent_tool=True)
|
32
|
+
if workflow:
|
33
|
+
abilities.append(workflow)
|
29
34
|
return abilities
|
30
35
|
|
31
36
|
|
pycoze/reference/bot.py
CHANGED
@@ -12,9 +12,11 @@ bot_index = 0
|
|
12
12
|
|
13
13
|
params = utils.read_params_file()
|
14
14
|
|
15
|
-
def ref_bot(bot_id, as_agent_tool=False):
|
15
|
+
def ref_bot(bot_id, as_agent_tool=False, workspace_path=None):
|
16
16
|
global bot_index
|
17
|
-
|
17
|
+
if workspace_path is None:
|
18
|
+
workspace_path = params["workspacePath"]
|
19
|
+
tool_base_path = os.path.join(workspace_path, "User/Local/bot")
|
18
20
|
module_path = os.path.join(tool_base_path, bot_id)
|
19
21
|
module_path = os.path.normpath(os.path.abspath(module_path))
|
20
22
|
|
pycoze/reference/tool.py
CHANGED
@@ -10,8 +10,10 @@ from pycoze import utils
|
|
10
10
|
|
11
11
|
params = utils.read_params_file()
|
12
12
|
|
13
|
-
def ref_tools(tool_id, as_agent_tool=False):
|
14
|
-
|
13
|
+
def ref_tools(tool_id, as_agent_tool=False, workspace_path=None):
|
14
|
+
if workspace_path is None:
|
15
|
+
workspace_path = params["workspacePath"]
|
16
|
+
tool_base_path = os.path.join(workspace_path, "User/Local/tool")
|
15
17
|
module_path = os.path.join(tool_base_path, tool_id)
|
16
18
|
module_path = os.path.normpath(os.path.abspath(module_path))
|
17
19
|
|
pycoze/reference/workflow.py
CHANGED
@@ -10,8 +10,10 @@ from pycoze import utils
|
|
10
10
|
|
11
11
|
params = utils.read_params_file()
|
12
12
|
|
13
|
-
def _ref_workflows(workflow_id, as_agent_tool=False):
|
14
|
-
|
13
|
+
def _ref_workflows(workflow_id, as_agent_tool=False, workspace_path=None):
|
14
|
+
if workspace_path is None:
|
15
|
+
workspace_path = params["workspacePath"]
|
16
|
+
tool_base_path = os.path.join(workspace_path, "User/Local/workflow")
|
15
17
|
module_path = os.path.join(tool_base_path, workflow_id)
|
16
18
|
module_path = os.path.normpath(os.path.abspath(module_path))
|
17
19
|
|
@@ -45,8 +47,8 @@ def _ref_workflows(workflow_id, as_agent_tool=False):
|
|
45
47
|
return export_tools if as_agent_tool else [tool.func for tool in export_tools]
|
46
48
|
|
47
49
|
|
48
|
-
def
|
49
|
-
tools = _ref_workflows(workflow_id, as_agent_tool=as_agent_tool)
|
50
|
+
def ref_workflow(workflow_id, as_agent_tool=False, workspace_path=None):
|
51
|
+
tools = _ref_workflows(workflow_id, as_agent_tool=as_agent_tool, workspace_path=workspace_path)
|
50
52
|
if len(tools) > 0:
|
51
53
|
return tools[0]
|
52
54
|
else:
|
@@ -5,7 +5,7 @@ pycoze/automation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
5
5
|
pycoze/automation/browser/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
pycoze/automation/browser/edge_driver_manager.py,sha256=tJEGXab1XTk2LPjhpQ6NfAbRCdrsuyCDexMvYxZPUEM,3022
|
7
7
|
pycoze/bot/__init__.py,sha256=6HHMxDQVOyZM9dtSjQm9tjGnhj4h7CixD0JOvEwTi48,41
|
8
|
-
pycoze/bot/agent_chat.py,sha256=
|
8
|
+
pycoze/bot/agent_chat.py,sha256=yHjocg_4lukpH-k707T_gJTZLPOciCRQtOGoaiyOaUw,2970
|
9
9
|
pycoze/bot/bot.py,sha256=CCnBmxtmpmz7aLR_MIIiOuKR9IACo5P4uSkQXb5d0KU,3061
|
10
10
|
pycoze/bot/agent/__init__.py,sha256=3wE8_FFQS8j2BY-g9Cr-onV0POEvDRZaw_NCzpqrNus,265
|
11
11
|
pycoze/bot/agent/agent.py,sha256=7dyAsHSVnBmFUK9GR_BumkjSgrvQA0KLj0e3aDN_JU4,3592
|
@@ -15,10 +15,10 @@ pycoze/bot/agent/agent_types/__init__.py,sha256=zmU2Kmrv5mCdfg-QlPn2H6pWxbGeq8s7
|
|
15
15
|
pycoze/bot/agent/agent_types/const.py,sha256=BfUKPrhAHREoMLHuFNG2bCIEkC1-f7K0LEqNg4RwiRE,70
|
16
16
|
pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=SnEm5MODHn2uMsaMNqgzULM_91vqLHC0TU6ovwCOqLU,6675
|
17
17
|
pycoze/reference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
-
pycoze/reference/bot.py,sha256=
|
18
|
+
pycoze/reference/bot.py,sha256=BDflTV3zYoZqWnJpD5lMM_1vU_5b20M3XiFt1p-RHWM,2427
|
19
19
|
pycoze/reference/lib.py,sha256=0xQJTLTHedGzQBsjuTFNBVqYc4-8Yl65gGCrAhWyOX8,2155
|
20
|
-
pycoze/reference/tool.py,sha256=
|
21
|
-
pycoze/reference/workflow.py,sha256=
|
20
|
+
pycoze/reference/tool.py,sha256=9OxHawxjkh6S8eAOlGNrbfhkk5oRlRc7LBpnV6RmhYI,1722
|
21
|
+
pycoze/reference/workflow.py,sha256=xIxv4EAeIR663bRfXkLhgBC0OhfMs5RdfvdORI80CoQ,2068
|
22
22
|
pycoze/ui/__init__.py,sha256=7xAfL2lfG7-jllPJEZUJO89xUE9sNzvo1y0WmBswjBI,458
|
23
23
|
pycoze/ui/base.py,sha256=sbBZGMUtlosWHQJpxMULa1bGByeSlcldtE9QXNyiJmM,1093
|
24
24
|
pycoze/ui/color.py,sha256=cT9Ib8uNzkOKxyW0IwVj46o4LwdB1xgNCj1_Rou9d_4,854
|
@@ -28,8 +28,8 @@ pycoze/utils/__init__.py,sha256=Gi5EnrWZGMD2JRejgV4c_VLCXyvA2wwBFI_niDF5MUE,110
|
|
28
28
|
pycoze/utils/arg.py,sha256=GtfGbMTMdaK75Fwh6MpUe1pCA5X6Ep4LFG7a72YrzjI,525
|
29
29
|
pycoze/utils/env.py,sha256=W04lhvTHhAAC6EldP6kk2xrctqtu8K6kl1vDLZDNeh8,561
|
30
30
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
31
|
-
pycoze-0.1.
|
32
|
-
pycoze-0.1.
|
33
|
-
pycoze-0.1.
|
34
|
-
pycoze-0.1.
|
35
|
-
pycoze-0.1.
|
31
|
+
pycoze-0.1.195.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
32
|
+
pycoze-0.1.195.dist-info/METADATA,sha256=xuZA0T9B3ZvcjvxfMRcs1fu-thz_gSvxxyoDJfSlmpA,726
|
33
|
+
pycoze-0.1.195.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
34
|
+
pycoze-0.1.195.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
35
|
+
pycoze-0.1.195.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|