zrb 1.15.3__py3-none-any.whl → 2.0.0a4__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.
Potentially problematic release.
This version of zrb might be problematic. Click here for more details.
- zrb/__init__.py +118 -133
- zrb/attr/type.py +10 -7
- zrb/builtin/__init__.py +55 -1
- zrb/builtin/git.py +12 -1
- zrb/builtin/group.py +31 -15
- zrb/builtin/llm/chat.py +147 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/entity/add_entity_util.py +7 -7
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/add_module_util.py +5 -5
- zrb/builtin/project/add/fastapp/fastapp_util.py +1 -1
- zrb/builtin/searxng/config/settings.yml +5671 -0
- zrb/builtin/searxng/start.py +21 -0
- zrb/builtin/shell/autocomplete/bash.py +4 -3
- zrb/builtin/shell/autocomplete/zsh.py +4 -3
- zrb/callback/callback.py +8 -1
- zrb/cmd/cmd_result.py +2 -1
- zrb/config/config.py +555 -169
- zrb/config/helper.py +84 -0
- zrb/config/web_auth_config.py +50 -35
- zrb/context/any_shared_context.py +20 -3
- zrb/context/context.py +39 -5
- zrb/context/print_fn.py +13 -0
- zrb/context/shared_context.py +17 -8
- zrb/group/any_group.py +3 -3
- zrb/group/group.py +3 -3
- zrb/input/any_input.py +5 -1
- zrb/input/base_input.py +18 -6
- zrb/input/option_input.py +41 -1
- zrb/input/text_input.py +7 -24
- zrb/llm/agent/__init__.py +9 -0
- zrb/llm/agent/agent.py +215 -0
- zrb/llm/agent/summarizer.py +20 -0
- zrb/llm/app/__init__.py +10 -0
- zrb/llm/app/completion.py +281 -0
- zrb/llm/app/confirmation/allow_tool.py +66 -0
- zrb/llm/app/confirmation/handler.py +178 -0
- zrb/llm/app/confirmation/replace_confirmation.py +77 -0
- zrb/llm/app/keybinding.py +34 -0
- zrb/llm/app/layout.py +117 -0
- zrb/llm/app/lexer.py +155 -0
- zrb/llm/app/redirection.py +28 -0
- zrb/llm/app/style.py +16 -0
- zrb/llm/app/ui.py +733 -0
- zrb/llm/config/__init__.py +4 -0
- zrb/llm/config/config.py +122 -0
- zrb/llm/config/limiter.py +247 -0
- zrb/llm/history_manager/__init__.py +4 -0
- zrb/llm/history_manager/any_history_manager.py +23 -0
- zrb/llm/history_manager/file_history_manager.py +91 -0
- zrb/llm/history_processor/summarizer.py +108 -0
- zrb/llm/note/__init__.py +3 -0
- zrb/llm/note/manager.py +122 -0
- zrb/llm/prompt/__init__.py +29 -0
- zrb/llm/prompt/claude_compatibility.py +92 -0
- zrb/llm/prompt/compose.py +55 -0
- zrb/llm/prompt/default.py +51 -0
- zrb/llm/prompt/markdown/file_extractor.md +112 -0
- zrb/llm/prompt/markdown/mandate.md +23 -0
- zrb/llm/prompt/markdown/persona.md +3 -0
- zrb/llm/prompt/markdown/repo_extractor.md +112 -0
- zrb/llm/prompt/markdown/repo_summarizer.md +29 -0
- zrb/llm/prompt/markdown/summarizer.md +21 -0
- zrb/llm/prompt/note.py +41 -0
- zrb/llm/prompt/system_context.py +46 -0
- zrb/llm/prompt/zrb.py +41 -0
- zrb/llm/skill/__init__.py +3 -0
- zrb/llm/skill/manager.py +86 -0
- zrb/llm/task/__init__.py +4 -0
- zrb/llm/task/llm_chat_task.py +316 -0
- zrb/llm/task/llm_task.py +245 -0
- zrb/llm/tool/__init__.py +39 -0
- zrb/llm/tool/bash.py +75 -0
- zrb/llm/tool/code.py +266 -0
- zrb/llm/tool/file.py +419 -0
- zrb/llm/tool/note.py +70 -0
- zrb/{builtin/llm → llm}/tool/rag.py +33 -37
- zrb/llm/tool/search/brave.py +53 -0
- zrb/llm/tool/search/searxng.py +47 -0
- zrb/llm/tool/search/serpapi.py +47 -0
- zrb/llm/tool/skill.py +19 -0
- zrb/llm/tool/sub_agent.py +70 -0
- zrb/llm/tool/web.py +97 -0
- zrb/llm/tool/zrb_task.py +66 -0
- zrb/llm/util/attachment.py +101 -0
- zrb/llm/util/prompt.py +104 -0
- zrb/llm/util/stream_response.py +178 -0
- zrb/runner/cli.py +21 -20
- zrb/runner/common_util.py +24 -19
- zrb/runner/web_route/task_input_api_route.py +5 -5
- zrb/runner/web_util/user.py +7 -3
- zrb/session/any_session.py +12 -9
- zrb/session/session.py +38 -17
- zrb/task/any_task.py +24 -3
- zrb/task/base/context.py +42 -22
- zrb/task/base/execution.py +67 -55
- zrb/task/base/lifecycle.py +14 -7
- zrb/task/base/monitoring.py +12 -7
- zrb/task/base_task.py +113 -50
- zrb/task/base_trigger.py +16 -6
- zrb/task/cmd_task.py +6 -0
- zrb/task/http_check.py +11 -5
- zrb/task/make_task.py +5 -3
- zrb/task/rsync_task.py +30 -10
- zrb/task/scaffolder.py +7 -4
- zrb/task/scheduler.py +7 -4
- zrb/task/tcp_check.py +6 -4
- zrb/util/ascii_art/art/bee.txt +17 -0
- zrb/util/ascii_art/art/cat.txt +9 -0
- zrb/util/ascii_art/art/ghost.txt +16 -0
- zrb/util/ascii_art/art/panda.txt +17 -0
- zrb/util/ascii_art/art/rose.txt +14 -0
- zrb/util/ascii_art/art/unicorn.txt +15 -0
- zrb/util/ascii_art/banner.py +92 -0
- zrb/util/attr.py +54 -39
- zrb/util/cli/markdown.py +32 -0
- zrb/util/cli/text.py +30 -0
- zrb/util/cmd/command.py +33 -10
- zrb/util/file.py +61 -33
- zrb/util/git.py +2 -2
- zrb/util/{llm/prompt.py → markdown.py} +2 -3
- zrb/util/match.py +78 -0
- zrb/util/run.py +3 -3
- zrb/util/string/conversion.py +1 -1
- zrb/util/truncate.py +23 -0
- zrb/util/yaml.py +204 -0
- zrb/xcom/xcom.py +10 -0
- {zrb-1.15.3.dist-info → zrb-2.0.0a4.dist-info}/METADATA +41 -27
- {zrb-1.15.3.dist-info → zrb-2.0.0a4.dist-info}/RECORD +129 -131
- {zrb-1.15.3.dist-info → zrb-2.0.0a4.dist-info}/WHEEL +1 -1
- zrb/attr/__init__.py +0 -0
- zrb/builtin/llm/chat_session.py +0 -311
- zrb/builtin/llm/history.py +0 -71
- zrb/builtin/llm/input.py +0 -27
- zrb/builtin/llm/llm_ask.py +0 -187
- zrb/builtin/llm/previous-session.js +0 -21
- zrb/builtin/llm/tool/__init__.py +0 -0
- zrb/builtin/llm/tool/api.py +0 -71
- zrb/builtin/llm/tool/cli.py +0 -38
- zrb/builtin/llm/tool/code.py +0 -254
- zrb/builtin/llm/tool/file.py +0 -626
- zrb/builtin/llm/tool/sub_agent.py +0 -137
- zrb/builtin/llm/tool/web.py +0 -195
- zrb/builtin/project/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/_zrb/module/template/app_template/module/my_module/service/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/common/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/permission/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/role/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/module/auth/service/user/__init__.py +0 -0
- zrb/builtin/project/add/fastapp/fastapp_template/my_app_name/schema/__init__.py +0 -0
- zrb/builtin/project/create/__init__.py +0 -0
- zrb/builtin/shell/__init__.py +0 -0
- zrb/builtin/shell/autocomplete/__init__.py +0 -0
- zrb/callback/__init__.py +0 -0
- zrb/cmd/__init__.py +0 -0
- zrb/config/default_prompt/file_extractor_system_prompt.md +0 -12
- zrb/config/default_prompt/interactive_system_prompt.md +0 -35
- zrb/config/default_prompt/persona.md +0 -1
- zrb/config/default_prompt/repo_extractor_system_prompt.md +0 -112
- zrb/config/default_prompt/repo_summarizer_system_prompt.md +0 -10
- zrb/config/default_prompt/summarization_prompt.md +0 -16
- zrb/config/default_prompt/system_prompt.md +0 -32
- zrb/config/llm_config.py +0 -243
- zrb/config/llm_context/config.py +0 -129
- zrb/config/llm_context/config_parser.py +0 -46
- zrb/config/llm_rate_limitter.py +0 -137
- zrb/content_transformer/__init__.py +0 -0
- zrb/context/__init__.py +0 -0
- zrb/dot_dict/__init__.py +0 -0
- zrb/env/__init__.py +0 -0
- zrb/group/__init__.py +0 -0
- zrb/input/__init__.py +0 -0
- zrb/runner/__init__.py +0 -0
- zrb/runner/web_route/__init__.py +0 -0
- zrb/runner/web_route/home_page/__init__.py +0 -0
- zrb/session/__init__.py +0 -0
- zrb/session_state_log/__init__.py +0 -0
- zrb/session_state_logger/__init__.py +0 -0
- zrb/task/__init__.py +0 -0
- zrb/task/base/__init__.py +0 -0
- zrb/task/llm/__init__.py +0 -0
- zrb/task/llm/agent.py +0 -243
- zrb/task/llm/config.py +0 -103
- zrb/task/llm/conversation_history.py +0 -128
- zrb/task/llm/conversation_history_model.py +0 -242
- zrb/task/llm/default_workflow/coding.md +0 -24
- zrb/task/llm/default_workflow/copywriting.md +0 -17
- zrb/task/llm/default_workflow/researching.md +0 -18
- zrb/task/llm/error.py +0 -95
- zrb/task/llm/history_summarization.py +0 -216
- zrb/task/llm/print_node.py +0 -101
- zrb/task/llm/prompt.py +0 -325
- zrb/task/llm/tool_wrapper.py +0 -220
- zrb/task/llm/typing.py +0 -3
- zrb/task/llm_task.py +0 -341
- zrb/task_status/__init__.py +0 -0
- zrb/util/__init__.py +0 -0
- zrb/util/cli/__init__.py +0 -0
- zrb/util/cmd/__init__.py +0 -0
- zrb/util/codemod/__init__.py +0 -0
- zrb/util/string/__init__.py +0 -0
- zrb/xcom/__init__.py +0 -0
- {zrb-1.15.3.dist-info → zrb-2.0.0a4.dist-info}/entry_points.txt +0 -0
zrb/util/yaml.py
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def yaml_dump(obj: Any, key: str = "") -> str:
|
|
5
|
+
"""
|
|
6
|
+
Convert any Python object to a YAML string representation.
|
|
7
|
+
|
|
8
|
+
Args:
|
|
9
|
+
obj: Any Python object to convert to YAML
|
|
10
|
+
|
|
11
|
+
Returns:
|
|
12
|
+
str: YAML string representation of the object
|
|
13
|
+
|
|
14
|
+
Rules:
|
|
15
|
+
- Any non-first level multiline string should be rendered as block (using `|`)
|
|
16
|
+
- None values are rendered correctly (not omitted)
|
|
17
|
+
- Non-primitive/list/dict/set objects are ignored
|
|
18
|
+
"""
|
|
19
|
+
import yaml
|
|
20
|
+
|
|
21
|
+
# Process the object
|
|
22
|
+
processed_obj = _sanitize_obj(obj)
|
|
23
|
+
if key:
|
|
24
|
+
key_parts = _parse_key(key)
|
|
25
|
+
obj_to_dump = _get_obj_value(processed_obj, key_parts)
|
|
26
|
+
else:
|
|
27
|
+
obj_to_dump = processed_obj
|
|
28
|
+
# Add custom representer for multiline strings
|
|
29
|
+
yaml.add_representer(str, _multiline_string_presenter)
|
|
30
|
+
# Generate YAML
|
|
31
|
+
yaml_str = yaml.dump(
|
|
32
|
+
obj_to_dump,
|
|
33
|
+
default_flow_style=False,
|
|
34
|
+
allow_unicode=True,
|
|
35
|
+
sort_keys=False,
|
|
36
|
+
explicit_end=False,
|
|
37
|
+
width=float("inf"),
|
|
38
|
+
)
|
|
39
|
+
if not isinstance(obj_to_dump, (dict, list)):
|
|
40
|
+
# PyYAML appends '...\n' (document-end) for top-level scalars.
|
|
41
|
+
# So, we remove it.
|
|
42
|
+
if yaml_str.endswith("...\n"):
|
|
43
|
+
yaml_str = yaml_str[:-4]
|
|
44
|
+
return yaml_str
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def edit_obj(obj: Any, key: str, val: str) -> Any:
|
|
48
|
+
"""
|
|
49
|
+
Edit a property or subproperty of an object using YAML syntax.
|
|
50
|
+
|
|
51
|
+
Args:
|
|
52
|
+
obj: The object to edit
|
|
53
|
+
key: The key to edit, can be nested with '.' as separator
|
|
54
|
+
val: The string value to set, will be parsed as YAML
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
Any: The modified object
|
|
58
|
+
|
|
59
|
+
Example:
|
|
60
|
+
edit({"a": {"b": 1}}, "a.b", "2") -> {"a": {"b": 2}}
|
|
61
|
+
edit({"flag": False}, "flag", "true") -> {"flag": True}
|
|
62
|
+
edit({"a": 1}, "", "2") -> 2 # Replace entire object with scalar
|
|
63
|
+
edit({"a": 1}, "", "b: 2") -> {"a": 1, "b": 2} # Patch dict if obj is dict
|
|
64
|
+
"""
|
|
65
|
+
# Parse the value using YAML rules
|
|
66
|
+
parsed_value = _load_yaml(val)
|
|
67
|
+
|
|
68
|
+
# Handle empty key - replace entire object
|
|
69
|
+
if not key:
|
|
70
|
+
if isinstance(obj, dict) and isinstance(parsed_value, dict):
|
|
71
|
+
# Patch/merge the dict values
|
|
72
|
+
return {**obj, **parsed_value}
|
|
73
|
+
# Replace entire object with parsed value
|
|
74
|
+
return parsed_value
|
|
75
|
+
|
|
76
|
+
# Split the key by dots
|
|
77
|
+
key_parts = _parse_key(key)
|
|
78
|
+
# Set the nested value
|
|
79
|
+
return _set_obj_value(obj, key_parts, parsed_value)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def _sanitize_obj(obj: Any) -> Any:
|
|
83
|
+
"""Process a value for YAML conversion."""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
elif isinstance(obj, (int, float, bool, str)):
|
|
87
|
+
return obj
|
|
88
|
+
elif isinstance(obj, (list, tuple)):
|
|
89
|
+
return [_sanitize_obj(item) for item in obj if not _is_complex_obj(item)]
|
|
90
|
+
elif isinstance(obj, dict):
|
|
91
|
+
return {k: _sanitize_obj(v) for k, v in obj.items() if not _is_complex_obj(v)}
|
|
92
|
+
elif isinstance(obj, set):
|
|
93
|
+
return [
|
|
94
|
+
_sanitize_obj(item) for item in sorted(obj) if not _is_complex_obj(item)
|
|
95
|
+
]
|
|
96
|
+
else:
|
|
97
|
+
# Ignore non-primitive/list/dict/set objects
|
|
98
|
+
return None
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _is_complex_obj(obj: Any) -> bool:
|
|
102
|
+
return obj is not None and not isinstance(
|
|
103
|
+
obj, (int, float, bool, str, list, tuple, dict, set)
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def _multiline_string_presenter(dumper, data):
|
|
108
|
+
"""Custom representer for multiline strings."""
|
|
109
|
+
if "\n" in data:
|
|
110
|
+
# Clean up the string for block style
|
|
111
|
+
lines = [line.rstrip() for line in data.splitlines()]
|
|
112
|
+
clean_data = "\n".join(lines)
|
|
113
|
+
return dumper.represent_scalar("tag:yaml.org,2002:str", clean_data, style="|")
|
|
114
|
+
return dumper.represent_scalar("tag:yaml.org,2002:str", data)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def _parse_key(key: str) -> list[str]:
|
|
118
|
+
return key.split(".")
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def _load_yaml(value_str: str) -> Any:
|
|
122
|
+
"""Parse a string value using YAML rules."""
|
|
123
|
+
import yaml
|
|
124
|
+
|
|
125
|
+
# Handle empty string explicitly
|
|
126
|
+
if value_str == "":
|
|
127
|
+
return ""
|
|
128
|
+
try:
|
|
129
|
+
# Use yaml.safe_load to parse the value
|
|
130
|
+
parsed = yaml.safe_load(value_str)
|
|
131
|
+
return parsed
|
|
132
|
+
except yaml.YAMLError:
|
|
133
|
+
# If YAML parsing fails, treat as string
|
|
134
|
+
return value_str
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def _set_obj_value(obj: Any, keys: list[str], value: Any) -> Any:
|
|
138
|
+
"""Set a value in a nested structure."""
|
|
139
|
+
if not keys:
|
|
140
|
+
return value
|
|
141
|
+
current_key = keys[0]
|
|
142
|
+
remaining_keys = keys[1:]
|
|
143
|
+
if isinstance(obj, dict):
|
|
144
|
+
# Handle dictionary
|
|
145
|
+
if remaining_keys:
|
|
146
|
+
# There are more keys to traverse
|
|
147
|
+
if current_key not in obj:
|
|
148
|
+
obj[current_key] = {}
|
|
149
|
+
obj[current_key] = _set_obj_value(obj[current_key], remaining_keys, value)
|
|
150
|
+
else:
|
|
151
|
+
# This is the final key
|
|
152
|
+
obj[current_key] = value
|
|
153
|
+
return obj
|
|
154
|
+
elif isinstance(obj, list):
|
|
155
|
+
# Handle list - convert key to index
|
|
156
|
+
try:
|
|
157
|
+
index = int(current_key)
|
|
158
|
+
if 0 <= index < len(obj):
|
|
159
|
+
if remaining_keys:
|
|
160
|
+
obj[index] = _set_obj_value(obj[index], remaining_keys, value)
|
|
161
|
+
else:
|
|
162
|
+
obj[index] = value
|
|
163
|
+
else:
|
|
164
|
+
raise IndexError(
|
|
165
|
+
f"Index {index} out of range for list of length {len(obj)}"
|
|
166
|
+
)
|
|
167
|
+
except ValueError:
|
|
168
|
+
raise KeyError(f"Cannot use non-integer key '{current_key}' with list")
|
|
169
|
+
return obj
|
|
170
|
+
else:
|
|
171
|
+
# Handle other types by converting to dict
|
|
172
|
+
if remaining_keys:
|
|
173
|
+
# Create nested structure
|
|
174
|
+
new_obj = {current_key: _set_obj_value({}, remaining_keys, value)}
|
|
175
|
+
return new_obj
|
|
176
|
+
else:
|
|
177
|
+
# Replace the entire object
|
|
178
|
+
return {current_key: value}
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
def _get_obj_value(obj: Any, keys: list[str]) -> Any:
|
|
182
|
+
"""
|
|
183
|
+
Get a value from a nested structure using a list of keys.
|
|
184
|
+
Returns None if the key path does not exist.
|
|
185
|
+
"""
|
|
186
|
+
current_val = obj
|
|
187
|
+
for key in keys:
|
|
188
|
+
if isinstance(current_val, dict):
|
|
189
|
+
if key in current_val:
|
|
190
|
+
current_val = current_val[key]
|
|
191
|
+
else:
|
|
192
|
+
return None
|
|
193
|
+
elif isinstance(current_val, list):
|
|
194
|
+
try:
|
|
195
|
+
index = int(key)
|
|
196
|
+
if 0 <= index < len(current_val):
|
|
197
|
+
current_val = current_val[index]
|
|
198
|
+
else:
|
|
199
|
+
return None
|
|
200
|
+
except (ValueError, TypeError):
|
|
201
|
+
return None
|
|
202
|
+
else:
|
|
203
|
+
return None
|
|
204
|
+
return current_val
|
zrb/xcom/xcom.py
CHANGED
|
@@ -34,6 +34,16 @@ class Xcom(deque):
|
|
|
34
34
|
else:
|
|
35
35
|
raise IndexError("Xcom is empty")
|
|
36
36
|
|
|
37
|
+
def get(self, default_value: Any = None) -> Any:
|
|
38
|
+
if len(self) > 0:
|
|
39
|
+
return self[0]
|
|
40
|
+
return default_value
|
|
41
|
+
|
|
42
|
+
def set(self, new_value: Any):
|
|
43
|
+
self.push(new_value)
|
|
44
|
+
while len(self) > 1:
|
|
45
|
+
self.pop()
|
|
46
|
+
|
|
37
47
|
def add_push_callback(self, callback: Callable[[], Any]):
|
|
38
48
|
if not hasattr(self, "push_callbacks"):
|
|
39
49
|
self.push_callbacks: list[Callable[[], Any]] = []
|
|
@@ -1,38 +1,58 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: zrb
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0a4
|
|
4
4
|
Summary: Your Automation Powerhouse
|
|
5
5
|
License: AGPL-3.0-or-later
|
|
6
6
|
Keywords: Automation,Task Runner,Code Generator,Monorepo,Low Code
|
|
7
7
|
Author: Go Frendi Gunawan
|
|
8
8
|
Author-email: gofrendiasgard@gmail.com
|
|
9
|
-
Requires-Python: >=3.
|
|
9
|
+
Requires-Python: >=3.11.0,<4.0.0
|
|
10
10
|
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
|
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
16
|
Provides-Extra: all
|
|
17
|
+
Provides-Extra: anthropic
|
|
18
|
+
Provides-Extra: bedrock
|
|
19
|
+
Provides-Extra: cohere
|
|
20
|
+
Provides-Extra: google
|
|
21
|
+
Provides-Extra: groq
|
|
22
|
+
Provides-Extra: huggingface
|
|
23
|
+
Provides-Extra: mistral
|
|
17
24
|
Provides-Extra: playwright
|
|
18
25
|
Provides-Extra: rag
|
|
19
|
-
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist:
|
|
22
|
-
Requires-Dist:
|
|
23
|
-
Requires-Dist:
|
|
24
|
-
Requires-Dist:
|
|
25
|
-
Requires-Dist:
|
|
26
|
-
Requires-Dist:
|
|
27
|
-
Requires-Dist:
|
|
28
|
-
Requires-Dist:
|
|
26
|
+
Provides-Extra: vertexai
|
|
27
|
+
Requires-Dist: anthropic (>=0.75.0) ; extra == "anthropic" or extra == "all"
|
|
28
|
+
Requires-Dist: beautifulsoup4 (>=4.14.2,<5.0.0)
|
|
29
|
+
Requires-Dist: black (>=25.11.0,<26.0.0)
|
|
30
|
+
Requires-Dist: boto3 (>=1.42.14) ; extra == "bedrock"
|
|
31
|
+
Requires-Dist: chromadb (>=1.3.5,<2.0.0) ; extra == "rag" or extra == "all"
|
|
32
|
+
Requires-Dist: cohere (>=5.18.0) ; extra == "cohere" or extra == "all"
|
|
33
|
+
Requires-Dist: fastapi[standard] (>=0.123.9,<0.124.0)
|
|
34
|
+
Requires-Dist: google-auth (>=2.36.0) ; extra == "vertexai" or extra == "all"
|
|
35
|
+
Requires-Dist: google-genai (>=1.56.0) ; extra == "google" or extra == "all"
|
|
36
|
+
Requires-Dist: groq (>=0.25.0) ; extra == "groq" or extra == "all"
|
|
37
|
+
Requires-Dist: huggingface-hub[inference] (>=0.33.5,<1.0.0) ; extra == "huggingface"
|
|
38
|
+
Requires-Dist: isort (>=7.0.0,<8.0.0)
|
|
39
|
+
Requires-Dist: libcst (>=1.8.6,<2.0.0)
|
|
40
|
+
Requires-Dist: markdownify (>=1.2.2,<2.0.0)
|
|
41
|
+
Requires-Dist: mcp (>1.18.0)
|
|
42
|
+
Requires-Dist: mistralai (>=1.9.11) ; extra == "mistral"
|
|
43
|
+
Requires-Dist: openai (>=2.11.0)
|
|
44
|
+
Requires-Dist: pdfplumber (>=0.11.7,<0.12.0)
|
|
45
|
+
Requires-Dist: playwright (>=1.56.0,<2.0.0) ; extra == "playwright" or extra == "all"
|
|
46
|
+
Requires-Dist: prompt-toolkit (>=3)
|
|
29
47
|
Requires-Dist: psutil (>=7.0.0,<8.0.0)
|
|
30
|
-
Requires-Dist: pydantic-ai-slim
|
|
48
|
+
Requires-Dist: pydantic-ai-slim (>=1.42.0,<1.43.0)
|
|
31
49
|
Requires-Dist: pyjwt (>=2.10.1,<3.0.0)
|
|
32
50
|
Requires-Dist: python-dotenv (>=1.1.1,<2.0.0)
|
|
33
|
-
Requires-Dist: python-jose[cryptography] (>=3.
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist:
|
|
51
|
+
Requires-Dist: python-jose[cryptography] (>=3.5.0,<4.0.0)
|
|
52
|
+
Requires-Dist: pyyaml (>=6.0.3,<7.0.0)
|
|
53
|
+
Requires-Dist: requests (>=2.32.5,<3.0.0)
|
|
54
|
+
Requires-Dist: rich (>=13)
|
|
55
|
+
Requires-Dist: tiktoken (>=0.12.0,<0.13.0)
|
|
36
56
|
Requires-Dist: ulid-py (>=1.1.0,<2.0.0)
|
|
37
57
|
Project-URL: Documentation, https://github.com/state-alchemists/zrb
|
|
38
58
|
Project-URL: Homepage, https://github.com/state-alchemists/zrb
|
|
@@ -111,8 +131,8 @@ Add the following Python code to your `zrb_init.py`:
|
|
|
111
131
|
|
|
112
132
|
```python
|
|
113
133
|
from zrb import cli, LLMTask, CmdTask, StrInput, Group
|
|
114
|
-
from zrb.
|
|
115
|
-
from zrb.
|
|
134
|
+
from zrb.llm.tool.code import analyze_code
|
|
135
|
+
from zrb.llm.tool.file import write_file
|
|
116
136
|
|
|
117
137
|
|
|
118
138
|
# Create a group for Mermaid-related tasks
|
|
@@ -136,7 +156,7 @@ make_mermaid_script = mermaid_group.add_task(
|
|
|
136
156
|
"Write the script into `{ctx.input.dir}/{ctx.input.diagram}.mmd`"
|
|
137
157
|
),
|
|
138
158
|
tools=[
|
|
139
|
-
|
|
159
|
+
analyze_code, write_file
|
|
140
160
|
],
|
|
141
161
|
)
|
|
142
162
|
)
|
|
@@ -212,13 +232,7 @@ Start a chat session with an LLM to ask questions, brainstorm ideas, or get codi
|
|
|
212
232
|
zrb llm chat
|
|
213
233
|
```
|
|
214
234
|
|
|
215
|
-
### Quick Questions
|
|
216
235
|
|
|
217
|
-
For a single question, use the `ask` command for a fast response.
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
zrb llm ask "What is the capital of Indonesia?"
|
|
221
|
-
```
|
|
222
236
|
|
|
223
237
|
---
|
|
224
238
|
|