auto-coder 0.1.242__tar.gz → 0.1.244__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.242 → auto_coder-0.1.244}/PKG-INFO +2 -2
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/PKG-INFO +2 -2
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/requires.txt +1 -1
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/auto_coder.py +18 -1
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/chat_auto_coder.py +56 -9
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/chat_auto_coder_lang.py +13 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/__init__.py +1 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/auto_coder_lang.py +25 -7
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_merge_editblock.py +2 -2
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_modification_ranker.py +3 -3
- auto_coder-0.1.244/src/autocoder/common/files.py +58 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/printer.py +2 -2
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/utils_code_auto_generate.py +7 -4
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/index.py +1 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/models.py +21 -21
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/suffixproject/__init__.py +2 -3
- auto_coder-0.1.244/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +257 -0
- auto_coder-0.1.244/src/autocoder/utils/rest.py +142 -0
- auto_coder-0.1.244/src/autocoder/version.py +1 -0
- auto_coder-0.1.242/src/autocoder/common/files.py +0 -26
- auto_coder-0.1.242/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +0 -120
- auto_coder-0.1.242/src/autocoder/utils/rest.py +0 -190
- auto_coder-0.1.242/src/autocoder/version.py +0 -1
- {auto_coder-0.1.242 → auto_coder-0.1.244}/LICENSE +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/README.md +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/setup.cfg +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/setup.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/SOURCES.txt +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/auto_demand_organizer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/auto_filegroup.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/auto_guess_query.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/auto_tool.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/coder.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/designer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/planner.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/agent/project_reader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/auto_coder_rag.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/auto_coder_rag_client_mcp.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/auto_coder_rag_mcp.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/auto_coder_server.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/benchmark.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/chat/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/command_args.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/JupyterClient.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/ShellClient.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/anything2images.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/anything2img.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/audio.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/buildin_tokenizer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/chunk_validation.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/cleaner.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_merge.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_merge_diff.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/command_completer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/command_generator.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/command_templates.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/const.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/git_utils.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/image_to_page.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/interpreter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/llm_rerank.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/mcp_hub.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/mcp_server.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/mcp_servers/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/mcp_tools.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/memory_manager.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/recall_validation.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/screenshots.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/search.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/search_replace.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/sys_prompt.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/text.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/common/types.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/data/tokenizer.json +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/db/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/db/store.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/action.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/dispacher/actions/plugins/action_translate.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/entry.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/filter/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/filter/normal_filter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/filter/quick_filter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/for_command.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/symbols_utils.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/index/types.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/lang.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/pyproject/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/api_server.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/cache/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/cache/base_cache.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/cache/simple_cache.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/doc_filter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/document_retriever.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/long_context_rag.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/rag_config.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/rag_entry.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/raw_rag.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/simple_rag.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/stream_event/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/stream_event/event_writer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/stream_event/types.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/token_checker.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/token_counter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/token_limiter.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/types.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/utils.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/rag/variable_holder.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/regexproject/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/tsproject/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/_markitdown.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/chat_auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/conversation_store.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/llms.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/log_capture.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/multi_turn.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/operate_config_api.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/print_table.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/request_queue.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/tests.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/src/autocoder/utils/types.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_action_regex_project.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_chat_auto_coder.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_command_completer.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_planner.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_queue_communicate.py +0 -0
- {auto_coder-0.1.242 → auto_coder-0.1.244}/tests/test_symbols_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.244
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
|
|
|
26
26
|
Requires-Dist: jupyter_client
|
|
27
27
|
Requires-Dist: prompt-toolkit
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
|
-
Requires-Dist: byzerllm[saas]>=0.1.
|
|
29
|
+
Requires-Dist: byzerllm[saas]>=0.1.160
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff_match_patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: auto-coder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.244
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
|
|
|
26
26
|
Requires-Dist: jupyter_client
|
|
27
27
|
Requires-Dist: prompt-toolkit
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
|
-
Requires-Dist: byzerllm[saas]>=0.1.
|
|
29
|
+
Requires-Dist: byzerllm[saas]>=0.1.160
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff_match_patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -692,6 +692,23 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
692
692
|
)
|
|
693
693
|
llm.setup_sub_client("vl_model", vl_model)
|
|
694
694
|
|
|
695
|
+
if args.index_model:
|
|
696
|
+
model_name = args.index_model.strip()
|
|
697
|
+
model_info = models_module.get_model_by_name(model_name)
|
|
698
|
+
index_model = byzerllm.SimpleByzerLLM(default_model_name=model_name)
|
|
699
|
+
index_model.deploy(
|
|
700
|
+
model_path="",
|
|
701
|
+
pretrained_model_type="saas/openai",
|
|
702
|
+
udf_name=model_name,
|
|
703
|
+
infer_params={
|
|
704
|
+
"saas.base_url": model_info["base_url"],
|
|
705
|
+
"saas.api_key": model_info["api_key"],
|
|
706
|
+
"saas.model": model_info["model_name"],
|
|
707
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
708
|
+
}
|
|
709
|
+
)
|
|
710
|
+
llm.setup_sub_client("index_model", index_model)
|
|
711
|
+
|
|
695
712
|
if args.sd_model:
|
|
696
713
|
model_name = args.sd_model.strip()
|
|
697
714
|
model_info = models_module.get_model_by_name(model_name)
|
|
@@ -1112,7 +1129,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1112
1129
|
json.dump(chat_history, f, ensure_ascii=False)
|
|
1113
1130
|
console.print(
|
|
1114
1131
|
Panel(
|
|
1115
|
-
"
|
|
1132
|
+
get_message("new_session_started"),
|
|
1116
1133
|
title="Session Status",
|
|
1117
1134
|
expand=False,
|
|
1118
1135
|
border_style="green",
|
|
@@ -1002,6 +1002,51 @@ def load_memory():
|
|
|
1002
1002
|
completer.update_current_files(memory["current_files"]["files"])
|
|
1003
1003
|
|
|
1004
1004
|
|
|
1005
|
+
def print_conf(content:Dict[str,Any]):
|
|
1006
|
+
"""Display configuration dictionary in a Rich table format with enhanced visual styling.
|
|
1007
|
+
|
|
1008
|
+
Args:
|
|
1009
|
+
conf (Dict[str, Any]): Configuration dictionary to display
|
|
1010
|
+
"""
|
|
1011
|
+
console = Console()
|
|
1012
|
+
|
|
1013
|
+
# Create a styled table with rounded borders
|
|
1014
|
+
table = Table(
|
|
1015
|
+
show_header=True,
|
|
1016
|
+
header_style="bold magenta",
|
|
1017
|
+
title=get_message("conf_title"),
|
|
1018
|
+
title_style="bold blue",
|
|
1019
|
+
border_style="blue",
|
|
1020
|
+
show_lines=True
|
|
1021
|
+
)
|
|
1022
|
+
|
|
1023
|
+
# Add columns with explicit width and alignment
|
|
1024
|
+
table.add_column(get_message("conf_key"), style="cyan", justify="right", width=30, no_wrap=False)
|
|
1025
|
+
table.add_column(get_message("conf_value"), style="green", justify="left", width=50, no_wrap=False)
|
|
1026
|
+
|
|
1027
|
+
# Sort keys for consistent display
|
|
1028
|
+
for key in sorted(content.keys()):
|
|
1029
|
+
value = content[key]
|
|
1030
|
+
# Format value based on type
|
|
1031
|
+
if isinstance(value, (dict, list)):
|
|
1032
|
+
formatted_value = Text(json.dumps(value, indent=2), style="yellow")
|
|
1033
|
+
elif isinstance(value, bool):
|
|
1034
|
+
formatted_value = Text(str(value), style="bright_green" if value else "red")
|
|
1035
|
+
elif isinstance(value, (int, float)):
|
|
1036
|
+
formatted_value = Text(str(value), style="bright_cyan")
|
|
1037
|
+
else:
|
|
1038
|
+
formatted_value = Text(str(value), style="green")
|
|
1039
|
+
|
|
1040
|
+
table.add_row(str(key), formatted_value)
|
|
1041
|
+
|
|
1042
|
+
# Add padding and print with a panel
|
|
1043
|
+
console.print(Panel(
|
|
1044
|
+
table,
|
|
1045
|
+
padding=(1, 2),
|
|
1046
|
+
subtitle=f"[italic]{get_message('conf_subtitle')}[/italic]",
|
|
1047
|
+
border_style="blue"
|
|
1048
|
+
))
|
|
1049
|
+
|
|
1005
1050
|
def revert():
|
|
1006
1051
|
last_yaml_file = get_last_yaml_file("actions")
|
|
1007
1052
|
if last_yaml_file:
|
|
@@ -1560,8 +1605,8 @@ def code_next(query: str):
|
|
|
1560
1605
|
if os.path.exists(temp_yaml):
|
|
1561
1606
|
os.remove(temp_yaml)
|
|
1562
1607
|
|
|
1563
|
-
|
|
1564
|
-
|
|
1608
|
+
product_mode = conf.get("product_mode", "lite")
|
|
1609
|
+
llm = get_single_llm(args.chat_model or args.model, product_mode=product_mode)
|
|
1565
1610
|
|
|
1566
1611
|
auto_guesser = AutoGuessQuery(
|
|
1567
1612
|
llm=llm, project_dir=os.getcwd(), skip_diff=True)
|
|
@@ -2123,6 +2168,11 @@ def manage_models(params, query: str):
|
|
|
2123
2168
|
if "/add" in query:
|
|
2124
2169
|
subcmd = "/add"
|
|
2125
2170
|
query = query.replace("/add", "", 1).strip()
|
|
2171
|
+
|
|
2172
|
+
# alias to /add
|
|
2173
|
+
if "/activate" in query:
|
|
2174
|
+
subcmd = "/add"
|
|
2175
|
+
query = query.replace("/activate", "", 1).strip()
|
|
2126
2176
|
|
|
2127
2177
|
if "/remove" in query:
|
|
2128
2178
|
subcmd = "/remove"
|
|
@@ -2141,7 +2191,7 @@ def manage_models(params, query: str):
|
|
|
2141
2191
|
)
|
|
2142
2192
|
table.add_column("Name", style="cyan", width=40, no_wrap=False)
|
|
2143
2193
|
table.add_column("Model Name", style="magenta", width=30, overflow="fold")
|
|
2144
|
-
table.add_column("
|
|
2194
|
+
table.add_column("Base URL", style="white", width=50, overflow="fold")
|
|
2145
2195
|
for m in models_data:
|
|
2146
2196
|
# Check if api_key_path exists and file exists
|
|
2147
2197
|
api_key_path = m.get("api_key_path", "")
|
|
@@ -2154,7 +2204,7 @@ def manage_models(params, query: str):
|
|
|
2154
2204
|
table.add_row(
|
|
2155
2205
|
name,
|
|
2156
2206
|
m.get("model_name", ""),
|
|
2157
|
-
m.get("
|
|
2207
|
+
m.get("base_url", "")
|
|
2158
2208
|
)
|
|
2159
2209
|
console.print(table)
|
|
2160
2210
|
else:
|
|
@@ -2366,10 +2416,7 @@ def execute_shell_command(command: str):
|
|
|
2366
2416
|
if process.returncode != 0:
|
|
2367
2417
|
console.print(
|
|
2368
2418
|
f"[bold red]Command failed with return code {process.returncode}[/bold red]"
|
|
2369
|
-
)
|
|
2370
|
-
else:
|
|
2371
|
-
console.print(
|
|
2372
|
-
"[bold green]Command completed successfully[/bold green]")
|
|
2419
|
+
)
|
|
2373
2420
|
|
|
2374
2421
|
except FileNotFoundError:
|
|
2375
2422
|
console.print(
|
|
@@ -2705,7 +2752,7 @@ def main():
|
|
|
2705
2752
|
elif user_input.startswith("/conf"):
|
|
2706
2753
|
conf = user_input[len("/conf"):].strip()
|
|
2707
2754
|
if not conf:
|
|
2708
|
-
|
|
2755
|
+
print_conf(memory["conf"])
|
|
2709
2756
|
else:
|
|
2710
2757
|
configure(conf)
|
|
2711
2758
|
elif user_input.startswith("/revert"):
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import locale
|
|
2
|
+
from byzerllm.utils import format_str_jinja2
|
|
2
3
|
|
|
3
4
|
MESSAGES = {
|
|
4
5
|
"en": {
|
|
@@ -75,6 +76,10 @@ MESSAGES = {
|
|
|
75
76
|
"shell_desc": "Execute a shell command",
|
|
76
77
|
"voice_input_desc": "Convert voice input to text",
|
|
77
78
|
"mode_desc": "Switch input mode",
|
|
79
|
+
"conf_key": "Key",
|
|
80
|
+
"conf_value": "Value",
|
|
81
|
+
"conf_title": "Configuration Settings",
|
|
82
|
+
"conf_subtitle": "Use /conf <key>:<value> to modify these settings",
|
|
78
83
|
"lib_desc": "Manage libraries",
|
|
79
84
|
"exit_desc": "Exit the program",
|
|
80
85
|
"design_desc": "Generate SVG image based on the provided description",
|
|
@@ -187,6 +192,10 @@ MESSAGES = {
|
|
|
187
192
|
"design_desc": "根据需求设计SVG图片",
|
|
188
193
|
"commit_desc": "根据用户人工修改的代码自动生成yaml文件并提交更改",
|
|
189
194
|
"models_desc": "管理模型配置,仅在lite模式下可用",
|
|
195
|
+
"conf_key": "键",
|
|
196
|
+
"conf_value": "值",
|
|
197
|
+
"conf_title": "配置设置",
|
|
198
|
+
"conf_subtitle": "使用 /conf <key>:<value> 修改这些设置",
|
|
190
199
|
"models_usage": "用法: /models /list|/add|/add_model|/remove ...",
|
|
191
200
|
"models_added": "成功添加/更新模型 '{{name}}'。",
|
|
192
201
|
"models_add_failed": "添加模型 '{{name}}' 失败。在默认模型中未找到该模型。",
|
|
@@ -228,3 +237,7 @@ def get_system_language():
|
|
|
228
237
|
def get_message(key):
|
|
229
238
|
lang = get_system_language()
|
|
230
239
|
return MESSAGES.get(lang, MESSAGES['en']).get(key, MESSAGES['en'][key])
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
def get_message_with_format(msg_key: str, **kwargs):
|
|
243
|
+
return format_str_jinja2(get_message(msg_key), **kwargs)
|
|
@@ -350,6 +350,7 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
350
350
|
skip_events: Optional[bool] = False
|
|
351
351
|
data_cells_max_num: Optional[int] = 2000
|
|
352
352
|
generate_times_same_model: Optional[int] = 1
|
|
353
|
+
rank_times_same_model: Optional[int] = 1
|
|
353
354
|
|
|
354
355
|
action: List[str] = []
|
|
355
356
|
enable_global_memory: Optional[bool] = True
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import locale
|
|
2
|
+
from byzerllm.utils import format_str_jinja2
|
|
2
3
|
|
|
3
4
|
MESSAGES = {
|
|
4
5
|
"en": {
|
|
6
|
+
"model_not_found": "Model {{model_name}} not found",
|
|
7
|
+
"new_session_started": "New session started. Previous chat history has been archived.",
|
|
5
8
|
"memory_save_success": "✅ Saved to your memory",
|
|
9
|
+
"file_decode_error": "Failed to decode file: {{file_path}}. Tried encodings: {{encodings}}",
|
|
10
|
+
"file_write_error": "Failed to write file: {{file_path}}. Error: {{error}}",
|
|
6
11
|
"index_file_too_large": "⚠️ File {{ file_path }} is too large ({{ file_size }} > {{ max_length }}), splitting into chunks...",
|
|
7
12
|
"index_update_success": "✅ Successfully updated index for {{ file_path }} (md5: {{ md5 }}) in {{ duration }}s",
|
|
8
13
|
"index_build_error": "❌ Error building index for {{ file_path }}: {{ error }}",
|
|
@@ -63,10 +68,20 @@ MESSAGES = {
|
|
|
63
68
|
"ranking_failed": "Ranking failed in {{ elapsed }}s, using original order",
|
|
64
69
|
"begin_index_source_code": "🚀 Begin to index source code in {{ source_dir }}",
|
|
65
70
|
"stream_out_stats": "Elapsed time {{ elapsed_time }} seconds, input tokens: {{ input_tokens }}, output tokens: {{ output_tokens }}",
|
|
66
|
-
"upsert_file": "✅ Updated file: {{ file_path }}",
|
|
71
|
+
"upsert_file": "✅ Updated file: {{ file_path }}",
|
|
72
|
+
"unmerged_blocks_title": "Unmerged Blocks",
|
|
73
|
+
"unmerged_file_path": "File: {{file_path}}",
|
|
74
|
+
"unmerged_search_block": "Search Block({{similarity}}):",
|
|
75
|
+
"unmerged_replace_block": "Replace Block:",
|
|
76
|
+
"unmerged_blocks_total": "Total unmerged blocks: {{num_blocks}}",
|
|
77
|
+
"git_init_required": "⚠️ auto_merge only applies to git repositories.\n\nPlease try using git init in the source directory:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\nThen run auto - coder again.\nError: {{ error }}"
|
|
67
78
|
},
|
|
68
79
|
"zh": {
|
|
80
|
+
"model_not_found": "未找到模型: {{model_name}}",
|
|
81
|
+
"new_session_started": "新会话已开始。之前的聊天历史已存档。",
|
|
69
82
|
"memory_save_success": "✅ 已保存到您的记忆中",
|
|
83
|
+
"file_decode_error": "无法解码文件: {{file_path}}。尝试的编码: {{encodings}}",
|
|
84
|
+
"file_write_error": "无法写入文件: {{file_path}}. 错误: {{error}}",
|
|
70
85
|
"index_file_too_large": "⚠️ 文件 {{ file_path }} 过大 ({{ file_size }} > {{ max_length }}), 正在分块处理...",
|
|
71
86
|
"index_update_success": "✅ 成功更新 {{ file_path }} 的索引 (md5: {{ md5 }}), 耗时 {{ duration }} 秒",
|
|
72
87
|
"index_build_error": "❌ 构建 {{ file_path }} 索引时出错: {{ error }}",
|
|
@@ -116,12 +131,12 @@ MESSAGES = {
|
|
|
116
131
|
"pylint_file_check_failed": "⚠️ {{ file_path }} 的 Pylint 检查失败。更改未应用。错误: {{ error_message }}",
|
|
117
132
|
"merge_success": "✅ 成功合并了 {{ num_files }} 个文件中的更改 {{ num_changes }}/{{ total_blocks }} 个代码块。",
|
|
118
133
|
"no_changes_made": "⚠️ 未对任何文件进行更改。",
|
|
119
|
-
"unmerged_blocks_title": "
|
|
120
|
-
"unmerged_file_path": "
|
|
121
|
-
"unmerged_search_block": "Search Block({similarity}):",
|
|
134
|
+
"unmerged_blocks_title": "未合并代码块",
|
|
135
|
+
"unmerged_file_path": "文件: {file_path}",
|
|
136
|
+
"unmerged_search_block": "Search Block({{similarity}}):",
|
|
122
137
|
"unmerged_replace_block": "Replace Block:",
|
|
123
|
-
"unmerged_blocks_total": "
|
|
124
|
-
"git_init_required": "⚠️ auto_merge 仅适用于 git 仓库。\n\n请尝试在源目录中使用 git init:\n\n```shell\ncd {{ source_dir }}\ngit init
|
|
138
|
+
"unmerged_blocks_total": "未合并代码块数量: {{num_blocks}}",
|
|
139
|
+
"git_init_required": "⚠️ auto_merge 仅适用于 git 仓库。\n\n请尝试在源目录中使用 git init:\n\n```shell\ncd {{ source_dir }}\ngit init.\n```\n\n然后再次运行 auto-coder。\n错误: {{ error }}",
|
|
125
140
|
"upsert_file": "✅ 更新文件: {{ file_path }}",
|
|
126
141
|
"files_merged": "✅ 成功合并了 {{ total }} 个文件到项目中。",
|
|
127
142
|
"merge_failed": "❌ 合并文件 {{ path }} 失败: {{ error }}",
|
|
@@ -134,7 +149,7 @@ MESSAGES = {
|
|
|
134
149
|
"ranking_process_failed": "排序过程失败: {{ error }}",
|
|
135
150
|
"ranking_failed": "排序失败,耗时 {{ elapsed }} 秒,使用原始顺序",
|
|
136
151
|
"stream_out_stats": "耗时 {{ elapsed_time }} 秒,输入token数: {{ input_tokens }}, 输出token数: {{ output_tokens }}"
|
|
137
|
-
},
|
|
152
|
+
},
|
|
138
153
|
}
|
|
139
154
|
|
|
140
155
|
|
|
@@ -148,3 +163,6 @@ def get_system_language():
|
|
|
148
163
|
def get_message(key):
|
|
149
164
|
lang = get_system_language()
|
|
150
165
|
return MESSAGES.get(lang, MESSAGES['en']).get(key, MESSAGES['en'][key])
|
|
166
|
+
|
|
167
|
+
def get_message_with_format(msg_key: str, **kwargs):
|
|
168
|
+
return format_str_jinja2(get_message(msg_key), **kwargs)
|
|
@@ -422,11 +422,11 @@ class CodeAutoMergeEditBlock:
|
|
|
422
422
|
self.printer.print_in_terminal("unmerged_blocks_title", style="bold red")
|
|
423
423
|
for file_path, head, update, similarity in unmerged_blocks:
|
|
424
424
|
self.printer.print_str_in_terminal(
|
|
425
|
-
f"\n{self.printer.
|
|
425
|
+
f"\n{self.printer.get_message_from_key_with_format('unmerged_file_path',file_path=file_path)}",
|
|
426
426
|
style="bold blue"
|
|
427
427
|
)
|
|
428
428
|
self.printer.print_str_in_terminal(
|
|
429
|
-
f"\n{self.printer.
|
|
429
|
+
f"\n{self.printer.get_message_from_key_with_format('unmerged_search_block',similarity=similarity)}",
|
|
430
430
|
style="bold green"
|
|
431
431
|
)
|
|
432
432
|
syntax = Syntax(head, "python", theme="monokai", line_numbers=True)
|
|
@@ -66,8 +66,8 @@ class CodeModificationRanker:
|
|
|
66
66
|
|
|
67
67
|
self.printer.print_in_terminal(
|
|
68
68
|
"ranking_start", style="blue", count=len(generate_result.contents))
|
|
69
|
-
|
|
70
|
-
total_tasks = len(self.llms) *
|
|
69
|
+
rank_times = self.args.rank_times_same_model
|
|
70
|
+
total_tasks = len(self.llms) * rank_times
|
|
71
71
|
|
|
72
72
|
query = self._rank_modifications.prompt(generate_result)
|
|
73
73
|
input_tokens_count = 0
|
|
@@ -78,7 +78,7 @@ class CodeModificationRanker:
|
|
|
78
78
|
# Submit tasks for each model and generate_times
|
|
79
79
|
futures = []
|
|
80
80
|
for llm in self.llms:
|
|
81
|
-
for _ in range(
|
|
81
|
+
for _ in range(rank_times):
|
|
82
82
|
futures.append(
|
|
83
83
|
executor.submit(
|
|
84
84
|
chat_with_continue,
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
from autocoder.common.auto_coder_lang import get_message_with_format
|
|
2
|
+
from typing import List, Dict, Union
|
|
3
|
+
|
|
4
|
+
def read_file(file_path):
|
|
5
|
+
"""Read a file with automatic encoding detection.
|
|
6
|
+
|
|
7
|
+
Tries common encodings in sequence (UTF-8 > GBK > UTF-16 > Latin-1) to handle
|
|
8
|
+
cross-platform encoding issues between Windows and Linux systems.
|
|
9
|
+
|
|
10
|
+
Args:
|
|
11
|
+
file_path (str): Path to the file to read
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
str: The file contents as a string
|
|
15
|
+
|
|
16
|
+
Raises:
|
|
17
|
+
ValueError: If the file cannot be decoded with any of the tried encodings
|
|
18
|
+
"""
|
|
19
|
+
encodings = ['utf-8', 'gbk', 'utf-16', 'latin-1']
|
|
20
|
+
|
|
21
|
+
for encoding in encodings:
|
|
22
|
+
try:
|
|
23
|
+
with open(file_path, 'r', encoding=encoding) as f:
|
|
24
|
+
content = f.read()
|
|
25
|
+
return content
|
|
26
|
+
except UnicodeDecodeError:
|
|
27
|
+
continue
|
|
28
|
+
|
|
29
|
+
raise ValueError(get_message_with_format("file_decode_error",
|
|
30
|
+
file_path=file_path,
|
|
31
|
+
encodings=", ".join(encodings)))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def save_file(file_path: str, content: Union[str, List[str]]) -> None:
|
|
36
|
+
"""Save content to a file using UTF-8 encoding.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
file_path (str): Path to the file to write
|
|
40
|
+
content (Union[str, List[str]]): Content to write to the file.
|
|
41
|
+
Can be a string or list of strings (will be joined with newlines)
|
|
42
|
+
|
|
43
|
+
Raises:
|
|
44
|
+
IOError: If the file cannot be written
|
|
45
|
+
TypeError: If content is neither str nor List[str]
|
|
46
|
+
"""
|
|
47
|
+
try:
|
|
48
|
+
with open(file_path, 'w', encoding='utf-8') as f:
|
|
49
|
+
if isinstance(content, str):
|
|
50
|
+
f.write(content)
|
|
51
|
+
elif isinstance(content, list):
|
|
52
|
+
f.write('\n'.join(content))
|
|
53
|
+
else:
|
|
54
|
+
raise TypeError("Content must be either str or List[str]")
|
|
55
|
+
except IOError as e:
|
|
56
|
+
raise IOError(get_message_with_format("file_write_error",
|
|
57
|
+
file_path=file_path,
|
|
58
|
+
error=str(e)))
|
|
@@ -57,7 +57,7 @@ def stream_chat_with_continue(
|
|
|
57
57
|
count = 0
|
|
58
58
|
temp_conversations = conversations
|
|
59
59
|
current_metadata = None
|
|
60
|
-
|
|
60
|
+
metadatas = {}
|
|
61
61
|
while True:
|
|
62
62
|
# 使用流式接口获取生成内容
|
|
63
63
|
stream_generator = llm.stream_chat_oai(
|
|
@@ -67,17 +67,20 @@ def stream_chat_with_continue(
|
|
|
67
67
|
)
|
|
68
68
|
|
|
69
69
|
current_content = ""
|
|
70
|
+
|
|
70
71
|
for res in stream_generator:
|
|
71
72
|
content = res[0]
|
|
72
73
|
current_content += content
|
|
73
74
|
if current_metadata is None:
|
|
74
75
|
current_metadata = res[1]
|
|
75
76
|
else:
|
|
76
|
-
|
|
77
|
-
current_metadata.
|
|
78
|
-
current_metadata.
|
|
77
|
+
metadatas[count] = res[1]
|
|
78
|
+
current_metadata.finish_reason = res[1].finish_reason
|
|
79
|
+
current_metadata.reasoning_content = res[1].reasoning_content
|
|
79
80
|
|
|
80
81
|
# Yield 当前的 StreamChatWithContinueResult
|
|
82
|
+
current_metadata.generated_tokens_count = sum([v.generated_tokens_count for _, v in metadatas.items()])
|
|
83
|
+
current_metadata.input_tokens_count = sum([v.input_tokens_count for _, v in metadatas.items()])
|
|
81
84
|
yield (content,current_metadata)
|
|
82
85
|
|
|
83
86
|
# 更新对话历史
|
|
@@ -36,6 +36,22 @@ default_models_list = [
|
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
|
|
39
|
+
def process_api_key_path(base_url: str) -> str:
|
|
40
|
+
"""
|
|
41
|
+
从 base_url 中提取 host 部分并处理特殊字符
|
|
42
|
+
例如: https://api.example.com:8080/v1 -> api.example.com_8080
|
|
43
|
+
"""
|
|
44
|
+
if not base_url:
|
|
45
|
+
return ""
|
|
46
|
+
|
|
47
|
+
parsed = urlparse(base_url)
|
|
48
|
+
host = parsed.netloc
|
|
49
|
+
|
|
50
|
+
# 将冒号替换为下划线
|
|
51
|
+
host = host.replace(":", "_")
|
|
52
|
+
|
|
53
|
+
return host
|
|
54
|
+
|
|
39
55
|
def load_models() -> List[Dict]:
|
|
40
56
|
"""
|
|
41
57
|
Load models from ~/.auto-coder/keys/models.json and merge with default_models_list.
|
|
@@ -73,7 +89,7 @@ def load_models() -> List[Dict]:
|
|
|
73
89
|
api_key_file = os.path.join(api_key_dir, model["api_key_path"])
|
|
74
90
|
if os.path.exists(api_key_file):
|
|
75
91
|
with open(api_key_file, "r") as f:
|
|
76
|
-
model["api_key"] = f.read()
|
|
92
|
+
model["api_key"] = f.read()
|
|
77
93
|
return target_models
|
|
78
94
|
|
|
79
95
|
def save_models(models: List[Dict]) -> None:
|
|
@@ -85,22 +101,6 @@ def save_models(models: List[Dict]) -> None:
|
|
|
85
101
|
json.dump(models, f, indent=2, ensure_ascii=False)
|
|
86
102
|
|
|
87
103
|
|
|
88
|
-
def process_api_key_path(base_url: str) -> str:
|
|
89
|
-
"""
|
|
90
|
-
从 base_url 中提取 host 部分并处理特殊字符
|
|
91
|
-
例如: https://api.example.com:8080/v1 -> api.example.com_8080
|
|
92
|
-
"""
|
|
93
|
-
if not base_url:
|
|
94
|
-
return ""
|
|
95
|
-
|
|
96
|
-
parsed = urlparse(base_url)
|
|
97
|
-
host = parsed.netloc
|
|
98
|
-
|
|
99
|
-
# 将冒号替换为下划线
|
|
100
|
-
host = host.replace(":", "_")
|
|
101
|
-
|
|
102
|
-
return host
|
|
103
|
-
|
|
104
104
|
def get_model_by_name(name: str) -> Dict:
|
|
105
105
|
"""
|
|
106
106
|
根据模型名称查找模型
|
|
@@ -109,7 +109,8 @@ def get_model_by_name(name: str) -> Dict:
|
|
|
109
109
|
v = [m for m in models if m["name"] == name.strip()]
|
|
110
110
|
|
|
111
111
|
if len(v) == 0:
|
|
112
|
-
|
|
112
|
+
from autocoder.common.auto_coder_lang import get_message_with_format
|
|
113
|
+
raise Exception(get_message_with_format("model_not_found", model_name=name))
|
|
113
114
|
return v[0]
|
|
114
115
|
|
|
115
116
|
def update_model_with_api_key(name: str, api_key: str) -> Dict:
|
|
@@ -135,9 +136,8 @@ def update_model_with_api_key(name: str, api_key: str) -> Dict:
|
|
|
135
136
|
|
|
136
137
|
if not found_model:
|
|
137
138
|
return None
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
api_key_path = process_api_key_path(found_model["base_url"])
|
|
139
|
+
|
|
140
|
+
api_key_path = name
|
|
141
141
|
if api_key_path:
|
|
142
142
|
found_model["api_key_path"] = api_key_path
|
|
143
143
|
|
|
@@ -36,9 +36,8 @@ class SuffixProject:
|
|
|
36
36
|
self.target_file = args.target_file
|
|
37
37
|
self.project_type = args.project_type
|
|
38
38
|
self.suffixs = [
|
|
39
|
-
|
|
40
|
-
for suffix in self.project_type.split(",")
|
|
41
|
-
if suffix.strip() != ""
|
|
39
|
+
suffix.strip() if suffix.startswith(".") else f".{suffix.strip()}"
|
|
40
|
+
for suffix in self.project_type.split(",") if suffix.strip()
|
|
42
41
|
]
|
|
43
42
|
self.file_filter = file_filter
|
|
44
43
|
self.sources = []
|