pycoze 0.1.194__py3-none-any.whl → 0.1.196__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 CHANGED
@@ -5,6 +5,7 @@ import asyncio
5
5
  from pycoze import utils
6
6
  from pycoze.reference.bot import ref_bot
7
7
  from pycoze.reference.tool import ref_tools
8
+ from pycoze.reference.workflow import ref_workflow
8
9
  from langchain_core.utils.function_calling import convert_to_openai_tool
9
10
 
10
11
  cfg = utils.read_json_file("llm.json")
@@ -26,6 +27,10 @@ def load_abilities(bot_setting_file: str):
26
27
  abilities.append(bot)
27
28
  for tool_id in role_setting["tools"]:
28
29
  abilities.extend(ref_tools(tool_id, as_agent_tool=True))
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
 
@@ -47,8 +47,8 @@ def _ref_workflows(workflow_id, as_agent_tool=False, workspace_path=None):
47
47
  return export_tools if as_agent_tool else [tool.func for tool in export_tools]
48
48
 
49
49
 
50
- def ref_workflows(workflow_id, as_agent_tool=False):
51
- 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)
52
52
  if len(tools) > 0:
53
53
  return tools[0]
54
54
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.194
3
+ Version: 0.1.196
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -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=KshLVuXSnkWsp1J9xKKhoIMvAfQXg5ZyzSkPZdwcRkM,2785
8
+ pycoze/bot/agent_chat.py,sha256=hr0jGTd-lvLSe4vCcvaN2rKhB7BMBcVBtI1FpVa6ngs,3016
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
@@ -18,7 +18,7 @@ pycoze/reference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
18
18
  pycoze/reference/bot.py,sha256=BDflTV3zYoZqWnJpD5lMM_1vU_5b20M3XiFt1p-RHWM,2427
19
19
  pycoze/reference/lib.py,sha256=0xQJTLTHedGzQBsjuTFNBVqYc4-8Yl65gGCrAhWyOX8,2155
20
20
  pycoze/reference/tool.py,sha256=9OxHawxjkh6S8eAOlGNrbfhkk5oRlRc7LBpnV6RmhYI,1722
21
- pycoze/reference/workflow.py,sha256=rjjVrwk_Dym3u4bb461tKyETNiXi58DLwSSd5yAB3kg,2017
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.194.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
32
- pycoze-0.1.194.dist-info/METADATA,sha256=9GXgPZYP28cEGIPuSGa55XX2rHrJHue1qjcNwv94nrc,726
33
- pycoze-0.1.194.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
34
- pycoze-0.1.194.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
35
- pycoze-0.1.194.dist-info/RECORD,,
31
+ pycoze-0.1.196.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
32
+ pycoze-0.1.196.dist-info/METADATA,sha256=3rOdsQze_AFFRpZgos633xfHeoWHYoFp6kLrb6LdXTg,726
33
+ pycoze-0.1.196.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
34
+ pycoze-0.1.196.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
35
+ pycoze-0.1.196.dist-info/RECORD,,