zrb 1.9.8__py3-none-any.whl → 1.9.9__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/tool/code.py +15 -39
- zrb/builtin/llm/tool/file.py +6 -22
- zrb/config/config.py +104 -0
- zrb/config/llm_config.py +22 -18
- {zrb-1.9.8.dist-info → zrb-1.9.9.dist-info}/METADATA +1 -1
- {zrb-1.9.8.dist-info → zrb-1.9.9.dist-info}/RECORD +8 -8
- {zrb-1.9.8.dist-info → zrb-1.9.9.dist-info}/WHEEL +0 -0
- {zrb-1.9.8.dist-info → zrb-1.9.9.dist-info}/entry_points.txt +0 -0
zrb/builtin/llm/tool/code.py
CHANGED
@@ -3,40 +3,10 @@ import os
|
|
3
3
|
|
4
4
|
from zrb.builtin.llm.tool.file import DEFAULT_EXCLUDED_PATTERNS, is_excluded
|
5
5
|
from zrb.builtin.llm.tool.sub_agent import create_sub_agent_tool
|
6
|
+
from zrb.config.config import CFG
|
6
7
|
from zrb.config.llm_rate_limitter import llm_rate_limitter
|
7
8
|
from zrb.context.any_context import AnyContext
|
8
9
|
|
9
|
-
_EXTRACT_INFO_FROM_REPO_SYSTEM_PROMPT = """
|
10
|
-
You are an extraction info agent.
|
11
|
-
Your goal is to help to extract relevant information to help the main assistant.
|
12
|
-
You write your output is in markdown format containing path and relevant information.
|
13
|
-
Extract only information that relevant to main assistant's goal.
|
14
|
-
|
15
|
-
Extracted Information format (Use this as reference, extract relevant information only):
|
16
|
-
# <file-name>
|
17
|
-
## imports
|
18
|
-
- <imported-package>
|
19
|
-
- ...
|
20
|
-
## variables
|
21
|
-
- <variable-type> <variable-name>: <the-purpose-of-the-variable>
|
22
|
-
- ...
|
23
|
-
## functions
|
24
|
-
- <function-name>:
|
25
|
-
- parameters: <parameters>
|
26
|
-
- logic/description: <what-the-function-do-and-how-it-works>
|
27
|
-
...
|
28
|
-
# <other-file-name>
|
29
|
-
...
|
30
|
-
""".strip()
|
31
|
-
|
32
|
-
|
33
|
-
_SUMMARIZE_INFO_SYSTEM_PROMPT = """
|
34
|
-
You are an information summarization agent.
|
35
|
-
Your goal is to summarize information to help the main assistant.
|
36
|
-
The summarization result should contains all necessary details
|
37
|
-
to help main assistant achieve the goal.
|
38
|
-
"""
|
39
|
-
|
40
10
|
_DEFAULT_EXTENSIONS = [
|
41
11
|
"py",
|
42
12
|
"go",
|
@@ -82,8 +52,8 @@ async def analyze_repo(
|
|
82
52
|
goal: str,
|
83
53
|
extensions: list[str] = _DEFAULT_EXTENSIONS,
|
84
54
|
exclude_patterns: list[str] = DEFAULT_EXCLUDED_PATTERNS,
|
85
|
-
|
86
|
-
|
55
|
+
extraction_token_threshold: int | None = None,
|
56
|
+
summarization_token_threshold: int | None = None,
|
87
57
|
) -> str:
|
88
58
|
"""
|
89
59
|
Performs a deep, goal-oriented analysis of a code repository or directory.
|
@@ -102,14 +72,20 @@ async def analyze_repo(
|
|
102
72
|
goal (str): A clear and specific description of what you want to achieve. A good goal is critical for getting a useful result. For example: "Understand the database schema by analyzing all the .sql files" or "Create a summary of all the API endpoints defined in the 'api' directory".
|
103
73
|
extensions (list[str], optional): A list of file extensions to include in the analysis. Defaults to a comprehensive list of common code and configuration files.
|
104
74
|
exclude_patterns (list[str], optional): A list of glob patterns for files and directories to exclude from the analysis. Defaults to common patterns like '.git', 'node_modules', and '.venv'.
|
105
|
-
|
106
|
-
|
75
|
+
extraction_token_threshold (int, optional): The maximum token threshold for the extraction sub-agent.
|
76
|
+
summarization_token_threshold (int, optional): The maximum token threshold for the summarization sub-agent.
|
107
77
|
|
108
78
|
Returns:
|
109
79
|
str: A detailed, markdown-formatted analysis and summary of the repository, tailored to the specified goal.
|
110
80
|
Raises:
|
111
81
|
Exception: If an error occurs during the analysis.
|
112
82
|
"""
|
83
|
+
if extraction_token_threshold is None:
|
84
|
+
extraction_token_threshold = CFG.LLM_REPO_ANALYSIS_EXTRACTION_TOKEN_THRESHOLD
|
85
|
+
if summarization_token_threshold is None:
|
86
|
+
summarization_token_threshold = (
|
87
|
+
CFG.LLM_REPO_ANALYSIS_SUMMARIZATION_TOKEN_THRESHOLD
|
88
|
+
)
|
113
89
|
abs_path = os.path.abspath(os.path.expanduser(path))
|
114
90
|
file_metadatas = _get_file_metadatas(abs_path, extensions, exclude_patterns)
|
115
91
|
ctx.print("Extraction")
|
@@ -117,7 +93,7 @@ async def analyze_repo(
|
|
117
93
|
ctx,
|
118
94
|
file_metadatas=file_metadatas,
|
119
95
|
goal=goal,
|
120
|
-
token_limit=
|
96
|
+
token_limit=extraction_token_threshold,
|
121
97
|
)
|
122
98
|
if len(extracted_infos) == 1:
|
123
99
|
return extracted_infos[0]
|
@@ -129,7 +105,7 @@ async def analyze_repo(
|
|
129
105
|
ctx,
|
130
106
|
extracted_infos=summarized_infos,
|
131
107
|
goal=goal,
|
132
|
-
token_limit=
|
108
|
+
token_limit=summarization_token_threshold,
|
133
109
|
)
|
134
110
|
return summarized_infos[0]
|
135
111
|
|
@@ -167,7 +143,7 @@ async def _extract_info(
|
|
167
143
|
extract = create_sub_agent_tool(
|
168
144
|
tool_name="extract",
|
169
145
|
tool_description="extract",
|
170
|
-
system_prompt=
|
146
|
+
system_prompt=CFG.LLM_REPO_EXTRACTOR_SYSTEM_PROMPT,
|
171
147
|
)
|
172
148
|
extracted_infos = []
|
173
149
|
content_buffer = []
|
@@ -218,7 +194,7 @@ async def _summarize_info(
|
|
218
194
|
summarize = create_sub_agent_tool(
|
219
195
|
tool_name="extract",
|
220
196
|
tool_description="extract",
|
221
|
-
system_prompt=
|
197
|
+
system_prompt=CFG.LLM_REPO_SUMMARIZER_SYSTEM_PROMPT,
|
222
198
|
)
|
223
199
|
summarized_infos = []
|
224
200
|
content_buffer = ""
|
zrb/builtin/llm/tool/file.py
CHANGED
@@ -5,30 +5,12 @@ import re
|
|
5
5
|
from typing import Any, Dict, List, Optional
|
6
6
|
|
7
7
|
from zrb.builtin.llm.tool.sub_agent import create_sub_agent_tool
|
8
|
+
from zrb.config.config import CFG
|
8
9
|
from zrb.config.llm_rate_limitter import llm_rate_limitter
|
9
10
|
from zrb.context.any_context import AnyContext
|
10
11
|
from zrb.util.file import read_file, read_file_with_line_numbers, write_file
|
11
12
|
|
12
|
-
_EXTRACT_INFO_FROM_FILE_SYSTEM_PROMPT =
|
13
|
-
You are an extraction info agent.
|
14
|
-
Your goal is to help to extract relevant information to help the main assistant.
|
15
|
-
You write your output is in markdown format containing path and relevant information.
|
16
|
-
Extract only information that relevant to main assistant's goal.
|
17
|
-
|
18
|
-
Extracted Information format (Use this as reference, extract relevant information only):
|
19
|
-
# imports
|
20
|
-
- <imported-package>
|
21
|
-
- ...
|
22
|
-
# variables
|
23
|
-
- <variable-type> <variable-name>: <the-purpose-of-the-variable>
|
24
|
-
- ...
|
25
|
-
# functions
|
26
|
-
- <function-name>:
|
27
|
-
- parameters: <parameters>
|
28
|
-
- logic/description: <what-the-function-do-and-how-it-works>
|
29
|
-
...
|
30
|
-
...
|
31
|
-
""".strip()
|
13
|
+
_EXTRACT_INFO_FROM_FILE_SYSTEM_PROMPT = CFG.LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT
|
32
14
|
|
33
15
|
|
34
16
|
DEFAULT_EXCLUDED_PATTERNS = [
|
@@ -457,7 +439,7 @@ def replace_in_file(
|
|
457
439
|
|
458
440
|
|
459
441
|
async def analyze_file(
|
460
|
-
ctx: AnyContext, path: str, query: str, token_limit: int =
|
442
|
+
ctx: AnyContext, path: str, query: str, token_limit: int | None = None
|
461
443
|
) -> str:
|
462
444
|
"""
|
463
445
|
Performs a deep, goal-oriented analysis of a single file using a sub-agent.
|
@@ -480,6 +462,8 @@ async def analyze_file(
|
|
480
462
|
Raises:
|
481
463
|
FileNotFoundError: If the specified file does not exist.
|
482
464
|
"""
|
465
|
+
if token_limit is None:
|
466
|
+
token_limit = CFG.LLM_FILE_ANALYSIS_TOKEN_LIMIT
|
483
467
|
abs_path = os.path.abspath(os.path.expanduser(path))
|
484
468
|
if not os.path.exists(abs_path):
|
485
469
|
raise FileNotFoundError(f"File not found: {path}")
|
@@ -487,7 +471,7 @@ async def analyze_file(
|
|
487
471
|
_analyze_file = create_sub_agent_tool(
|
488
472
|
tool_name="analyze_file",
|
489
473
|
tool_description="analyze file with LLM capability",
|
490
|
-
system_prompt=
|
474
|
+
system_prompt=CFG.LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT,
|
491
475
|
tools=[read_from_file, search_files],
|
492
476
|
)
|
493
477
|
payload = json.dumps(
|
zrb/config/config.py
CHANGED
@@ -19,6 +19,75 @@ Your Automation Powerhouse
|
|
19
19
|
🐤 Follow us at: https://twitter.com/zarubastalchmst
|
20
20
|
"""
|
21
21
|
|
22
|
+
_DEFAULT_LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT = (
|
23
|
+
"You are an intelligent code and configuration analysis agent.\n"
|
24
|
+
"Your primary goal is to extract key information from the provided file(s) "
|
25
|
+
"that is directly relevant to the main assistant's objective.\n"
|
26
|
+
"\n"
|
27
|
+
"Analyze the file content and determine its type (e.g., Python script, "
|
28
|
+
"YAML configuration, Dockerfile, Markdown documentation).\n"
|
29
|
+
"Based on the file type, extract the most important information in a "
|
30
|
+
"structured markdown format.\n"
|
31
|
+
"\n"
|
32
|
+
"- For source code (e.g., .py, .js, .go): Extract key components like "
|
33
|
+
"classes, functions, important variables, and their purposes.\n"
|
34
|
+
"- For configuration files (e.g., .yaml, .toml, .json): Extract the main "
|
35
|
+
"configuration sections, keys, and their values.\n"
|
36
|
+
"- For infrastructure files (e.g., Dockerfile, .tf): Extract resources, "
|
37
|
+
"settings, and commands.\n"
|
38
|
+
"- For documentation (e.g., .md): Extract headings, summaries, code "
|
39
|
+
"blocks, and links.\n"
|
40
|
+
"\n"
|
41
|
+
"Focus on quality and relevance over quantity. The output should be a "
|
42
|
+
"concise yet comprehensive summary that directly helps the main "
|
43
|
+
"assistant achieve its goal."
|
44
|
+
).strip()
|
45
|
+
|
46
|
+
_DEFAULT_LLM_REPO_EXTRACTOR_SYSTEM_PROMPT = (
|
47
|
+
"You are an intelligent code and configuration analysis agent.\n"
|
48
|
+
"Your primary goal is to extract key information from the provided file(s) "
|
49
|
+
"that is directly relevant to the main assistant's objective.\n"
|
50
|
+
"\n"
|
51
|
+
"Analyze the file content and determine its type (e.g., Python script, "
|
52
|
+
"YAML configuration, Dockerfile, Markdown documentation).\n"
|
53
|
+
"Based on the file type, extract the most important information in a "
|
54
|
+
"structured markdown format.\n"
|
55
|
+
"\n"
|
56
|
+
"- For source code (e.g., .py, .js, .go): Extract key components like "
|
57
|
+
"classes, functions, important variables, and their purposes.\n"
|
58
|
+
"- For configuration files (e.g., .yaml, .toml, .json): Extract the main "
|
59
|
+
"configuration sections, keys, and their values.\n"
|
60
|
+
"- For infrastructure files (e.g., Dockerfile, .tf): Extract resources, "
|
61
|
+
"settings, and commands.\n"
|
62
|
+
"- For documentation (e.g., .md): Extract headings, summaries, code "
|
63
|
+
"blocks, and links.\n"
|
64
|
+
"\n"
|
65
|
+
"Focus on quality and relevance over quantity. The output should be a "
|
66
|
+
"concise yet comprehensive summary that directly helps the main "
|
67
|
+
"assistant achieve its goal."
|
68
|
+
).strip()
|
69
|
+
|
70
|
+
_DEFAULT_LLM_REPO_SUMMARIZER_SYSTEM_PROMPT = (
|
71
|
+
"You are an expert summarization and synthesis agent.\n"
|
72
|
+
"Your goal is to consolidate multiple pieces of extracted information into a "
|
73
|
+
"single, coherent summary that directly addresses the main assistant's "
|
74
|
+
"objective.\n"
|
75
|
+
"\n"
|
76
|
+
"Do not simply list the information you receive. Instead, perform the "
|
77
|
+
"following actions:\n"
|
78
|
+
"1. **Synthesize**: Combine related pieces of information from different "
|
79
|
+
"sources into a unified narrative.\n"
|
80
|
+
"2. **Consolidate**: Merge duplicate or overlapping information to create a "
|
81
|
+
"concise summary.\n"
|
82
|
+
"3. **Identify Patterns**: Look for high-level patterns, architectural "
|
83
|
+
"structures, or recurring themes in the data.\n"
|
84
|
+
"4. **Structure**: Organize the final output in a logical markdown format "
|
85
|
+
"that tells a clear story and directly answers the main assistant's goal.\n"
|
86
|
+
"\n"
|
87
|
+
"Focus on creating a holistic understanding of the subject matter based on "
|
88
|
+
"the provided context."
|
89
|
+
).strip()
|
90
|
+
|
22
91
|
|
23
92
|
class Config:
|
24
93
|
@property
|
@@ -287,6 +356,41 @@ class Config:
|
|
287
356
|
def LLM_CONTEXT_ENRICHMENT_TOKEN_THRESHOLD(self) -> int:
|
288
357
|
return int(os.getenv("ZRB_LLM_CONTEXT_ENRICHMENT_TOKEN_THRESHOLD", "20000"))
|
289
358
|
|
359
|
+
@property
|
360
|
+
def LLM_REPO_ANALYSIS_EXTRACTION_TOKEN_THRESHOLD(self) -> int:
|
361
|
+
return int(os.getenv("ZRB_LLM_REPO_ANALYSIS_EXTRACTION_TOKEN_LIMIT", "35000"))
|
362
|
+
|
363
|
+
@property
|
364
|
+
def LLM_REPO_ANALYSIS_SUMMARIZATION_TOKEN_THRESHOLD(self) -> int:
|
365
|
+
return int(
|
366
|
+
os.getenv("ZRB_LLM_REPO_ANALYSIS_SUMMARIZATION_TOKEN_LIMIT", "35000")
|
367
|
+
)
|
368
|
+
|
369
|
+
@property
|
370
|
+
def LLM_FILE_ANALYSIS_TOKEN_LIMIT(self) -> int:
|
371
|
+
return int(os.getenv("ZRB_LLM_FILE_ANALYSIS_TOKEN_LIMIT", "35000"))
|
372
|
+
|
373
|
+
@property
|
374
|
+
def LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT(self) -> str:
|
375
|
+
return os.getenv(
|
376
|
+
"ZRB_LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT",
|
377
|
+
_DEFAULT_LLM_ANALYZE_FILE_EXTRACTOR_SYSTEM_PROMPT,
|
378
|
+
)
|
379
|
+
|
380
|
+
@property
|
381
|
+
def LLM_REPO_EXTRACTOR_SYSTEM_PROMPT(self) -> str:
|
382
|
+
return os.getenv(
|
383
|
+
"ZRB_LLM_REPO_EXTRACTOR_SYSTEM_PROMPT",
|
384
|
+
_DEFAULT_LLM_REPO_EXTRACTOR_SYSTEM_PROMPT,
|
385
|
+
)
|
386
|
+
|
387
|
+
@property
|
388
|
+
def LLM_REPO_SUMMARIZER_SYSTEM_PROMPT(self) -> str:
|
389
|
+
return os.getenv(
|
390
|
+
"ZRB_LLM_REPO_SUMMARIZER_SYSTEM_PROMPT",
|
391
|
+
_DEFAULT_LLM_REPO_SUMMARIZER_SYSTEM_PROMPT,
|
392
|
+
)
|
393
|
+
|
290
394
|
@property
|
291
395
|
def LLM_HISTORY_DIR(self) -> str:
|
292
396
|
return os.getenv(
|
zrb/config/llm_config.py
CHANGED
@@ -8,11 +8,11 @@ if TYPE_CHECKING:
|
|
8
8
|
from pydantic_ai.settings import ModelSettings
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
_DEFAULT_PERSONA = (
|
12
12
|
"You are a helpful and efficient AI agent specializing in CLI " "interaction."
|
13
13
|
)
|
14
14
|
|
15
|
-
|
15
|
+
_DEFAULT_INTERACTIVE_SYSTEM_PROMPT = (
|
16
16
|
"This is an interactive CLI session. Your standard response format is\n"
|
17
17
|
"GitHub-flavored Markdown. You MUST follow this thinking process:\n\n"
|
18
18
|
"1. **Analyze Request, Scope & Identify Gaps:** Use the `Scratchpad`\n"
|
@@ -46,7 +46,7 @@ DEFAULT_INTERACTIVE_SYSTEM_PROMPT = (
|
|
46
46
|
" confirm it was successful. Report the outcome to the user.\n\n"
|
47
47
|
).strip()
|
48
48
|
|
49
|
-
|
49
|
+
_DEFAULT_SYSTEM_PROMPT = (
|
50
50
|
"This is a one-shot CLI session. Your final answer MUST be in\n"
|
51
51
|
"GitHub-flavored Markdown. You MUST follow this thinking process:\n\n"
|
52
52
|
"1. **Analyze Request, Scope & Identify Gaps:** Use the `Scratchpad`\n"
|
@@ -80,7 +80,7 @@ DEFAULT_SYSTEM_PROMPT = (
|
|
80
80
|
" confirm it was successful. Report the outcome to the user.\n\n"
|
81
81
|
).strip()
|
82
82
|
|
83
|
-
|
83
|
+
_DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
|
84
84
|
"## Software Engineering Tasks\n"
|
85
85
|
"When requested to perform tasks like fixing bugs, adding features,\n"
|
86
86
|
"refactoring, or explaining code, follow this sequence:\n"
|
@@ -99,6 +99,10 @@ DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
|
|
99
99
|
"5. **Verify (Standards):** After making code changes, execute the\n"
|
100
100
|
"project-specific build, linting and type-checking commands. This\n"
|
101
101
|
"ensures code quality and adherence to standards.\n\n"
|
102
|
+
"## Shell Command Guidelines\n"
|
103
|
+
"NEVER use backticks (`` ` ``) for command substitution; use `$(...)` "
|
104
|
+
"instead. Always enclose literal strings and paths in single quotes (`'`) "
|
105
|
+
"to prevent unintended interpretation of special characters.\n\n"
|
102
106
|
"## New Applications\n"
|
103
107
|
"When asked to create a new application, follow this workflow:\n"
|
104
108
|
"1. **Understand Requirements:** Analyze the user's request to identify\n"
|
@@ -133,7 +137,7 @@ DEFAULT_SPECIAL_INSTRUCTION_PROMPT = (
|
|
133
137
|
).strip()
|
134
138
|
|
135
139
|
|
136
|
-
|
140
|
+
_DEFAULT_SUMMARIZATION_PROMPT = (
|
137
141
|
"You are a Conversation Historian. Your task is to distill the\n"
|
138
142
|
"conversation history into a dense, structured snapshot for the main\n"
|
139
143
|
"assistant. This snapshot is CRITICAL, as it will become the agent's\n"
|
@@ -165,7 +169,8 @@ DEFAULT_SUMMARIZATION_PROMPT = (
|
|
165
169
|
"2. `## Scratchpad` (The new, non-truncated recent history)"
|
166
170
|
).strip()
|
167
171
|
|
168
|
-
|
172
|
+
|
173
|
+
_DEFAULT_CONTEXT_ENRICHMENT_PROMPT = (
|
169
174
|
"You are a Memory Curator. Your sole purpose is to process a\n"
|
170
175
|
"conversation and produce a concise, up-to-date Markdown block of\n"
|
171
176
|
"long-term context for the main assistant.\n\n"
|
@@ -189,15 +194,14 @@ DEFAULT_CONTEXT_ENRICHMENT_PROMPT = (
|
|
189
194
|
" preferences).\n"
|
190
195
|
"- **UPDATE** existing facts if the user provides new information or if\n"
|
191
196
|
" new information overrides the previous one.\n"
|
192
|
-
"- **
|
193
|
-
"
|
197
|
+
"- **Your primary goal is to create a concise, relevant context.** "
|
198
|
+
"Aggressively prune outdated or irrelevant information, but retain any "
|
199
|
+
"detail, fact, or nuance that is critical for understanding the user's "
|
200
|
+
"current and future goals.\n"
|
194
201
|
"- **CONDENSE** older entries that are still relevant but not the\n"
|
195
202
|
" immediate focus. For example, a completed high-level goal might be\n"
|
196
203
|
" condensed into a single 'Past Accomplishments' line item.\n"
|
197
|
-
"
|
198
|
-
" information vital to the conversation's continuity and success\n"
|
199
|
-
" outweighs all other considerations. No detail, fact, or nuance should\n"
|
200
|
-
" be discarded if it could be useful.\n\n"
|
204
|
+
"\n"
|
201
205
|
"**A Note on Dynamic Information:**\n"
|
202
206
|
"Be mindful that some information is temporary and highly dynamic (e.g.,\n"
|
203
207
|
"current weather, location, current working directory, project context,\n"
|
@@ -297,7 +301,7 @@ class LLMConfig:
|
|
297
301
|
return self._default_system_prompt
|
298
302
|
if CFG.LLM_SYSTEM_PROMPT is not None:
|
299
303
|
return CFG.LLM_SYSTEM_PROMPT
|
300
|
-
return
|
304
|
+
return _DEFAULT_SYSTEM_PROMPT
|
301
305
|
|
302
306
|
@property
|
303
307
|
def default_interactive_system_prompt(self) -> str:
|
@@ -305,7 +309,7 @@ class LLMConfig:
|
|
305
309
|
return self._default_interactive_system_prompt
|
306
310
|
if CFG.LLM_INTERACTIVE_SYSTEM_PROMPT is not None:
|
307
311
|
return CFG.LLM_INTERACTIVE_SYSTEM_PROMPT
|
308
|
-
return
|
312
|
+
return _DEFAULT_INTERACTIVE_SYSTEM_PROMPT
|
309
313
|
|
310
314
|
@property
|
311
315
|
def default_persona(self) -> str:
|
@@ -313,7 +317,7 @@ class LLMConfig:
|
|
313
317
|
return self._default_persona
|
314
318
|
if CFG.LLM_PERSONA is not None:
|
315
319
|
return CFG.LLM_PERSONA
|
316
|
-
return
|
320
|
+
return _DEFAULT_PERSONA
|
317
321
|
|
318
322
|
@property
|
319
323
|
def default_special_instruction_prompt(self) -> str:
|
@@ -321,7 +325,7 @@ class LLMConfig:
|
|
321
325
|
return self._default_special_instruction_prompt
|
322
326
|
if CFG.LLM_SPECIAL_INSTRUCTION_PROMPT is not None:
|
323
327
|
return CFG.LLM_SPECIAL_INSTRUCTION_PROMPT
|
324
|
-
return
|
328
|
+
return _DEFAULT_SPECIAL_INSTRUCTION_PROMPT
|
325
329
|
|
326
330
|
@property
|
327
331
|
def default_summarization_prompt(self) -> str:
|
@@ -329,7 +333,7 @@ class LLMConfig:
|
|
329
333
|
return self._default_summarization_prompt
|
330
334
|
if CFG.LLM_SUMMARIZATION_PROMPT is not None:
|
331
335
|
return CFG.LLM_SUMMARIZATION_PROMPT
|
332
|
-
return
|
336
|
+
return _DEFAULT_SUMMARIZATION_PROMPT
|
333
337
|
|
334
338
|
@property
|
335
339
|
def default_context_enrichment_prompt(self) -> str:
|
@@ -337,7 +341,7 @@ class LLMConfig:
|
|
337
341
|
return self._default_context_enrichment_prompt
|
338
342
|
if CFG.LLM_CONTEXT_ENRICHMENT_PROMPT is not None:
|
339
343
|
return CFG.LLM_CONTEXT_ENRICHMENT_PROMPT
|
340
|
-
return
|
344
|
+
return _DEFAULT_CONTEXT_ENRICHMENT_PROMPT
|
341
345
|
|
342
346
|
@property
|
343
347
|
def default_model(self) -> "Model | str | None":
|
@@ -17,8 +17,8 @@ zrb/builtin/llm/previous-session.js,sha256=xMKZvJoAbrwiyHS0OoPrWuaKxWYLoyR5sgueP
|
|
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
|
19
19
|
zrb/builtin/llm/tool/cli.py,sha256=QqIil29dVOjbTxwb9Gib4KhlaJcOcto-OxEX5hHmA1s,1377
|
20
|
-
zrb/builtin/llm/tool/code.py,sha256=
|
21
|
-
zrb/builtin/llm/tool/file.py,sha256=
|
20
|
+
zrb/builtin/llm/tool/code.py,sha256=GRP_IZAkeL6RIlUm407BQRF992ES57pdzPaQdC5UsJU,8218
|
21
|
+
zrb/builtin/llm/tool/file.py,sha256=qoQh5C0RPlQcIoLJp_nT16-w3FAekj7YtIdtsjigARg,22290
|
22
22
|
zrb/builtin/llm/tool/rag.py,sha256=wB74JV7bxs0ec77b_09Z2lPjoR1WzPUvZbuXOdb9Q9g,9675
|
23
23
|
zrb/builtin/llm/tool/sub_agent.py,sha256=7Awa9dpXqtJAZhxyXaKeZv5oIE2N_OqXhAbNmsOG49Y,4951
|
24
24
|
zrb/builtin/llm/tool/web.py,sha256=gQlUsmYCJOFJtNjwpjK-xk13LMvrMSpSaFHXUTnIayQ,7090
|
@@ -217,8 +217,8 @@ zrb/callback/callback.py,sha256=PFhCqzfxdk6IAthmXcZ13DokT62xtBzJr_ciLw6I8Zg,4030
|
|
217
217
|
zrb/cmd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
218
218
|
zrb/cmd/cmd_result.py,sha256=L8bQJzWCpcYexIxHBNsXj2pT3BtLmWex0iJSMkvimOA,597
|
219
219
|
zrb/cmd/cmd_val.py,sha256=7Doowyg6BK3ISSGBLt-PmlhzaEkBjWWm51cED6fAUOQ,1014
|
220
|
-
zrb/config/config.py,sha256=
|
221
|
-
zrb/config/llm_config.py,sha256
|
220
|
+
zrb/config/config.py,sha256=UpVm_IFD_bSfGS-QJoRo86xV63eGIuIwWICMaUZgR00,15268
|
221
|
+
zrb/config/llm_config.py,sha256=-eQCD6A3rCpIrR6XtcEA-aeTX73FcyFTacXa_T0A-4o,21524
|
222
222
|
zrb/config/llm_rate_limitter.py,sha256=0U0qm4qgCWqBjohPdwANNUzLR3joJCFYr6oW6Xpccfo,4436
|
223
223
|
zrb/config/web_auth_config.py,sha256=_PXatQTYh2mX9H3HSYSQKp13zm1RlLyVIoeIr6KYMQ8,6279
|
224
224
|
zrb/content_transformer/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -391,7 +391,7 @@ zrb/util/todo.py,sha256=r9_KYF2-hLKMNjsp6AFK9zivykMrywd-kJ4bCwfdafI,19323
|
|
391
391
|
zrb/util/todo_model.py,sha256=0SJ8aLYfJAscDOk5JsH7pXP3h1rAG91VMCS20-c2Y6A,1576
|
392
392
|
zrb/xcom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
393
393
|
zrb/xcom/xcom.py,sha256=o79rxR9wphnShrcIushA0Qt71d_p3ZTxjNf7x9hJB78,1571
|
394
|
-
zrb-1.9.
|
395
|
-
zrb-1.9.
|
396
|
-
zrb-1.9.
|
397
|
-
zrb-1.9.
|
394
|
+
zrb-1.9.9.dist-info/METADATA,sha256=Zcc7Rl-rD3Viu68pG9hu2gNQtCbjAaRf41JodYCXm2A,9777
|
395
|
+
zrb-1.9.9.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
396
|
+
zrb-1.9.9.dist-info/entry_points.txt,sha256=-Pg3ElWPfnaSM-XvXqCxEAa-wfVI6BEgcs386s8C8v8,46
|
397
|
+
zrb-1.9.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|