auto-coder 0.1.212__tar.gz → 0.1.214__tar.gz
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.212 → auto_coder-0.1.214}/PKG-INFO +1 -1
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/PKG-INFO +1 -1
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/auto_coder.py +14 -3
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/chat_auto_coder.py +22 -47
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/chat_auto_coder_lang.py +4 -4
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_modification_ranker.py +17 -15
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/index/index.py +95 -33
- auto_coder-0.1.214/src/autocoder/version.py +1 -0
- auto_coder-0.1.212/src/autocoder/version.py +0 -1
- {auto_coder-0.1.212 → auto_coder-0.1.214}/LICENSE +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/README.md +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/setup.cfg +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/setup.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/SOURCES.txt +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/requires.txt +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/auto_demand_organizer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/auto_filegroup.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/auto_guess_query.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/auto_tool.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/coder.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/designer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/planner.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/agent/project_reader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/auto_coder_lang.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/auto_coder_rag.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/auto_coder_server.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/benchmark.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/chat/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/command_args.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/JupyterClient.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/ShellClient.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/anything2images.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/audio.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/buildin_tokenizer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/chunk_validation.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/cleaner.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_merge.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_merge_diff.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/command_completer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/command_generator.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/command_templates.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/const.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/git_utils.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/image_to_page.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/interpreter.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/llm_rerank.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/mcp_hub.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/mcp_server.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/mcp_tools.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/recall_validation.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/screenshots.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/search.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/search_replace.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/sys_prompt.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/text.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/types.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/data/tokenizer.json +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/db/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/db/store.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/action.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/plugins/action_translate.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/index/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/index/for_command.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/index/symbols_utils.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/lang.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/pyproject/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/api_server.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/cache/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/cache/base_cache.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/cache/simple_cache.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/doc_filter.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/document_retriever.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/long_context_rag.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/rag_config.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/rag_entry.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/raw_rag.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/simple_rag.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/stream_event/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/stream_event/event_writer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/stream_event/types.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/token_checker.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/token_counter.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/token_limiter.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/types.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/utils.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/rag/variable_holder.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/regexproject/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/tsproject/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/__init__.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/_markitdown.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/conversation_store.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/log_capture.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/multi_turn.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/operate_config_api.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/print_table.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/request_queue.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/rest.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/utils/tests.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_action_regex_project.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_chat_auto_coder.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_command_completer.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_planner.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_queue_communicate.py +0 -0
- {auto_coder-0.1.212 → auto_coder-0.1.214}/tests/test_symbols_utils.py +0 -0
|
@@ -295,9 +295,20 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
295
295
|
llm.setup_sub_client("code_model", code_model)
|
|
296
296
|
|
|
297
297
|
if args.generate_rerank_model:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
298
|
+
if "," in args.generate_rerank_model:
|
|
299
|
+
# Multiple rerank models specified
|
|
300
|
+
model_names = args.generate_rerank_model.split(",")
|
|
301
|
+
models = []
|
|
302
|
+
for _, model_name in enumerate(model_names):
|
|
303
|
+
rerank_model = byzerllm.ByzerLLM()
|
|
304
|
+
rerank_model.setup_default_model_name(model_name.strip())
|
|
305
|
+
models.append(rerank_model)
|
|
306
|
+
llm.setup_sub_client("generate_rerank_model", models)
|
|
307
|
+
else:
|
|
308
|
+
# Single rerank model
|
|
309
|
+
rerank_model = byzerllm.ByzerLLM()
|
|
310
|
+
rerank_model.setup_default_model_name(args.generate_rerank_model)
|
|
311
|
+
llm.setup_sub_client("generate_rerank_model", rerank_model)
|
|
301
312
|
|
|
302
313
|
if args.inference_model:
|
|
303
314
|
inference_model = byzerllm.ByzerLLM()
|
|
@@ -314,54 +314,29 @@ def initialize_system():
|
|
|
314
314
|
except subprocess.CalledProcessError:
|
|
315
315
|
print_status(get_message("model_error"), "error")
|
|
316
316
|
|
|
317
|
-
# If deepseek_chat is not available
|
|
318
|
-
print_status(get_message("model_not_available"), "warning")
|
|
319
|
-
choice = radiolist_dialog(
|
|
320
|
-
title=get_message("provider_selection"),
|
|
321
|
-
text=get_message("provider_selection"),
|
|
322
|
-
values=[
|
|
323
|
-
("1", "硅基流动(https://siliconflow.cn)"),
|
|
324
|
-
("2", "Deepseek官方(https://www.deepseek.com/)"),
|
|
325
|
-
],
|
|
326
|
-
).run()
|
|
327
|
-
|
|
328
|
-
if choice is None:
|
|
329
|
-
print_status(get_message("no_provider"), "error")
|
|
330
|
-
return
|
|
331
|
-
|
|
317
|
+
# If deepseek_chat is not available
|
|
318
|
+
print_status(get_message("model_not_available"), "warning")
|
|
332
319
|
api_key = prompt(HTML(f"<b>{get_message('enter_api_key')} </b>"))
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
"0.001",
|
|
354
|
-
"--gpus_per_worker",
|
|
355
|
-
"0",
|
|
356
|
-
"--worker_concurrency",
|
|
357
|
-
"1000",
|
|
358
|
-
"--num_workers",
|
|
359
|
-
"1",
|
|
360
|
-
"--infer_params",
|
|
361
|
-
f"saas.base_url=https://api.deepseek.com/v1 saas.api_key={api_key} saas.model=deepseek-chat",
|
|
362
|
-
"--model",
|
|
363
|
-
"deepseek_chat",
|
|
364
|
-
]
|
|
320
|
+
|
|
321
|
+
print_status(get_message("deploying_model").format("Deepseek官方"), "")
|
|
322
|
+
deploy_cmd = [
|
|
323
|
+
"byzerllm",
|
|
324
|
+
"deploy",
|
|
325
|
+
"--pretrained_model_type",
|
|
326
|
+
"saas/openai",
|
|
327
|
+
"--cpus_per_worker",
|
|
328
|
+
"0.001",
|
|
329
|
+
"--gpus_per_worker",
|
|
330
|
+
"0",
|
|
331
|
+
"--worker_concurrency",
|
|
332
|
+
"1000",
|
|
333
|
+
"--num_workers",
|
|
334
|
+
"1",
|
|
335
|
+
"--infer_params",
|
|
336
|
+
f"saas.base_url=https://api.deepseek.com/v1 saas.api_key={api_key} saas.model=deepseek-chat",
|
|
337
|
+
"--model",
|
|
338
|
+
"deepseek_chat",
|
|
339
|
+
]
|
|
365
340
|
|
|
366
341
|
try:
|
|
367
342
|
subprocess.run(deploy_cmd, check=True)
|
|
@@ -20,10 +20,10 @@ MESSAGES = {
|
|
|
20
20
|
"model_available": "deepseek_chat model is available.",
|
|
21
21
|
"model_timeout": "Command timed out. deepseek_chat model might not be available.",
|
|
22
22
|
"model_error": "Error occurred while checking deepseek_chat model.",
|
|
23
|
-
"model_not_available": "deepseek_chat model is not available.
|
|
23
|
+
"model_not_available": "deepseek_chat model is not available.",
|
|
24
24
|
"provider_selection": "Select a provider for deepseek_chat model:",
|
|
25
25
|
"no_provider": "No provider selected. Exiting initialization.",
|
|
26
|
-
"enter_api_key": "Please enter your API key
|
|
26
|
+
"enter_api_key": "Please enter your API key(https://www.deepseek.com/): ",
|
|
27
27
|
"deploying_model": "Deploying deepseek_chat model using {}...",
|
|
28
28
|
"deploy_complete": "Deployment completed.",
|
|
29
29
|
"deploy_fail": "Deployment failed. Please try again or deploy manually.",
|
|
@@ -86,10 +86,10 @@ MESSAGES = {
|
|
|
86
86
|
"model_available": "deepseek_chat模型可用。",
|
|
87
87
|
"model_timeout": "命令超时。deepseek_chat模型可能不可用。",
|
|
88
88
|
"model_error": "检查deepseek_chat模型时出错。",
|
|
89
|
-
"model_not_available": "deepseek_chat
|
|
89
|
+
"model_not_available": "deepseek_chat模型不可用。",
|
|
90
90
|
"provider_selection": "为deepseek_chat模型选择一个提供商:",
|
|
91
91
|
"no_provider": "未选择提供商。退出初始化。",
|
|
92
|
-
"enter_api_key": "请输入您的API
|
|
92
|
+
"enter_api_key": "请输入您的API密钥(https://www.deepseek.com/):",
|
|
93
93
|
"deploying_model": "正在使用{}部署deepseek_chat模型...",
|
|
94
94
|
"deploy_complete": "部署完成。",
|
|
95
95
|
"deploy_fail": "部署失败。请重试或手动部署。",
|
|
@@ -14,10 +14,9 @@ class CodeModificationRanker:
|
|
|
14
14
|
def __init__(self, llm: byzerllm.ByzerLLM, args: AutoCoderArgs):
|
|
15
15
|
self.llm = llm
|
|
16
16
|
self.args = args
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
self.rerank_llm = self.llm
|
|
17
|
+
self.llms = self.llm.get_sub_client("generate_rerank_model") or [self.llm]
|
|
18
|
+
if not isinstance(self.llms, list):
|
|
19
|
+
self.llms = [self.llms]
|
|
21
20
|
|
|
22
21
|
@byzerllm.prompt()
|
|
23
22
|
def _rank_modifications(self, s:CodeGenerateResult) -> str:
|
|
@@ -63,17 +62,20 @@ class CodeModificationRanker:
|
|
|
63
62
|
|
|
64
63
|
logger.info(f"Start ranking {len(generate_result.contents)} candidates")
|
|
65
64
|
generate_times = self.args.generate_times_same_model
|
|
66
|
-
|
|
65
|
+
total_tasks = len(self.llms) * generate_times
|
|
67
66
|
try:
|
|
68
|
-
# Create a thread pool with generate_times workers
|
|
69
|
-
with ThreadPoolExecutor(max_workers=
|
|
70
|
-
# Submit tasks
|
|
71
|
-
futures = [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
# Create a thread pool with (number of models * generate_times) workers
|
|
68
|
+
with ThreadPoolExecutor(max_workers=total_tasks) as executor:
|
|
69
|
+
# Submit tasks for each model and generate_times
|
|
70
|
+
futures = []
|
|
71
|
+
for llm in self.llms:
|
|
72
|
+
for _ in range(generate_times):
|
|
73
|
+
futures.append(
|
|
74
|
+
executor.submit(
|
|
75
|
+
self._rank_modifications.with_llm(llm).with_return_type(RankResult).run,
|
|
76
|
+
generate_result
|
|
77
|
+
)
|
|
78
|
+
)
|
|
77
79
|
|
|
78
80
|
# Collect all results
|
|
79
81
|
results = []
|
|
@@ -104,7 +106,7 @@ class CodeModificationRanker:
|
|
|
104
106
|
elapsed = time.time() - start_time
|
|
105
107
|
# Format scores for logging
|
|
106
108
|
score_details = ", ".join([f"candidate {i}: {candidate_scores[i]:.2f}" for i in sorted_candidates])
|
|
107
|
-
logger.info(f"Ranking completed in {elapsed:.2f}s, best candidate index: {sorted_candidates[0]}, scores: {score_details}")
|
|
109
|
+
logger.info(f"Ranking completed in {elapsed:.2f}s, total voters: {total_tasks}, best candidate index: {sorted_candidates[0]}, scores: {score_details}")
|
|
108
110
|
|
|
109
111
|
rerank_contents = [generate_result.contents[i] for i in sorted_candidates]
|
|
110
112
|
rerank_conversations = [generate_result.conversations[i] for i in sorted_candidates]
|
|
@@ -578,8 +578,18 @@ def build_index_and_filter_files(
|
|
|
578
578
|
"indexed_files": 0,
|
|
579
579
|
"level1_filtered": 0,
|
|
580
580
|
"level2_filtered": 0,
|
|
581
|
+
"verified_files": 0,
|
|
581
582
|
"final_files": 0,
|
|
582
|
-
"timings": {
|
|
583
|
+
"timings": {
|
|
584
|
+
"process_tagged_sources": 0.0,
|
|
585
|
+
"build_index": 0.0,
|
|
586
|
+
"level1_filter": 0.0,
|
|
587
|
+
"level2_filter": 0.0,
|
|
588
|
+
"relevance_verification": 0.0,
|
|
589
|
+
"file_selection": 0.0,
|
|
590
|
+
"prepare_output": 0.0,
|
|
591
|
+
"total": 0.0
|
|
592
|
+
}
|
|
583
593
|
}
|
|
584
594
|
|
|
585
595
|
def get_file_path(file_path):
|
|
@@ -597,7 +607,8 @@ def build_index_and_filter_files(
|
|
|
597
607
|
final_files[get_file_path(source.module_name)] = TargetFile(
|
|
598
608
|
file_path=source.module_name, reason="Rest/Rag/Search"
|
|
599
609
|
)
|
|
600
|
-
|
|
610
|
+
phase_end = time.monotonic()
|
|
611
|
+
stats["timings"]["process_tagged_sources"] = phase_end - phase_start
|
|
601
612
|
|
|
602
613
|
if not args.skip_build_index and llm:
|
|
603
614
|
# Phase 2: Build index
|
|
@@ -615,7 +626,8 @@ def build_index_and_filter_files(
|
|
|
615
626
|
index_manager = IndexManager(llm=llm, sources=sources, args=args)
|
|
616
627
|
index_data = index_manager.build_index()
|
|
617
628
|
stats["indexed_files"] = len(index_data) if index_data else 0
|
|
618
|
-
|
|
629
|
+
phase_end = time.monotonic()
|
|
630
|
+
stats["timings"]["build_index"] = phase_end - phase_start
|
|
619
631
|
|
|
620
632
|
if args.request_id and not args.skip_events:
|
|
621
633
|
queue_communicate.send_event(
|
|
@@ -650,7 +662,8 @@ def build_index_and_filter_files(
|
|
|
650
662
|
file_path = file.file_path.strip()
|
|
651
663
|
final_files[get_file_path(file_path)] = file
|
|
652
664
|
stats["level1_filtered"] = len(target_files.file_list)
|
|
653
|
-
|
|
665
|
+
phase_end = time.monotonic()
|
|
666
|
+
stats["timings"]["level1_filter"] = phase_end - phase_start
|
|
654
667
|
|
|
655
668
|
# Phase 4: Level 2 filtering - Related files
|
|
656
669
|
if target_files is not None and args.index_filter_level >= 2:
|
|
@@ -673,8 +686,8 @@ def build_index_and_filter_files(
|
|
|
673
686
|
file_path = file.file_path.strip()
|
|
674
687
|
final_files[get_file_path(file_path)] = file
|
|
675
688
|
stats["level2_filtered"] = len(related_files.file_list)
|
|
676
|
-
|
|
677
|
-
|
|
689
|
+
phase_end = time.monotonic()
|
|
690
|
+
stats["timings"]["level2_filter"] = phase_end - phase_start
|
|
678
691
|
|
|
679
692
|
if not final_files:
|
|
680
693
|
logger.warning("No related files found, using all files")
|
|
@@ -689,6 +702,28 @@ def build_index_and_filter_files(
|
|
|
689
702
|
phase_start = time.monotonic()
|
|
690
703
|
verified_files = {}
|
|
691
704
|
temp_files = list(final_files.values())
|
|
705
|
+
verification_results = []
|
|
706
|
+
|
|
707
|
+
def print_verification_results(results):
|
|
708
|
+
from rich.table import Table
|
|
709
|
+
from rich.console import Console
|
|
710
|
+
|
|
711
|
+
console = Console()
|
|
712
|
+
table = Table(title="File Relevance Verification Results", show_header=True, header_style="bold magenta")
|
|
713
|
+
table.add_column("File Path", style="cyan", no_wrap=True)
|
|
714
|
+
table.add_column("Score", justify="right", style="green")
|
|
715
|
+
table.add_column("Status", style="yellow")
|
|
716
|
+
table.add_column("Reason/Error")
|
|
717
|
+
|
|
718
|
+
for file_path, score, status, reason in results:
|
|
719
|
+
table.add_row(
|
|
720
|
+
file_path,
|
|
721
|
+
str(score) if score is not None else "N/A",
|
|
722
|
+
status,
|
|
723
|
+
reason
|
|
724
|
+
)
|
|
725
|
+
|
|
726
|
+
console.print(table)
|
|
692
727
|
|
|
693
728
|
def verify_single_file(file: TargetFile):
|
|
694
729
|
for source in sources:
|
|
@@ -700,13 +735,20 @@ def build_index_and_filter_files(
|
|
|
700
735
|
query=args.query
|
|
701
736
|
)
|
|
702
737
|
if result.relevant_score >= args.verify_file_relevance_score:
|
|
703
|
-
|
|
738
|
+
verified_files[file.file_path] = TargetFile(
|
|
704
739
|
file_path=file.file_path,
|
|
705
740
|
reason=f"Score:{result.relevant_score}, {result.reason}"
|
|
706
741
|
)
|
|
742
|
+
return file.file_path, result.relevant_score, "PASS", result.reason
|
|
743
|
+
else:
|
|
744
|
+
return file.file_path, result.relevant_score, "FAIL", result.reason
|
|
707
745
|
except Exception as e:
|
|
708
|
-
|
|
709
|
-
|
|
746
|
+
error_msg = str(e)
|
|
747
|
+
verified_files[file.file_path] = TargetFile(
|
|
748
|
+
file_path=file.file_path,
|
|
749
|
+
reason=f"Verification failed: {error_msg}"
|
|
750
|
+
)
|
|
751
|
+
return file.file_path, None, "ERROR", error_msg
|
|
710
752
|
return None
|
|
711
753
|
|
|
712
754
|
with ThreadPoolExecutor(max_workers=args.index_filter_workers) as executor:
|
|
@@ -715,15 +757,18 @@ def build_index_and_filter_files(
|
|
|
715
757
|
for future in as_completed(futures):
|
|
716
758
|
result = future.result()
|
|
717
759
|
if result:
|
|
718
|
-
|
|
719
|
-
verified_files[file_path] = target_file
|
|
760
|
+
verification_results.append(result)
|
|
720
761
|
time.sleep(args.anti_quota_limit)
|
|
721
762
|
|
|
763
|
+
# Print verification results in a table
|
|
764
|
+
print_verification_results(verification_results)
|
|
765
|
+
|
|
722
766
|
stats["verified_files"] = len(verified_files)
|
|
723
|
-
|
|
724
|
-
|
|
767
|
+
phase_end = time.monotonic()
|
|
768
|
+
stats["timings"]["relevance_verification"] = phase_end - phase_start
|
|
725
769
|
|
|
726
|
-
|
|
770
|
+
# Keep all files, not just verified ones
|
|
771
|
+
final_files = verified_files
|
|
727
772
|
|
|
728
773
|
def display_table_and_get_selections(data):
|
|
729
774
|
from prompt_toolkit.shortcuts import checkboxlist_dialog
|
|
@@ -755,7 +800,7 @@ def build_index_and_filter_files(
|
|
|
755
800
|
console = Console()
|
|
756
801
|
|
|
757
802
|
table = Table(
|
|
758
|
-
title="
|
|
803
|
+
title="Files Used as Context",
|
|
759
804
|
show_header=True,
|
|
760
805
|
header_style="bold magenta",
|
|
761
806
|
)
|
|
@@ -802,7 +847,8 @@ def build_index_and_filter_files(
|
|
|
802
847
|
if args.index_filter_file_num > 0:
|
|
803
848
|
final_filenames = final_filenames[: args.index_filter_file_num]
|
|
804
849
|
|
|
805
|
-
|
|
850
|
+
phase_end = time.monotonic()
|
|
851
|
+
stats["timings"]["file_selection"] = phase_end - phase_start
|
|
806
852
|
|
|
807
853
|
# Phase 7: Display results and prepare output
|
|
808
854
|
logger.info("Phase 7: Preparing final output...")
|
|
@@ -848,26 +894,42 @@ def build_index_and_filter_files(
|
|
|
848
894
|
)
|
|
849
895
|
|
|
850
896
|
stats["final_files"] = len(depulicated_sources)
|
|
851
|
-
|
|
897
|
+
phase_end = time.monotonic()
|
|
898
|
+
stats["timings"]["prepare_output"] = phase_end - phase_start
|
|
852
899
|
|
|
853
900
|
# Calculate total time and print summary
|
|
854
|
-
|
|
901
|
+
total_end_time = time.monotonic()
|
|
902
|
+
total_time = total_end_time - total_start_time
|
|
855
903
|
stats["timings"]["total"] = total_time
|
|
904
|
+
|
|
905
|
+
# Calculate total filter time
|
|
906
|
+
total_filter_time = (
|
|
907
|
+
stats["timings"]["level1_filter"] +
|
|
908
|
+
stats["timings"]["level2_filter"] +
|
|
909
|
+
stats["timings"]["relevance_verification"]
|
|
910
|
+
)
|
|
856
911
|
|
|
857
|
-
# Print final statistics
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
912
|
+
# Print final statistics in a more structured way
|
|
913
|
+
summary = f"""
|
|
914
|
+
=== Indexing and Filtering Summary ===
|
|
915
|
+
• Total files scanned: {stats['total_files']}
|
|
916
|
+
• Files indexed: {stats['indexed_files']}
|
|
917
|
+
• Files filtered:
|
|
918
|
+
- Level 1 (query-based): {stats['level1_filtered']}
|
|
919
|
+
- Level 2 (related files): {stats['level2_filtered']}
|
|
920
|
+
- Relevance verified: {stats.get('verified_files', 0)}
|
|
921
|
+
• Final files selected: {stats['final_files']}
|
|
922
|
+
|
|
923
|
+
=== Time Breakdown ===
|
|
924
|
+
• Index build: {stats['timings'].get('build_index', 0):.2f}s
|
|
925
|
+
• Level 1 filter: {stats['timings'].get('level1_filter', 0):.2f}s
|
|
926
|
+
• Level 2 filter: {stats['timings'].get('level2_filter', 0):.2f}s
|
|
927
|
+
• Relevance check: {stats['timings'].get('relevance_verification', 0):.2f}s
|
|
928
|
+
• File selection: {stats['timings'].get('file_selection', 0):.2f}s
|
|
929
|
+
• Total time: {total_time:.2f}s
|
|
930
|
+
====================================
|
|
931
|
+
"""
|
|
932
|
+
logger.info(summary)
|
|
871
933
|
|
|
872
934
|
if args.request_id and not args.skip_events:
|
|
873
935
|
queue_communicate.send_event(
|
|
@@ -876,7 +938,7 @@ def build_index_and_filter_files(
|
|
|
876
938
|
event_type=CommunicateEventType.CODE_INDEX_FILTER_END.value,
|
|
877
939
|
data=json.dumps({
|
|
878
940
|
"filtered_files": stats["final_files"],
|
|
879
|
-
"filter_time":
|
|
941
|
+
"filter_time": total_filter_time
|
|
880
942
|
})
|
|
881
943
|
)
|
|
882
944
|
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.214"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.212"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate_editblock.py
RENAMED
|
File without changes
|
{auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_generate_strict_diff.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/common/code_auto_merge_strict_diff.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{auto_coder-0.1.212 → auto_coder-0.1.214}/src/autocoder/dispacher/actions/plugins/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|