pycoze 0.1.59__py3-none-any.whl → 0.1.60__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pycoze/bot/__init__.py +1 -1
- pycoze/bot/agent/__init__.py +5 -5
- pycoze/bot/bot.py +6 -0
- pycoze/ui/ui_def.py +4 -0
- pycoze/utils/arg.py +3 -2
- {pycoze-0.1.59.dist-info → pycoze-0.1.60.dist-info}/METADATA +1 -1
- {pycoze-0.1.59.dist-info → pycoze-0.1.60.dist-info}/RECORD +10 -10
- {pycoze-0.1.59.dist-info → pycoze-0.1.60.dist-info}/LICENSE +0 -0
- {pycoze-0.1.59.dist-info → pycoze-0.1.60.dist-info}/WHEEL +0 -0
- {pycoze-0.1.59.dist-info → pycoze-0.1.60.dist-info}/top_level.txt +0 -0
pycoze/bot/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
from .bot import chat
|
1
|
+
from .bot import chat, get_chat_response
|
pycoze/bot/agent/__init__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
from .agent import run_agent
|
2
|
-
from .assistant import Runnable
|
3
|
-
from .chat import
|
4
|
-
|
5
|
-
__all__ = [run_agent, Runnable, INPUT_MESSAGE, output]
|
1
|
+
from .agent import run_agent
|
2
|
+
from .assistant import Runnable
|
3
|
+
from .chat import INPUT_MESSAGE, output
|
4
|
+
|
5
|
+
__all__ = [run_agent, Runnable, INPUT_MESSAGE, output]
|
pycoze/bot/bot.py
CHANGED
@@ -73,3 +73,9 @@ def chat(bot_setting_file: str):
|
|
73
73
|
history.append(HumanMessage(message["content"]))
|
74
74
|
result = agent_chat(bot_setting_file, history)
|
75
75
|
history.append(output("assistant", result))
|
76
|
+
|
77
|
+
|
78
|
+
def get_chat_response(bot_setting_file: str, input_text: str):
|
79
|
+
history = [HumanMessage(input_text)]
|
80
|
+
result = agent_chat(bot_setting_file, history)
|
81
|
+
return result
|
pycoze/ui/ui_def.py
CHANGED
@@ -50,6 +50,10 @@ def password(name, default, tip="", hide_if="", style="", cls="") -> str:
|
|
50
50
|
return useDefault(name, default)
|
51
51
|
|
52
52
|
|
53
|
+
def tool(name, default, tools, tip="", hide_if="", style="", cls="") -> str:
|
54
|
+
return eval(useDefault(name, default))
|
55
|
+
|
56
|
+
|
53
57
|
def color(
|
54
58
|
name,
|
55
59
|
default,
|
pycoze/utils/arg.py
CHANGED
@@ -10,8 +10,9 @@ def read_arg(param, is_path=False, posix=True):
|
|
10
10
|
if args[i] == "-" + param or args[i] == "--" + param:
|
11
11
|
value = args[i + 1]
|
12
12
|
break
|
13
|
-
if is_path and value
|
14
|
-
value
|
13
|
+
if is_path and value:
|
14
|
+
if value.startswith('"') and value.endswith('"'):
|
15
|
+
value = value[1:-1]
|
15
16
|
if posix:
|
16
17
|
value = value.replace("\\", "/")
|
17
18
|
|
@@ -2,9 +2,9 @@ pycoze/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
pycoze/module.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
pycoze/access/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
pycoze/access/tool_for_bot.py,sha256=Nv6XlxcqaLaMVQNDkpcthlqaSxyfHoOfWiTScQXO22Y,2656
|
5
|
-
pycoze/bot/__init__.py,sha256=
|
6
|
-
pycoze/bot/bot.py,sha256=
|
7
|
-
pycoze/bot/agent/__init__.py,sha256=
|
5
|
+
pycoze/bot/__init__.py,sha256=6HHMxDQVOyZM9dtSjQm9tjGnhj4h7CixD0JOvEwTi48,41
|
6
|
+
pycoze/bot/bot.py,sha256=jl-1sSgAw59gW4xj1Fyenbr2u1_AOk6WWjEfGQ0r-Ys,2764
|
7
|
+
pycoze/bot/agent/__init__.py,sha256=YR9vpkEQn1e4937r_xFPJXUCPBEJ0SFzEQDBe2x3-YA,157
|
8
8
|
pycoze/bot/agent/agent.py,sha256=7xnz4a8LDyAVU0O3tS6n7_jSnr_lukQxfNR2znCWoV4,4611
|
9
9
|
pycoze/bot/agent/assistant.py,sha256=QLeWaPi415P9jruYOm8qcIbC94cXXAhJYmLTkyC9NTQ,1267
|
10
10
|
pycoze/bot/agent/chat.py,sha256=kc0qgcrBSXdiMy49JwThZTV-0PAvzAhiUvbI5ILiSnU,571
|
@@ -18,12 +18,12 @@ pycoze/ui/__init__.py,sha256=CBBpypz4qDoqJkPmGqR2BroCOEIX4rZiJucRsANPnwo,448
|
|
18
18
|
pycoze/ui/base.py,sha256=nXNXRTZ5Tl1AQp5nfjzLvOVzt_1nLSCn2IOyfxAN_fc,1471
|
19
19
|
pycoze/ui/color.py,sha256=cT9Ib8uNzkOKxyW0IwVj46o4LwdB1xgNCj1_Rou9d_4,854
|
20
20
|
pycoze/ui/typ.py,sha256=NpT0FrbHvByOszBZMFtroRp7I7pN-38tYz_zPOPejF4,1723
|
21
|
-
pycoze/ui/ui_def.py,sha256=
|
21
|
+
pycoze/ui/ui_def.py,sha256=HIi_FuXDYPGh-DsbNLyRG8PHrId91ZgfKzkZtkYgH00,3866
|
22
22
|
pycoze/utils/__init__.py,sha256=KExBkotf23dr2NfTEouWke5nJB1q2IuDXgHrmuyd95k,73
|
23
|
-
pycoze/utils/arg.py,sha256=
|
23
|
+
pycoze/utils/arg.py,sha256=AhOobJNjifCf7dKKPZa7AsN7CcZg3OSECUp9TZIrDTI,748
|
24
24
|
pycoze/utils/text_or_file.py,sha256=gpxZVWt2DW6YiEg_MnMuwg36VNf3TX383QD_1oZNB0Y,551
|
25
|
-
pycoze-0.1.
|
26
|
-
pycoze-0.1.
|
27
|
-
pycoze-0.1.
|
28
|
-
pycoze-0.1.
|
29
|
-
pycoze-0.1.
|
25
|
+
pycoze-0.1.60.dist-info/LICENSE,sha256=QStd_Qsd0-kAam_-sOesCIp_uKrGWeoKwt9M49NVkNU,1090
|
26
|
+
pycoze-0.1.60.dist-info/METADATA,sha256=oybaShHu3kdUedwiYSkGY6dX0tttkbpbYqVkQmOt86s,719
|
27
|
+
pycoze-0.1.60.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
|
28
|
+
pycoze-0.1.60.dist-info/top_level.txt,sha256=76dPeDhKvOCleL3ZC5gl1-y4vdS1tT_U1hxWVAn7sFo,7
|
29
|
+
pycoze-0.1.60.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|