zrb 1.15.19__py3-none-any.whl → 1.15.20__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
CHANGED
@@ -32,6 +32,26 @@ from zrb.task.base_trigger import BaseTrigger
|
|
32
32
|
from zrb.task.llm_task import LLMTask
|
33
33
|
from zrb.util.string.conversion import to_boolean
|
34
34
|
|
35
|
+
|
36
|
+
def _get_default_yolo_mode(ctx: AnyContext) -> str:
|
37
|
+
default_value = llm_config.default_yolo_mode
|
38
|
+
if isinstance(default_value, list):
|
39
|
+
return ",".join(default_value)
|
40
|
+
return f"{default_value}"
|
41
|
+
|
42
|
+
|
43
|
+
def _render_yolo_mode_input(ctx: AnyContext) -> list[str] | bool | None:
|
44
|
+
if ctx.input.yolo.strip() == "":
|
45
|
+
return None
|
46
|
+
elements = ctx.input.yolo.split(",")
|
47
|
+
if len(elements) == 0:
|
48
|
+
try:
|
49
|
+
return to_boolean(elements[0])
|
50
|
+
except Exception:
|
51
|
+
pass
|
52
|
+
return elements
|
53
|
+
|
54
|
+
|
35
55
|
_llm_ask_inputs = [
|
36
56
|
StrInput(
|
37
57
|
"model",
|
@@ -88,7 +108,7 @@ _llm_ask_inputs = [
|
|
88
108
|
"yolo",
|
89
109
|
description="YOLO mode (LLM Agent will start in YOLO Mode)",
|
90
110
|
prompt="YOLO mode (LLM Agent will start in YOLO Mode)",
|
91
|
-
default=
|
111
|
+
default=_get_default_yolo_mode,
|
92
112
|
allow_positional_parsing=False,
|
93
113
|
always_prompt=False,
|
94
114
|
),
|
@@ -103,19 +123,6 @@ _llm_ask_inputs = [
|
|
103
123
|
),
|
104
124
|
]
|
105
125
|
|
106
|
-
|
107
|
-
def _render_yolo_mode_input(ctx: AnyContext) -> list[str] | bool | None:
|
108
|
-
if ctx.input.yolo.strip() == "":
|
109
|
-
return None
|
110
|
-
elements = ctx.input.yolo.split(",")
|
111
|
-
if len(elements) == 0:
|
112
|
-
try:
|
113
|
-
return to_boolean(elements[0])
|
114
|
-
except Exception:
|
115
|
-
pass
|
116
|
-
return elements
|
117
|
-
|
118
|
-
|
119
126
|
llm_ask: LLMTask = llm_group.add_task(
|
120
127
|
LLMTask(
|
121
128
|
name="llm-ask",
|
@@ -12,7 +12,7 @@ zrb/builtin/jwt.py,sha256=3M5uaQhJZbKQLjTUft1OwPz_JxtmK-xtkjxWjciOQho,2859
|
|
12
12
|
zrb/builtin/llm/chat_session.py,sha256=p0giSVYuQMQ5H1hbQzl7cMb49XZqWG0SF7X-ixB5EBU,10203
|
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=XtnSZoBvwHqnBUi8R0rt8VDfnBmWgwFlDuuo1WA1W_w,6209
|
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=vMEiZhhTZ3o2jRBxWcJ62b0M85wd_w4W0X4Hx23NXto,2380
|
@@ -409,7 +409,7 @@ zrb/util/todo_model.py,sha256=hhzAX-uFl5rsg7iVX1ULlJOfBtblwQ_ieNUxBWfc-Os,1670
|
|
409
409
|
zrb/util/truncate.py,sha256=eSzmjBpc1Qod3lM3M73snNbDOcARHukW_tq36dWdPvc,921
|
410
410
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
411
411
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
412
|
-
zrb-1.15.
|
413
|
-
zrb-1.15.
|
414
|
-
zrb-1.15.
|
415
|
-
zrb-1.15.
|
412
|
+
zrb-1.15.20.dist-info/METADATA,sha256=xEpmCD_LUxH-rR-OqQcBtkOQHbvYhkEsw2fu12gfUtI,9892
|
413
|
+
zrb-1.15.20.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
414
|
+
zrb-1.15.20.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
415
|
+
zrb-1.15.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|