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.

@@ -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(
@@ -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
- f
10
- for f in os.listdir(actions_dir)
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
- new_seq = str(max_seq + 1).zfill(3)
20
- prev_files = [f for f in action_files if int(f[:3]) < int(new_seq)]
12
+ def get_old_seq(name):
13
+ return int(name.split("_")[0])
21
14
 
22
- if not prev_files:
23
- return None
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.202"
1
+ __version__ = "0.1.204"