zrb 1.14.0__py3-none-any.whl → 1.14.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zrb/builtin/llm/llm_ask.py +1 -0
- zrb/task/llm/config.py +7 -5
- zrb/task/llm/tool_wrapper.py +14 -11
- {zrb-1.14.0.dist-info → zrb-1.14.2.dist-info}/METADATA +1 -1
- {zrb-1.14.0.dist-info → zrb-1.14.2.dist-info}/RECORD +7 -7
- {zrb-1.14.0.dist-info → zrb-1.14.2.dist-info}/WHEEL +0 -0
- {zrb-1.14.0.dist-info → zrb-1.14.2.dist-info}/entry_points.txt +0 -0
zrb/builtin/llm/llm_ask.py
CHANGED
zrb/task/llm/config.py
CHANGED
@@ -8,7 +8,7 @@ from zrb.attr.type import BoolAttr, StrAttr, fstring
|
|
8
8
|
from zrb.config.llm_config import LLMConfig, llm_config
|
9
9
|
from zrb.context.any_context import AnyContext
|
10
10
|
from zrb.context.any_shared_context import AnySharedContext
|
11
|
-
from zrb.util.attr import get_attr
|
11
|
+
from zrb.util.attr import get_attr, get_bool_attr
|
12
12
|
|
13
13
|
|
14
14
|
def get_is_yolo_mode(
|
@@ -16,10 +16,12 @@ def get_is_yolo_mode(
|
|
16
16
|
is_yolo_mode_attr: BoolAttr | None = None,
|
17
17
|
render_yolo_mode: bool = True,
|
18
18
|
):
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
return get_bool_attr(
|
20
|
+
ctx,
|
21
|
+
is_yolo_mode_attr,
|
22
|
+
llm_config.default_yolo_mode,
|
23
|
+
auto_render=render_yolo_mode,
|
24
|
+
)
|
23
25
|
|
24
26
|
|
25
27
|
def get_model_settings(
|
zrb/task/llm/tool_wrapper.py
CHANGED
@@ -140,18 +140,21 @@ async def _ask_for_approval(
|
|
140
140
|
f"✅ >> Allow to run tool: {func_call_str} (Yes | No, <reason>)", plain=True
|
141
141
|
)
|
142
142
|
user_input = await _read_line()
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
ctx.print(
|
148
|
-
stylize_error(f"You must specify rejection reason for {func_call_str}"),
|
149
|
-
plain=True,
|
150
|
-
)
|
151
|
-
continue
|
143
|
+
user_responses = [val.strip() for val in user_input.split(",", maxsplit=2)]
|
144
|
+
while len(user_responses) < 2:
|
145
|
+
user_responses.append("")
|
146
|
+
approval_str, reason = user_responses
|
152
147
|
try:
|
153
|
-
|
154
|
-
|
148
|
+
approved = to_boolean(approval_str)
|
149
|
+
if not approved and reason == "":
|
150
|
+
ctx.print(
|
151
|
+
stylize_error(
|
152
|
+
f"You must specify rejection reason (i.e., No, <why>) for {func_call_str}" # noqa
|
153
|
+
),
|
154
|
+
plain=True,
|
155
|
+
)
|
156
|
+
continue
|
157
|
+
return approved, reason
|
155
158
|
except Exception:
|
156
159
|
ctx.print(
|
157
160
|
stylize_error(
|
@@ -12,7 +12,7 @@ zrb/builtin/jwt.py,sha256=3M5uaQhJZbKQLjTUft1OwPz_JxtmK-xtkjxWjciOQho,2859
|
|
12
12
|
zrb/builtin/llm/chat_session.py,sha256=syMOQzAGcRmxs7ctrBkfvAZ7-IhxnywuxuyeoBMteEs,10464
|
13
13
|
zrb/builtin/llm/history.py,sha256=LDOrL0p7r_AHLa5L8Dp7bHNsOALugmJd7OguXRWGnm4,3087
|
14
14
|
zrb/builtin/llm/input.py,sha256=Nw-26uTWp2QhUgKJcP_IMHmtk-b542CCSQ_vCOjhvhM,877
|
15
|
-
zrb/builtin/llm/llm_ask.py,sha256=
|
15
|
+
zrb/builtin/llm/llm_ask.py,sha256=CNFLKgmLutP3ymAhl-KdVbC-Ahnm1tBEPVinO9o2IrU,5501
|
16
16
|
zrb/builtin/llm/previous-session.js,sha256=xMKZvJoAbrwiyHS0OoPrWuaKxWYLoyR5sguePIoCjTY,816
|
17
17
|
zrb/builtin/llm/tool/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
18
|
zrb/builtin/llm/tool/api.py,sha256=OhmfLc2TwWKQYIMweGelqb5s4JF4nB-YynbSO4yb_Jk,2342
|
@@ -347,7 +347,7 @@ zrb/task/cmd_task.py,sha256=myM8WZm6NrUD-Wv0Vb5sTOrutrAVZLt5LVsSBKwX6SM,10860
|
|
347
347
|
zrb/task/http_check.py,sha256=Gf5rOB2Se2EdizuN9rp65HpGmfZkGc-clIAlHmPVehs,2565
|
348
348
|
zrb/task/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
349
349
|
zrb/task/llm/agent.py,sha256=bdrsmozPxSrUQXhv4FUs_BhIeSppQcVn2dOm40rySW4,7659
|
350
|
-
zrb/task/llm/config.py,sha256=
|
350
|
+
zrb/task/llm/config.py,sha256=UwTsC3YqQPaNfl75T8wMRZWhBjGQce-xaselRqs37Lc,3788
|
351
351
|
zrb/task/llm/conversation_history.py,sha256=B_PDWYL_q66s0xwWBzMSomqPN6u3gkXlIeXBD5A0Apg,4416
|
352
352
|
zrb/task/llm/conversation_history_model.py,sha256=DJ0KDBB0BriQuE5ugC_q0aSHhjNIBcfjUk1f0S_3I9U,9245
|
353
353
|
zrb/task/llm/default_workflow/coding.md,sha256=2uythvPsnBpYfIhiIH1cCinQXX0i0yUqsL474Zpemw0,2484
|
@@ -357,7 +357,7 @@ zrb/task/llm/error.py,sha256=QR-nIohS6pBpC_16cWR-fw7Mevo1sNYAiXMBsh_CJDE,4157
|
|
357
357
|
zrb/task/llm/history_summarization.py,sha256=_0RmzIeJdJA3KvtdTdKnd2Ga7_7x8C1J2PM0oSn-IYw,8000
|
358
358
|
zrb/task/llm/print_node.py,sha256=mwdqsO2IVf5rDz-jdH9HXz6MFGCWrZ4Pv2xbUBtoNgc,4179
|
359
359
|
zrb/task/llm/prompt.py,sha256=pHYuo4cLzuH9VYk2-PAyxng_l1ItXVZl0llZDQcbnWA,9748
|
360
|
-
zrb/task/llm/tool_wrapper.py,sha256=
|
360
|
+
zrb/task/llm/tool_wrapper.py,sha256=FtoYWn0tz9LEzaxYS3_75uSWOspe32GC0gnFn2zlLUI,8153
|
361
361
|
zrb/task/llm/typing.py,sha256=c8VAuPBw_4A3DxfYdydkgedaP-LU61W9_wj3m3CAX1E,58
|
362
362
|
zrb/task/llm_task.py,sha256=88yc0SbU2ocWK6VBGoqBy-Lo49ebBTI_KKjsLxDp3sM,13945
|
363
363
|
zrb/task/make_task.py,sha256=PD3b_aYazthS8LHeJsLAhwKDEgdurQZpymJDKeN60u0,2265
|
@@ -406,7 +406,7 @@ zrb/util/todo.py,sha256=r9_KYF2-hLKMNjsp6AFK9zivykMrywd-kJ4bCwfdafI,19323
|
|
406
406
|
zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
|
407
407
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
408
408
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
409
|
-
zrb-1.14.
|
410
|
-
zrb-1.14.
|
411
|
-
zrb-1.14.
|
412
|
-
zrb-1.14.
|
409
|
+
zrb-1.14.2.dist-info/METADATA,sha256=Xc8xnQ69oEi7Xn3LKMnmkz17Pig9QmYSDhIvabsFIB8,9777
|
410
|
+
zrb-1.14.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
411
|
+
zrb-1.14.2.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
412
|
+
zrb-1.14.2.dist-info/RECORD,,
|
File without changes
|
File without changes
|