pycoze 0.1.183__py3-none-any.whl → 0.1.186__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycoze/ai/vram_reserve.py +7 -10
- pycoze/reference/bot.py +4 -1
- pycoze/reference/tool.py +4 -1
- {pycoze-0.1.183.dist-info → pycoze-0.1.186.dist-info}/METADATA +1 -1
- {pycoze-0.1.183.dist-info → pycoze-0.1.186.dist-info}/RECORD +8 -8
- {pycoze-0.1.183.dist-info → pycoze-0.1.186.dist-info}/LICENSE +0 -0
- {pycoze-0.1.183.dist-info → pycoze-0.1.186.dist-info}/WHEEL +0 -0
- {pycoze-0.1.183.dist-info → pycoze-0.1.186.dist-info}/top_level.txt +0 -0
pycoze/ai/vram_reserve.py
CHANGED
@@ -5,20 +5,17 @@ import time
|
|
5
5
|
import os
|
6
6
|
import psutil
|
7
7
|
import sys
|
8
|
+
from pycoze.utils import utils
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
if params:
|
15
|
-
DATABASE_PATH = params["appPath"] + "/vram_usage.db"
|
16
|
-
else:
|
17
|
-
raise Exception("No params")
|
18
|
-
except:
|
10
|
+
# 定义数据库连接和初始化
|
11
|
+
params = utils.read_params_file()
|
12
|
+
if params:
|
13
|
+
DATABASE_PATH = params["appPath"] + "/vram_usage.db"
|
14
|
+
else:
|
19
15
|
DATABASE_DIR = os.path.expanduser("~/pycoze")
|
20
16
|
os.makedirs(DATABASE_DIR, exist_ok=True)
|
21
17
|
DATABASE_PATH = os.path.join(DATABASE_DIR, "vram_usage.db")
|
18
|
+
|
22
19
|
TABLE_NAME = "vram_usage"
|
23
20
|
|
24
21
|
|
pycoze/reference/bot.py
CHANGED
@@ -6,12 +6,15 @@ import types
|
|
6
6
|
import langchain_core
|
7
7
|
from .lib import ChangeDirectoryAndPath, ModuleManager, wrapped_func
|
8
8
|
import json
|
9
|
+
from pycoze.utils import utils
|
9
10
|
|
10
11
|
bot_index = 0
|
11
12
|
|
13
|
+
params = utils.read_params_file()
|
14
|
+
|
12
15
|
def ref_bot(bot_id, as_agent_tool=False):
|
13
16
|
global bot_index
|
14
|
-
tool_base_path = "
|
17
|
+
tool_base_path = os.path.join(params["workspacePath"], "bot")
|
15
18
|
module_path = os.path.join(tool_base_path, bot_id)
|
16
19
|
module_path = os.path.normpath(os.path.abspath(module_path))
|
17
20
|
|
pycoze/reference/tool.py
CHANGED
@@ -5,10 +5,13 @@ from langchain.agents import tool as to_agent_tool
|
|
5
5
|
import types
|
6
6
|
import langchain_core
|
7
7
|
from .lib import ChangeDirectoryAndPath, ModuleManager, wrapped_func
|
8
|
+
from pycoze.utils import utils
|
8
9
|
|
9
10
|
|
11
|
+
params = utils.read_params_file()
|
12
|
+
|
10
13
|
def ref_tools(tool_id, as_agent_tool=False):
|
11
|
-
tool_base_path = "
|
14
|
+
tool_base_path = os.path.join(params["workspacePath"], "bot")
|
12
15
|
module_path = os.path.join(tool_base_path, tool_id)
|
13
16
|
module_path = os.path.normpath(os.path.abspath(module_path))
|
14
17
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
pycoze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
pycoze/ai/__init__.py,sha256=odM2lgYSnApxw4AzLV_5AyaxL5_MLfydOSB1VmLGFyA,75
|
3
|
-
pycoze/ai/vram_reserve.py,sha256=
|
3
|
+
pycoze/ai/vram_reserve.py,sha256=jtNsXamhwquyL9_qknZVu-8vQWaPfUdmvjLbDZaZ4vU,4262
|
4
4
|
pycoze/bot/__init__.py,sha256=6HHMxDQVOyZM9dtSjQm9tjGnhj4h7CixD0JOvEwTi48,41
|
5
5
|
pycoze/bot/agent_chat.py,sha256=KshLVuXSnkWsp1J9xKKhoIMvAfQXg5ZyzSkPZdwcRkM,2785
|
6
6
|
pycoze/bot/bot.py,sha256=CCnBmxtmpmz7aLR_MIIiOuKR9IACo5P4uSkQXb5d0KU,3061
|
@@ -12,9 +12,9 @@ pycoze/bot/agent/agent_types/__init__.py,sha256=zmU2Kmrv5mCdfg-QlPn2H6pWxbGeq8s7
|
|
12
12
|
pycoze/bot/agent/agent_types/const.py,sha256=BfUKPrhAHREoMLHuFNG2bCIEkC1-f7K0LEqNg4RwiRE,70
|
13
13
|
pycoze/bot/agent/agent_types/openai_func_call_agent.py,sha256=SnEm5MODHn2uMsaMNqgzULM_91vqLHC0TU6ovwCOqLU,6675
|
14
14
|
pycoze/reference/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
15
|
-
pycoze/reference/bot.py,sha256=
|
15
|
+
pycoze/reference/bot.py,sha256=5Ki8KuYfBfhAryEqw0470yv3jpvQpbjeVTzILeI9FgY,2307
|
16
16
|
pycoze/reference/lib.py,sha256=0xQJTLTHedGzQBsjuTFNBVqYc4-8Yl65gGCrAhWyOX8,2155
|
17
|
-
pycoze/reference/tool.py,sha256=
|
17
|
+
pycoze/reference/tool.py,sha256=btV_Wh-71SLu2FDnPoCPanOCEPxA2lYL2TtdDZr_i4Q,1624
|
18
18
|
pycoze/ui/__init__.py,sha256=7xAfL2lfG7-jllPJEZUJO89xUE9sNzvo1y0WmBswjBI,458
|
19
19
|
pycoze/ui/base.py,sha256=sbBZGMUtlosWHQJpxMULa1bGByeSlcldtE9QXNyiJmM,1093
|
20
20
|
pycoze/ui/color.py,sha256=cT9Ib8uNzkOKxyW0IwVj46o4LwdB1xgNCj1_Rou9d_4,854
|
@@ -24,8 +24,8 @@ pycoze/utils/__init__.py,sha256=Gi5EnrWZGMD2JRejgV4c_VLCXyvA2wwBFI_niDF5MUE,110
|
|
24
24
|
pycoze/utils/arg.py,sha256=GtfGbMTMdaK75Fwh6MpUe1pCA5X6Ep4LFG7a72YrzjI,525
|
25
25
|
pycoze/utils/env.py,sha256=W04lhvTHhAAC6EldP6kk2xrctqtu8K6kl1vDLZDNeh8,561
|
26
26
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
27
|
-
pycoze-0.1.
|
28
|
-
pycoze-0.1.
|
29
|
-
pycoze-0.1.
|
30
|
-
pycoze-0.1.
|
31
|
-
pycoze-0.1.
|
27
|
+
pycoze-0.1.186.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
28
|
+
pycoze-0.1.186.dist-info/METADATA,sha256=MmidGZEymOf5TLbMOOmEaOdGh0CY2wXgdBF3drl9_I4,726
|
29
|
+
pycoze-0.1.186.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
|
30
|
+
pycoze-0.1.186.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
31
|
+
pycoze-0.1.186.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|