auto-coder 0.1.202__py3-none-any.whl → 0.1.204__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 auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/METADATA +1 -1
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/RECORD +23 -23
- autocoder/agent/planner.py +8 -6
- autocoder/auto_coder.py +16 -12
- autocoder/auto_coder_rag.py +34 -0
- autocoder/chat_auto_coder.py +190 -72
- autocoder/chat_auto_coder_lang.py +7 -3
- autocoder/command_args.py +1 -0
- autocoder/common/code_auto_generate.py +1 -1
- autocoder/common/code_auto_generate_diff.py +1 -1
- autocoder/common/code_auto_generate_editblock.py +1 -1
- autocoder/common/code_auto_generate_strict_diff.py +1 -1
- autocoder/common/git_utils.py +434 -0
- autocoder/common/sys_prompt.py +1 -1
- autocoder/rag/doc_filter.py +27 -9
- autocoder/rag/long_context_rag.py +11 -5
- autocoder/rag/token_limiter.py +7 -3
- autocoder/utils/__init__.py +6 -16
- autocoder/version.py +1 -1
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/top_level.txt +0 -0
autocoder/rag/token_limiter.py
CHANGED
|
@@ -16,7 +16,7 @@ class TokenLimiter:
|
|
|
16
16
|
full_text_limit: int,
|
|
17
17
|
segment_limit: int,
|
|
18
18
|
buff_limit: int,
|
|
19
|
-
llm,
|
|
19
|
+
llm:ByzerLLM,
|
|
20
20
|
disable_segment_reorder: bool,
|
|
21
21
|
):
|
|
22
22
|
self.count_tokens = count_tokens
|
|
@@ -24,6 +24,10 @@ class TokenLimiter:
|
|
|
24
24
|
self.segment_limit = segment_limit
|
|
25
25
|
self.buff_limit = buff_limit
|
|
26
26
|
self.llm = llm
|
|
27
|
+
if self.llm.get_sub_client("chunk_model"):
|
|
28
|
+
self.chunk_llm = self.llm.get_sub_client("chunk_model")
|
|
29
|
+
else:
|
|
30
|
+
self.chunk_llm = self.llm
|
|
27
31
|
self.first_round_full_docs = []
|
|
28
32
|
self.second_round_extracted_docs = []
|
|
29
33
|
self.sencond_round_time = 0
|
|
@@ -219,10 +223,10 @@ class TokenLimiter:
|
|
|
219
223
|
source_code_lines = doc.source_code.split("\n")
|
|
220
224
|
for idx, line in enumerate(source_code_lines):
|
|
221
225
|
source_code_with_line_number += f"{idx+1} {line}\n"
|
|
222
|
-
|
|
226
|
+
|
|
223
227
|
llm = ByzerLLM()
|
|
224
|
-
llm.setup_default_model_name(self.llm.default_model_name)
|
|
225
228
|
llm.skip_nontext_check = True
|
|
229
|
+
llm.setup_default_model_name(self.chunk_llm.default_model_name)
|
|
226
230
|
|
|
227
231
|
extracted_info = (
|
|
228
232
|
self.extract_relevance_range_from_docs_with_conversation.options(
|
autocoder/utils/__init__.py
CHANGED
|
@@ -6,24 +6,14 @@ from loguru import logger
|
|
|
6
6
|
|
|
7
7
|
def get_last_yaml_file(actions_dir:str)->Optional[str]:
|
|
8
8
|
action_files = [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if f[:3].isdigit() and f.endswith(".yml")
|
|
12
|
-
]
|
|
13
|
-
if not action_files:
|
|
14
|
-
max_seq = 0
|
|
15
|
-
else:
|
|
16
|
-
seqs = [int(f[:3]) for f in action_files]
|
|
17
|
-
max_seq = max(seqs)
|
|
9
|
+
f for f in os.listdir(actions_dir) if f[:3].isdigit() and "_" in f and f.endswith(".yml")
|
|
10
|
+
]
|
|
18
11
|
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
def get_old_seq(name):
|
|
13
|
+
return int(name.split("_")[0])
|
|
21
14
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
else:
|
|
25
|
-
prev_file = sorted(prev_files)[-1] # 取序号最大的文件
|
|
26
|
-
return prev_file
|
|
15
|
+
sorted_action_files = sorted(action_files, key=get_old_seq)
|
|
16
|
+
return sorted_action_files[-1] if sorted_action_files else None
|
|
27
17
|
|
|
28
18
|
def open_yaml_file_in_editor(new_file:str):
|
|
29
19
|
try:
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.204"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|