auto-coder 0.1.295__tar.gz → 0.1.297__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.295 → auto_coder-0.1.297}/PKG-INFO +1 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/PKG-INFO +1 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/SOURCES.txt +0 -2
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/commands/auto_command.py +3 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/commands/tools.py +2 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/__init__.py +1 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_hub.py +12 -8
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_servers/mcp_server_gpt4o_mini_search.py +5 -3
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py +3 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_tools.py +7 -2
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/qa_conversation_strategy.py +2 -2
- auto_coder-0.1.297/src/autocoder/version.py +1 -0
- auto_coder-0.1.295/src/autocoder/auto_coder_rag_client_mcp.py +0 -170
- auto_coder-0.1.295/src/autocoder/auto_coder_rag_mcp.py +0 -193
- auto_coder-0.1.295/src/autocoder/version.py +0 -1
- {auto_coder-0.1.295 → auto_coder-0.1.297}/LICENSE +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/README.md +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/setup.cfg +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/setup.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/requires.txt +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_demand_organizer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_filegroup.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_guess_query.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_learn_from_commit.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_review_commit.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/auto_tool.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/coder.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/designer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/planner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/agent/project_reader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/auto_coder.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/auto_coder_rag.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/auto_coder_runner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/auto_coder_server.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/benchmark.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/chat/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/chat_auto_coder.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/chat_auto_coder_lang.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/command_args.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/commands/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/commands/auto_web.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/JupyterClient.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/ShellClient.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/anything2images.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/anything2img.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/audio.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/auto_coder_lang.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/auto_configure.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/buildin_tokenizer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/chunk_validation.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/cleaner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_merge.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_merge_diff.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/code_modification_ranker.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/command_completer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/command_generator.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/command_templates.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/computer_use.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/conf_import_export.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/conf_validator.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/const.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/context_pruner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/conversation_pruner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/files.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/git_utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/global_cancel.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/image_to_page.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/index_import_export.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/interpreter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/llm_rerank.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_server.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_servers/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/memory_manager.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/model_speed_test.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/printer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/recall_validation.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/result_manager.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/screenshots.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/search.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/search_replace.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/shells.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/stats_panel.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/sys_prompt.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/text.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/types.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/utils_code_auto_generate.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/data/byzerllm.md +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/data/tokenizer.json +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/db/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/db/store.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/action.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/dispacher/actions/plugins/action_translate.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/entry.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/filter/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/filter/normal_filter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/filter/quick_filter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/for_command.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/index.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/symbols_utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/index/types.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/lang.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/models.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/dynamic_completion_example.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/git_helper_plugin.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/sample_plugin.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/token_helper_plugin.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/plugins/utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/privacy/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/privacy/model_filter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/pyproject/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/api_server.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/base_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/byzer_storage_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/cache_result_merge.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/file_monitor_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/local_byzer_storage_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/local_duckdb_storage_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/rag_file_meta.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/cache/simple_cache.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/conversation_to_queries.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/doc_filter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/document_retriever.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/lang.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/long_context_rag.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/rag_config.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/rag_entry.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/raw_rag.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/searchable.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/simple_rag.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/stream_event/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/stream_event/event_writer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/stream_event/types.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/token_checker.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/token_counter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/token_limiter.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/token_limiter_utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/types.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/rag/variable_holder.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/regexproject/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/tsproject/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/_markitdown.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/auto_coder_utils/chat_stream_out.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/auto_project_type.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/chat_auto_coder_utils/__init__.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/conversation_store.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/llms.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/log_capture.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/model_provider_selector.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/multi_turn.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/operate_config_api.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/print_table.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/project_structure.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/request_queue.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/rest.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/stream_thinking.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/tests.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/thread_utils.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/utils/types.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_action_regex_project.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_chat_auto_coder.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_command_completer.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_planner.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_plugins.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_privacy.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_queue_communicate.py +0 -0
- {auto_coder-0.1.295 → auto_coder-0.1.297}/tests/test_symbols_utils.py +0 -0
|
@@ -10,8 +10,6 @@ src/auto_coder.egg-info/top_level.txt
|
|
|
10
10
|
src/autocoder/__init__.py
|
|
11
11
|
src/autocoder/auto_coder.py
|
|
12
12
|
src/autocoder/auto_coder_rag.py
|
|
13
|
-
src/autocoder/auto_coder_rag_client_mcp.py
|
|
14
|
-
src/autocoder/auto_coder_rag_mcp.py
|
|
15
13
|
src/autocoder/auto_coder_runner.py
|
|
16
14
|
src/autocoder/auto_coder_server.py
|
|
17
15
|
src/autocoder/benchmark.py
|
|
@@ -241,6 +241,7 @@ class CommandAutoTuner:
|
|
|
241
241
|
而对于分析一个超大文件推荐组合 read_files 带上 line_ranges 参数来读取,或者组合 read_file_withread_file_with_keyword_ranges 等来读取,
|
|
242
242
|
每个函数你还可以使用多次来获取更多信息。
|
|
243
243
|
9. 根据操作系统,终端类型,脚本类型等各种信息,在涉及到路径或者脚本的时候,需要考虑平台差异性。
|
|
244
|
+
10. 使用 read_files 时,一次性读取文件数量不要超过1个,每次只读取200行。如果发现读取的内容不够,则继续读取下面200行。
|
|
244
245
|
</function_combination_readme>
|
|
245
246
|
|
|
246
247
|
|
|
@@ -1057,7 +1058,8 @@ class CommandAutoTuner:
|
|
|
1057
1058
|
|
|
1058
1059
|
你可以使用 get_project_structure 函数获取项目结构后,然后再通过 get_project_map 函数获取某个文件的用途,符号列表,以及
|
|
1059
1060
|
文件大小(tokens数),最后再通过 read_files 函数来读取文件内容,从而帮你做更好的决策。如果需要读取的文件过大,
|
|
1060
|
-
|
|
1061
|
+
|
|
1062
|
+
特别注意:使用 read_files 时,一次性读取文件数量不要超过1个,每次只读取200行。如果发现读取的内容不够,则继续读取下面200行。
|
|
1061
1063
|
|
|
1062
1064
|
</usage>
|
|
1063
1065
|
</command>
|
|
@@ -450,6 +450,8 @@ class AutoCommandTools:
|
|
|
450
450
|
content = "".join(lines[start:end])
|
|
451
451
|
filtered_lines.extend(f"##File: {absolute_path}\n##Line: {start}-{end}\n\n{content}")
|
|
452
452
|
source_code = "".join(filtered_lines)
|
|
453
|
+
# Add source_code to source_code_str
|
|
454
|
+
source_code_str += source_code
|
|
453
455
|
else:
|
|
454
456
|
# Read entire file if no range specified
|
|
455
457
|
content = files_utils.read_file(absolute_path)
|
|
@@ -377,7 +377,7 @@ class AutoCoderArgs(pydantic.BaseModel):
|
|
|
377
377
|
rank_strategy: Optional[str] = "file"
|
|
378
378
|
|
|
379
379
|
action: List[str] = []
|
|
380
|
-
enable_global_memory: Optional[bool] =
|
|
380
|
+
enable_global_memory: Optional[bool] = False
|
|
381
381
|
product_mode: Optional[str] = "lite"
|
|
382
382
|
|
|
383
383
|
keep_reasoning_content: Optional[bool] = False
|
|
@@ -10,15 +10,21 @@ from datetime import datetime, timedelta
|
|
|
10
10
|
from typing import Dict, List, Optional, Any, Set, Optional, Tuple
|
|
11
11
|
from pathlib import Path
|
|
12
12
|
from pydantic import BaseModel, Field
|
|
13
|
-
|
|
14
|
-
from mcp import ClientSession
|
|
15
|
-
from mcp.client.stdio import stdio_client, StdioServerParameters
|
|
16
|
-
from mcp.client.sse import sse_client
|
|
17
|
-
import mcp.types as mcp_types
|
|
18
13
|
from loguru import logger
|
|
19
14
|
from contextlib import AsyncExitStack
|
|
20
15
|
from datetime import timedelta
|
|
21
16
|
|
|
17
|
+
try:
|
|
18
|
+
from mcp import ClientSession
|
|
19
|
+
from mcp.client.stdio import stdio_client, StdioServerParameters
|
|
20
|
+
from mcp.client.sse import sse_client
|
|
21
|
+
import mcp.types as mcp_types
|
|
22
|
+
except ImportError:
|
|
23
|
+
mcp_types = None
|
|
24
|
+
stdio_client = None
|
|
25
|
+
sse_client = None
|
|
26
|
+
ClientSession = None
|
|
27
|
+
logger.error("mcp is not installed(which requires python>=3.11), please install it by `pip install mcp`")
|
|
22
28
|
|
|
23
29
|
class McpTool(BaseModel):
|
|
24
30
|
"""Represents an MCP tool configuration"""
|
|
@@ -101,9 +107,7 @@ def _generate_server_configs() -> Tuple[Dict[str, Any], Dict[str, str]]:
|
|
|
101
107
|
|
|
102
108
|
# Store in dictionaries
|
|
103
109
|
servers[friendly_name] = config
|
|
104
|
-
templates[friendly_name] = json.dumps({friendly_name: config}, indent=4)
|
|
105
|
-
|
|
106
|
-
logger.info(f"Detected MCP server: {friendly_name}")
|
|
110
|
+
templates[friendly_name] = json.dumps({friendly_name: config}, indent=4)
|
|
107
111
|
|
|
108
112
|
except Exception as e:
|
|
109
113
|
logger.error(f"Error generating server configs: {e}")
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
from os import getenv
|
|
2
2
|
from textwrap import dedent
|
|
3
3
|
import sys
|
|
4
|
-
|
|
4
|
+
import json
|
|
5
|
+
from openai import OpenAI
|
|
6
|
+
from loguru import logger
|
|
5
7
|
import mcp.server.stdio
|
|
6
8
|
import mcp.types as types
|
|
7
9
|
from mcp.server import NotificationOptions, Server
|
|
8
10
|
from mcp.server.models import InitializationOptions
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
|
|
12
|
+
|
|
11
13
|
|
|
12
14
|
OPENAI_API_KEY = getenv("OPENAI_API_KEY")
|
|
13
15
|
# Check if API key is empty or None
|
{auto_coder-0.1.295 → auto_coder-0.1.297}/src/autocoder/common/mcp_servers/mcp_server_perplexity.py
RENAMED
|
@@ -2,11 +2,13 @@ from os import getenv
|
|
|
2
2
|
from textwrap import dedent
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
|
+
import json
|
|
6
|
+
from loguru import logger
|
|
7
|
+
|
|
5
8
|
import mcp.server.stdio
|
|
6
9
|
import mcp.types as types
|
|
7
10
|
from mcp.server import NotificationOptions, Server
|
|
8
11
|
from mcp.server.models import InitializationOptions
|
|
9
|
-
import json
|
|
10
12
|
|
|
11
13
|
PERPLEXITY_API_KEY = getenv("PERPLEXITY_API_KEY")
|
|
12
14
|
PERPLEXITY_API_BASE_URL = "https://api.perplexity.ai"
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
from typing import Dict, Any, List, Optional, Union
|
|
2
2
|
from byzerllm import prompt
|
|
3
|
-
from ..common.mcp_hub import McpHub
|
|
4
3
|
import json
|
|
5
4
|
import byzerllm
|
|
6
5
|
import re
|
|
7
6
|
from pydantic import BaseModel, Field
|
|
8
7
|
from loguru import logger
|
|
9
|
-
import mcp.types as mcp_types
|
|
10
8
|
import os
|
|
11
9
|
import time
|
|
10
|
+
try:
|
|
11
|
+
import mcp.types as mcp_types
|
|
12
|
+
except ImportError:
|
|
13
|
+
mcp_types = None
|
|
14
|
+
logger.error("mcp is not installed(which requires python>=3.11), please install it by `pip install mcp`")
|
|
15
|
+
from autocoder.common.mcp_hub import McpHub
|
|
16
|
+
|
|
12
17
|
|
|
13
18
|
class McpToolCall(BaseModel):
|
|
14
19
|
server_name: str = Field(..., description="The name of the MCP server")
|
|
@@ -63,7 +63,7 @@ class MultiRoundStrategy(QAConversationStrategy):
|
|
|
63
63
|
{% if local_image_host %}
|
|
64
64
|
4. 图片路径处理
|
|
65
65
|
- 图片地址需返回绝对路径,
|
|
66
|
-
- 对于Windows风格的路径,需要转换为Linux风格, 例如:C
|
|
66
|
+
- 对于Windows风格的路径,需要转换为Linux风格, 例如:C:\\Users\\user\\Desktop\\image.png 转换为 C:/Users/user/Desktop/image.png
|
|
67
67
|
- 为请求图片资源 需增加 http://{{ local_image_host }}/static/ 作为前缀
|
|
68
68
|
例如:/path/to/images/image.png, 返回 http://{{ local_image_host }}/static/path/to/images/image.png
|
|
69
69
|
{% endif %}
|
|
@@ -115,7 +115,7 @@ class SingleRoundStrategy(QAConversationStrategy):
|
|
|
115
115
|
{% if local_image_host %}
|
|
116
116
|
4. 图片路径处理
|
|
117
117
|
- 图片地址需返回绝对路径,
|
|
118
|
-
- 对于Windows风格的路径,需要转换为Linux风格, 例如:C
|
|
118
|
+
- 对于Windows风格的路径,需要转换为Linux风格, 例如:C:\\Users\\user\\Desktop\\image.png 转换为 C:/Users/user/Desktop/image.png
|
|
119
119
|
- 为请求图片资源 需增加 http://{{ local_image_host }}/static/ 作为前缀
|
|
120
120
|
例如:/path/to/images/image.png, 返回 http://{{ local_image_host }}/static/path/to/images/image.png
|
|
121
121
|
{% endif %}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.297"
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
from typing import Any, List, Dict, Generator, Optional
|
|
2
|
-
import asyncio
|
|
3
|
-
import httpx
|
|
4
|
-
import argparse
|
|
5
|
-
from mcp.server.models import InitializationOptions
|
|
6
|
-
import mcp.types as types
|
|
7
|
-
from mcp.server import NotificationOptions, Server
|
|
8
|
-
import mcp.server.stdio
|
|
9
|
-
from autocoder.common import AutoCoderArgs
|
|
10
|
-
from byzerllm import ByzerLLM
|
|
11
|
-
from autocoder.lang import lang_desc
|
|
12
|
-
import locale
|
|
13
|
-
import pkg_resources
|
|
14
|
-
from openai import OpenAI
|
|
15
|
-
|
|
16
|
-
class AutoCoderRAGClientMCP:
|
|
17
|
-
def __init__(self, llm: ByzerLLM, args: AutoCoderArgs):
|
|
18
|
-
self.llm = llm
|
|
19
|
-
self.args = args
|
|
20
|
-
|
|
21
|
-
if not args.rag_url:
|
|
22
|
-
raise ValueError("rag_url is required for RAG client mode")
|
|
23
|
-
|
|
24
|
-
if not args.rag_url.startswith("http://"):
|
|
25
|
-
args.rag_url = f"http://{args.rag_url}"
|
|
26
|
-
|
|
27
|
-
if not args.rag_url.endswith("/v1"):
|
|
28
|
-
args.rag_url = args.rag_url.rstrip("/") + "/v1"
|
|
29
|
-
|
|
30
|
-
if not args.rag_token:
|
|
31
|
-
raise ValueError("rag_token is required for RAG client mode")
|
|
32
|
-
|
|
33
|
-
self.client = OpenAI(api_key=args.rag_token, base_url=args.rag_url)
|
|
34
|
-
|
|
35
|
-
self.server = Server("auto_coder_rag_client")
|
|
36
|
-
|
|
37
|
-
async def setup_server(self):
|
|
38
|
-
@self.server.list_tools()
|
|
39
|
-
async def handle_list_tools() -> List[types.Tool]:
|
|
40
|
-
return [
|
|
41
|
-
types.Tool(
|
|
42
|
-
name="rag-search",
|
|
43
|
-
description="Search documents using RAG",
|
|
44
|
-
inputSchema={
|
|
45
|
-
"type": "object",
|
|
46
|
-
"properties": {
|
|
47
|
-
"query": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "Search query",
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
"required": ["query"],
|
|
53
|
-
},
|
|
54
|
-
),
|
|
55
|
-
types.Tool(
|
|
56
|
-
name="rag-chat",
|
|
57
|
-
description="Chat with documents using RAG",
|
|
58
|
-
inputSchema={
|
|
59
|
-
"type": "object",
|
|
60
|
-
"properties": {
|
|
61
|
-
"query": {
|
|
62
|
-
"type": "string",
|
|
63
|
-
"description": "Chat query",
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
"required": ["query"],
|
|
67
|
-
},
|
|
68
|
-
),
|
|
69
|
-
]
|
|
70
|
-
|
|
71
|
-
@self.server.call_tool()
|
|
72
|
-
async def handle_call_tool(
|
|
73
|
-
name: str, arguments: Dict[str, Any] | None
|
|
74
|
-
) -> List[types.TextContent | types.ImageContent | types.EmbeddedResource]:
|
|
75
|
-
if not arguments:
|
|
76
|
-
raise ValueError("Missing arguments")
|
|
77
|
-
|
|
78
|
-
if name == "rag-search":
|
|
79
|
-
query = arguments.get("query")
|
|
80
|
-
if not query:
|
|
81
|
-
raise ValueError("Missing query parameter")
|
|
82
|
-
|
|
83
|
-
response = self.client.chat.completions.create(
|
|
84
|
-
messages=[{"role": "user", "content": json.dumps({
|
|
85
|
-
"query": query,
|
|
86
|
-
"only_contexts": True
|
|
87
|
-
})}],
|
|
88
|
-
model=self.args.model,
|
|
89
|
-
max_tokens=self.args.rag_params_max_tokens,
|
|
90
|
-
)
|
|
91
|
-
result = response.choices[0].message.content
|
|
92
|
-
|
|
93
|
-
return [
|
|
94
|
-
types.TextContent(
|
|
95
|
-
type="text",
|
|
96
|
-
text=f"Search results for '{query}':\n\n{result}"
|
|
97
|
-
)
|
|
98
|
-
]
|
|
99
|
-
|
|
100
|
-
elif name == "rag-chat":
|
|
101
|
-
query = arguments.get("query")
|
|
102
|
-
if not query:
|
|
103
|
-
raise ValueError("Missing query parameter")
|
|
104
|
-
|
|
105
|
-
response = self.client.chat.completions.create(
|
|
106
|
-
messages=[{"role": "user", "content": query}],
|
|
107
|
-
model=self.args.model,
|
|
108
|
-
stream=True,
|
|
109
|
-
max_tokens=self.args.rag_params_max_tokens
|
|
110
|
-
)
|
|
111
|
-
|
|
112
|
-
full_response = ""
|
|
113
|
-
for chunk in response:
|
|
114
|
-
if chunk.choices[0].delta.content is not None:
|
|
115
|
-
full_response += chunk.choices[0].delta.content
|
|
116
|
-
|
|
117
|
-
return [
|
|
118
|
-
types.TextContent(
|
|
119
|
-
type="text",
|
|
120
|
-
text=f"Chat response for '{query}':\n\n{full_response}"
|
|
121
|
-
)
|
|
122
|
-
]
|
|
123
|
-
|
|
124
|
-
else:
|
|
125
|
-
raise ValueError(f"Unknown tool: {name}")
|
|
126
|
-
|
|
127
|
-
async def run(self):
|
|
128
|
-
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
|
|
129
|
-
await self.server.run(
|
|
130
|
-
read_stream,
|
|
131
|
-
write_stream,
|
|
132
|
-
InitializationOptions(
|
|
133
|
-
server_name="auto_coder_rag_client",
|
|
134
|
-
server_version="0.1.0",
|
|
135
|
-
capabilities=self.server.get_capabilities(
|
|
136
|
-
notification_options=NotificationOptions(),
|
|
137
|
-
experimental_capabilities={},
|
|
138
|
-
),
|
|
139
|
-
),
|
|
140
|
-
)
|
|
141
|
-
|
|
142
|
-
def parse_args(input_args: Optional[List[str]] = None) -> AutoCoderArgs:
|
|
143
|
-
system_lang, _ = locale.getdefaultlocale()
|
|
144
|
-
lang = "zh" if system_lang and system_lang.startswith("zh") else "en"
|
|
145
|
-
desc = lang_desc[lang]
|
|
146
|
-
|
|
147
|
-
parser = argparse.ArgumentParser(description="Auto Coder RAG Client MCP Server")
|
|
148
|
-
parser.add_argument("--rag_url", required=True, help="RAG server URL")
|
|
149
|
-
parser.add_argument("--rag_token", required=True, help="RAG server token")
|
|
150
|
-
parser.add_argument("--model", default="v3_chat", help=desc["model"])
|
|
151
|
-
parser.add_argument("--rag_params_max_tokens", type=int, default=4096, help="Max tokens for RAG response")
|
|
152
|
-
|
|
153
|
-
args = parser.parse_args(input_args)
|
|
154
|
-
return AutoCoderArgs(**vars(args))
|
|
155
|
-
|
|
156
|
-
async def main():
|
|
157
|
-
# Parse command line arguments
|
|
158
|
-
args = parse_args()
|
|
159
|
-
|
|
160
|
-
# Initialize LLM
|
|
161
|
-
llm = ByzerLLM()
|
|
162
|
-
llm.setup_default_model_name(args.model)
|
|
163
|
-
|
|
164
|
-
# Initialize and run server
|
|
165
|
-
server = AutoCoderRAGClientMCP(llm=llm, args=args)
|
|
166
|
-
await server.setup_server()
|
|
167
|
-
await server.run()
|
|
168
|
-
|
|
169
|
-
if __name__ == "__main__":
|
|
170
|
-
asyncio.run(main())
|
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
from typing import Any, List, Dict, Generator, Optional
|
|
2
|
-
import asyncio
|
|
3
|
-
import httpx
|
|
4
|
-
import argparse
|
|
5
|
-
from mcp.server.models import InitializationOptions
|
|
6
|
-
import mcp.types as types
|
|
7
|
-
from mcp.server import NotificationOptions, Server
|
|
8
|
-
import mcp.server.stdio
|
|
9
|
-
from autocoder.rag.long_context_rag import LongContextRAG
|
|
10
|
-
from autocoder.common import AutoCoderArgs
|
|
11
|
-
from byzerllm import ByzerLLM
|
|
12
|
-
from autocoder.lang import lang_desc
|
|
13
|
-
import locale
|
|
14
|
-
import pkg_resources
|
|
15
|
-
|
|
16
|
-
class AutoCoderRAGMCP:
|
|
17
|
-
def __init__(self, llm: ByzerLLM, args: AutoCoderArgs):
|
|
18
|
-
self.llm = llm
|
|
19
|
-
self.args = args
|
|
20
|
-
self.rag = LongContextRAG(
|
|
21
|
-
llm=llm,
|
|
22
|
-
args=args,
|
|
23
|
-
path=args.source_dir,
|
|
24
|
-
tokenizer_path=args.tokenizer_path
|
|
25
|
-
)
|
|
26
|
-
self.server = Server("auto_coder_rag")
|
|
27
|
-
|
|
28
|
-
async def setup_server(self):
|
|
29
|
-
@self.server.list_tools()
|
|
30
|
-
async def handle_list_tools() -> List[types.Tool]:
|
|
31
|
-
return [
|
|
32
|
-
types.Tool(
|
|
33
|
-
name="rag-search",
|
|
34
|
-
description="Search documents using RAG",
|
|
35
|
-
inputSchema={
|
|
36
|
-
"type": "object",
|
|
37
|
-
"properties": {
|
|
38
|
-
"query": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "Search query",
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
"required": ["query"],
|
|
44
|
-
},
|
|
45
|
-
),
|
|
46
|
-
types.Tool(
|
|
47
|
-
name="rag-chat",
|
|
48
|
-
description="Chat with documents using RAG",
|
|
49
|
-
inputSchema={
|
|
50
|
-
"type": "object",
|
|
51
|
-
"properties": {
|
|
52
|
-
"query": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"description": "Chat query",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
"required": ["query"],
|
|
58
|
-
},
|
|
59
|
-
),
|
|
60
|
-
]
|
|
61
|
-
|
|
62
|
-
@self.server.call_tool()
|
|
63
|
-
async def handle_call_tool(
|
|
64
|
-
name: str, arguments: Dict[str, Any] | None
|
|
65
|
-
) -> List[types.TextContent | types.ImageContent | types.EmbeddedResource]:
|
|
66
|
-
if not arguments:
|
|
67
|
-
raise ValueError("Missing arguments")
|
|
68
|
-
|
|
69
|
-
if name == "rag-search":
|
|
70
|
-
query = arguments.get("query")
|
|
71
|
-
if not query:
|
|
72
|
-
raise ValueError("Missing query parameter")
|
|
73
|
-
|
|
74
|
-
results = self.rag.search(query)
|
|
75
|
-
return [
|
|
76
|
-
types.TextContent(
|
|
77
|
-
type="text",
|
|
78
|
-
text=f"Search results for '{query}':\n\n" +
|
|
79
|
-
"\n".join([f"- {result.module_name}: {result.source_code[:200]}..."
|
|
80
|
-
for result in results])
|
|
81
|
-
)
|
|
82
|
-
]
|
|
83
|
-
|
|
84
|
-
elif name == "rag-chat":
|
|
85
|
-
query = arguments.get("query")
|
|
86
|
-
if not query:
|
|
87
|
-
raise ValueError("Missing query parameter")
|
|
88
|
-
|
|
89
|
-
response, _ = self.rag.stream_chat_oai(
|
|
90
|
-
conversations=[{"role": "user", "content": query}]
|
|
91
|
-
)
|
|
92
|
-
full_response = "".join([chunk for chunk in response])
|
|
93
|
-
|
|
94
|
-
return [
|
|
95
|
-
types.TextContent(
|
|
96
|
-
type="text",
|
|
97
|
-
text=f"Chat response for '{query}':\n\n{full_response}"
|
|
98
|
-
)
|
|
99
|
-
]
|
|
100
|
-
|
|
101
|
-
else:
|
|
102
|
-
raise ValueError(f"Unknown tool: {name}")
|
|
103
|
-
|
|
104
|
-
async def run(self):
|
|
105
|
-
async with mcp.server.stdio.stdio_server() as (read_stream, write_stream):
|
|
106
|
-
await self.server.run(
|
|
107
|
-
read_stream,
|
|
108
|
-
write_stream,
|
|
109
|
-
InitializationOptions(
|
|
110
|
-
server_name="auto_coder_rag",
|
|
111
|
-
server_version="0.1.0",
|
|
112
|
-
capabilities=self.server.get_capabilities(
|
|
113
|
-
notification_options=NotificationOptions(),
|
|
114
|
-
experimental_capabilities={},
|
|
115
|
-
),
|
|
116
|
-
),
|
|
117
|
-
)
|
|
118
|
-
|
|
119
|
-
def parse_args(input_args: Optional[List[str]] = None) -> AutoCoderArgs:
|
|
120
|
-
try:
|
|
121
|
-
tokenizer_path = pkg_resources.resource_filename(
|
|
122
|
-
"autocoder", "data/tokenizer.json"
|
|
123
|
-
)
|
|
124
|
-
except FileNotFoundError:
|
|
125
|
-
tokenizer_path = None
|
|
126
|
-
|
|
127
|
-
system_lang, _ = locale.getdefaultlocale()
|
|
128
|
-
lang = "zh" if system_lang and system_lang.startswith("zh") else "en"
|
|
129
|
-
desc = lang_desc[lang]
|
|
130
|
-
|
|
131
|
-
parser = argparse.ArgumentParser(description="Auto Coder RAG MCP Server")
|
|
132
|
-
parser.add_argument("--source_dir", default=".", help="Source directory path")
|
|
133
|
-
parser.add_argument("--tokenizer_path", default=tokenizer_path, help="Path to tokenizer file")
|
|
134
|
-
parser.add_argument("--model", default="deepseek_chat", help=desc["model"])
|
|
135
|
-
parser.add_argument("--index_model", default="", help=desc["index_model"])
|
|
136
|
-
parser.add_argument("--emb_model", default="", help=desc["emb_model"])
|
|
137
|
-
parser.add_argument("--ray_address", default="auto", help=desc["ray_address"])
|
|
138
|
-
parser.add_argument("--required_exts", default="", help=desc["doc_build_parse_required_exts"])
|
|
139
|
-
parser.add_argument("--rag_doc_filter_relevance", type=int, default=5, help="Relevance score threshold for document filtering")
|
|
140
|
-
parser.add_argument("--rag_context_window_limit", type=int, default=56000, help="Context window limit for RAG")
|
|
141
|
-
parser.add_argument("--full_text_ratio", type=float, default=0.7, help="Ratio of full text area in context window")
|
|
142
|
-
parser.add_argument("--segment_ratio", type=float, default=0.2, help="Ratio of segment area in context window")
|
|
143
|
-
parser.add_argument("--index_filter_workers", type=int, default=5, help="Number of workers for document filtering")
|
|
144
|
-
parser.add_argument("--index_filter_file_num", type=int, default=3, help="Maximum number of files to filter")
|
|
145
|
-
parser.add_argument("--host", default="", help="Server host address")
|
|
146
|
-
parser.add_argument("--port", type=int, default=8000, help="Server port")
|
|
147
|
-
parser.add_argument("--monitor_mode", action="store_true", help="Enable document monitoring mode")
|
|
148
|
-
parser.add_argument("--enable_hybrid_index", action="store_true", help="Enable hybrid index")
|
|
149
|
-
parser.add_argument("--disable_auto_window", action="store_true", help="Disable automatic window adaptation")
|
|
150
|
-
parser.add_argument("--disable_segment_reorder", action="store_true", help="Disable segment reordering")
|
|
151
|
-
parser.add_argument("--disable_inference_enhance", action="store_true", help="Disable inference enhancement")
|
|
152
|
-
parser.add_argument("--inference_deep_thought", action="store_true", help="Enable deep thought in inference")
|
|
153
|
-
parser.add_argument("--inference_slow_without_deep_thought", action="store_true", help="Enable slow inference without deep thought")
|
|
154
|
-
parser.add_argument("--inference_compute_precision", type=int, default=64, help="Inference compute precision")
|
|
155
|
-
parser.add_argument("--data_cells_max_num", type=int, default=2000, help="Maximum number of data cells to process")
|
|
156
|
-
parser.add_argument("--recall_model", default="", help="Model used for document recall")
|
|
157
|
-
parser.add_argument("--chunk_model", default="", help="Model used for document chunking")
|
|
158
|
-
parser.add_argument("--qa_model", default="", help="Model used for question answering")
|
|
159
|
-
|
|
160
|
-
args = parser.parse_args(input_args)
|
|
161
|
-
return AutoCoderArgs(**vars(args)),args
|
|
162
|
-
|
|
163
|
-
async def main():
|
|
164
|
-
# Parse command line arguments
|
|
165
|
-
args,raw_rags = parse_args()
|
|
166
|
-
|
|
167
|
-
# Initialize LLM
|
|
168
|
-
llm = ByzerLLM()
|
|
169
|
-
llm.setup_default_model_name(args.model)
|
|
170
|
-
|
|
171
|
-
# Setup sub models if specified
|
|
172
|
-
if raw_rags.recall_model:
|
|
173
|
-
recall_model = ByzerLLM()
|
|
174
|
-
recall_model.setup_default_model_name(args.recall_model)
|
|
175
|
-
llm.setup_sub_client("recall_model", recall_model)
|
|
176
|
-
|
|
177
|
-
if raw_rags.chunk_model:
|
|
178
|
-
chunk_model = ByzerLLM()
|
|
179
|
-
chunk_model.setup_default_model_name(args.chunk_model)
|
|
180
|
-
llm.setup_sub_client("chunk_model", chunk_model)
|
|
181
|
-
|
|
182
|
-
if raw_rags.qa_model:
|
|
183
|
-
qa_model = ByzerLLM()
|
|
184
|
-
qa_model.setup_default_model_name(args.qa_model)
|
|
185
|
-
llm.setup_sub_client("qa_model", qa_model)
|
|
186
|
-
|
|
187
|
-
# Initialize and run server
|
|
188
|
-
server = AutoCoderRAGMCP(llm=llm, args=args)
|
|
189
|
-
await server.setup_server()
|
|
190
|
-
await server.run()
|
|
191
|
-
|
|
192
|
-
if __name__ == "__main__":
|
|
193
|
-
asyncio.run(main())
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.295"
|
|
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
|