pycoze 0.1.63__tar.gz → 0.1.64__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. {pycoze-0.1.63 → pycoze-0.1.64}/PKG-INFO +1 -1
  2. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/ui/base.py +10 -9
  3. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze.egg-info/PKG-INFO +1 -1
  4. {pycoze-0.1.63 → pycoze-0.1.64}/setup.py +1 -1
  5. {pycoze-0.1.63 → pycoze-0.1.64}/LICENSE +0 -0
  6. {pycoze-0.1.63 → pycoze-0.1.64}/README.md +0 -0
  7. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/__init__.py +0 -0
  8. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/access/__init__.py +0 -0
  9. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/access/tool_for_bot.py +0 -0
  10. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/__init__.py +0 -0
  11. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/__init__.py +0 -0
  12. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/agent.py +0 -0
  13. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/agent_types/__init__.py +0 -0
  14. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/agent_types/openai_func_call_agent.py +0 -0
  15. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/agent_types/react_agent.py +0 -0
  16. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/agent_types/react_prompt.py +0 -0
  17. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/assistant.py +0 -0
  18. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/agent/chat.py +0 -0
  19. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/bot/bot.py +0 -0
  20. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/gpu/__init__.py +0 -0
  21. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/gpu/gpu_reserve.py +0 -0
  22. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/module.py +0 -0
  23. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/ui/__init__.py +0 -0
  24. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/ui/color.py +0 -0
  25. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/ui/typ.py +0 -0
  26. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/ui/ui_def.py +0 -0
  27. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/utils/__init__.py +0 -0
  28. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/utils/arg.py +0 -0
  29. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze/utils/text_or_file.py +0 -0
  30. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze.egg-info/SOURCES.txt +0 -0
  31. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze.egg-info/dependency_links.txt +0 -0
  32. {pycoze-0.1.63 → pycoze-0.1.64}/pycoze.egg-info/top_level.txt +0 -0
  33. {pycoze-0.1.63 → pycoze-0.1.64}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.63
3
+ Version: 0.1.64
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -4,23 +4,24 @@ import json
4
4
  import inspect
5
5
 
6
6
 
7
- params_file = utils.read_arg('params_file', True)
7
+ params_file = utils.read_arg("params_file", True)
8
8
  params = None
9
9
  try:
10
- with open(params_file, 'r', encoding='utf-8') as f:
10
+ with open(params_file, "r", encoding="utf-8") as f:
11
11
  params = json.load(f)
12
12
  except Exception as e:
13
13
  print(e)
14
14
 
15
+
15
16
  def get_ui():
16
17
  if params is None:
17
18
  return {}
18
19
  stack = inspect.stack()
19
- stack_files = list(reversed([s.filename.replace('\\', '/') for s in stack]))
20
+ stack_files = list(reversed([s.filename.replace("\\", "/") for s in stack]))
20
21
  match_item = None
21
22
  for f in stack_files:
22
- for v in params["uiData"]:
23
- if v["uiFile"] == f:
23
+ for v in params["uiData"]["uiFiles"]:
24
+ if v == f:
24
25
  match_item = v
25
26
  break
26
27
  if match_item:
@@ -33,15 +34,15 @@ def get_ui():
33
34
 
34
35
  for i in range(10):
35
36
  try:
36
- if by == 'file':
37
+ if by == "file":
37
38
  json_file = match_item["Jsonfile"]
38
- with open(json_file, "r", encoding='utf-8') as f:
39
+ with open(json_file, "r", encoding="utf-8") as f:
39
40
  return json.load(f)
40
41
  else:
41
- assert by == 'node'
42
+ assert by == "node"
42
43
  workflow_file = match_item["workflowFile"]
43
44
  node_id = match_item["nodeId"]
44
- with open(workflow_file, "r", encoding='utf-8') as f:
45
+ with open(workflow_file, "r", encoding="utf-8") as f:
45
46
  cells = json.load(f)["graph"]["cells"]
46
47
  node = [cell for cell in cells if cell["id"] == node_id][0]
47
48
  return json.loads(node["data"]["ui"])
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pycoze
3
- Version: 0.1.63
3
+ Version: 0.1.64
4
4
  Summary: Package for pycoze only!
5
5
  Author: Yuan Jie Xiong
6
6
  Author-email: aiqqqqqqq@qq.com
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="pycoze",
5
- version="0.1.63",
5
+ version="0.1.64",
6
6
  packages=find_packages(),
7
7
  install_requires=[],
8
8
  author="Yuan Jie Xiong",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes