auto-coder 0.1.177__tar.gz → 0.1.180__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.177 → auto_coder-0.1.180}/PKG-INFO +1 -1
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/PKG-INFO +1 -1
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/document_retriever.py +4 -4
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/long_context_rag.py +9 -7
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/token_counter.py +2 -2
- auto_coder-0.1.180/src/autocoder/rag/variable_holder.py +3 -0
- auto_coder-0.1.180/src/autocoder/version.py +1 -0
- auto-coder-0.1.177/src/autocoder/rag/variable_holder.py +0 -2
- auto-coder-0.1.177/src/autocoder/version.py +0 -1
- {auto-coder-0.1.177 → auto_coder-0.1.180}/LICENSE +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/README.md +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/setup.cfg +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/setup.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/SOURCES.txt +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/dependency_links.txt +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/entry_points.txt +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/requires.txt +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/auto_coder.egg-info/top_level.txt +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/auto_tool.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/coder.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/designer.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/planner.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/agent/project_reader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/auto_coder.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/auto_coder_lang.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/auto_coder_rag.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/auto_coder_server.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/chat/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/chat_auto_coder.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/chat_auto_coder_lang.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/command_args.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/JupyterClient.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/ShellClient.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/anything2images.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/audio.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/cleaner.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_execute.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_generate.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_generate_diff.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_generate_editblock.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_generate_strict_diff.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_merge.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_merge_diff.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_merge_editblock.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_merge_strict_diff.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/command_completer.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/command_generator.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/command_templates.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/const.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/git_utils.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/image_to_page.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/interpreter.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/llm_rerank.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/screenshots.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/search.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/search_replace.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/text.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/common/types.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/db/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/db/store.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/action.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/copilot.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/plugins/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/plugins/action_regex_project.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/dispacher/actions/plugins/action_translate.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/index/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/index/for_command.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/index/index.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/index/symbols_utils.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/lang.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/pyproject/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/api_server.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/doc_filter.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/llm_wrapper.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/loaders/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/loaders/docx_loader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/loaders/excel_loader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/loaders/pdf_loader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/loaders/ppt_loader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/rag_config.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/rag_entry.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/raw_rag.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/relevant_utils.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/simple_directory_reader.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/simple_rag.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/token_checker.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/token_limiter.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/rag/types.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/regexproject/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/suffixproject/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/tsproject/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/__init__.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/conversation_store.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/llm_client_interceptors.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/log_capture.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/multi_turn.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/print_table.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/queue_communicate.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/request_event_queue.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/request_queue.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/rest.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/src/autocoder/utils/tests.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_action_regex_project.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_chat_auto_coder.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_code_auto_merge_editblock.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_command_completer.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_planner.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_queue_communicate.py +0 -0
- {auto-coder-0.1.177 → auto_coder-0.1.180}/tests/test_symbols_utils.py +0 -0
|
@@ -2,6 +2,7 @@ import json
|
|
|
2
2
|
import os
|
|
3
3
|
import platform
|
|
4
4
|
import time
|
|
5
|
+
import traceback
|
|
5
6
|
|
|
6
7
|
from watchfiles import Change, DefaultFilter, awatch, watch
|
|
7
8
|
|
|
@@ -24,9 +25,9 @@ from autocoder.rag.loaders import (
|
|
|
24
25
|
extract_text_from_pdf,
|
|
25
26
|
extract_text_from_ppt,
|
|
26
27
|
)
|
|
27
|
-
from autocoder.rag import variable_holder
|
|
28
28
|
from autocoder.rag.token_counter import count_tokens_worker, count_tokens
|
|
29
29
|
from uuid import uuid4
|
|
30
|
+
from autocoder.rag.variable_holder import VariableHolder
|
|
30
31
|
|
|
31
32
|
cache_lock = threading.Lock()
|
|
32
33
|
|
|
@@ -158,8 +159,7 @@ def process_file_local(file_path: str) -> List[SourceCode]:
|
|
|
158
159
|
logger.info(f"Load file {file_path} in {time.time() - start_time}")
|
|
159
160
|
return v
|
|
160
161
|
except Exception as e:
|
|
161
|
-
logger.error(f"Error processing file {file_path}: {str(e)}")
|
|
162
|
-
import traceback
|
|
162
|
+
logger.error(f"Error processing file {file_path}: {str(e)}")
|
|
163
163
|
traceback.print_exc()
|
|
164
164
|
return []
|
|
165
165
|
|
|
@@ -352,7 +352,7 @@ class AutoCoderRAGAsyncUpdateQueue:
|
|
|
352
352
|
with Pool(
|
|
353
353
|
processes=os.cpu_count(),
|
|
354
354
|
initializer=initialize_tokenizer,
|
|
355
|
-
initargs=(
|
|
355
|
+
initargs=(VariableHolder.TOKENIZER_PATH,),
|
|
356
356
|
) as pool:
|
|
357
357
|
results = pool.map(process_file_in_multi_process, files_to_process)
|
|
358
358
|
|
|
@@ -13,6 +13,7 @@ from rich.console import Console
|
|
|
13
13
|
from rich.panel import Panel
|
|
14
14
|
from rich.table import Table
|
|
15
15
|
import statistics
|
|
16
|
+
import traceback
|
|
16
17
|
|
|
17
18
|
from autocoder.common import AutoCoderArgs, SourceCode
|
|
18
19
|
from autocoder.rag.doc_filter import DocFilter
|
|
@@ -27,11 +28,12 @@ from autocoder.rag.token_checker import check_token_limit
|
|
|
27
28
|
from autocoder.rag.token_counter import RemoteTokenCounter, TokenCounter
|
|
28
29
|
from autocoder.rag.token_limiter import TokenLimiter
|
|
29
30
|
from tokenizers import Tokenizer
|
|
30
|
-
from autocoder.rag import
|
|
31
|
+
from autocoder.rag.variable_holder import VariableHolder
|
|
31
32
|
|
|
32
33
|
try:
|
|
33
|
-
from autocoder_pro.rag.llm_compute import LLMComputeEngine
|
|
34
|
-
except ImportError:
|
|
34
|
+
from autocoder_pro.rag.llm_compute import LLMComputeEngine
|
|
35
|
+
except ImportError:
|
|
36
|
+
logger.warning("Please install auto-coder-pro to enhance llm compute ability")
|
|
35
37
|
LLMComputeEngine = None
|
|
36
38
|
|
|
37
39
|
|
|
@@ -72,8 +74,8 @@ class LongContextRAG:
|
|
|
72
74
|
self.on_ray = False
|
|
73
75
|
|
|
74
76
|
if self.tokenizer_path:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
VariableHolder.TOKENIZER_PATH = self.tokenizer_path
|
|
78
|
+
VariableHolder.TOKENIZER_MODEL = Tokenizer.from_file(self.tokenizer_path)
|
|
77
79
|
self.tokenizer = TokenCounter(self.tokenizer_path)
|
|
78
80
|
else:
|
|
79
81
|
if llm.is_model_exist("deepseek_tokenizer"):
|
|
@@ -287,8 +289,8 @@ class LongContextRAG:
|
|
|
287
289
|
llm_config=llm_config,
|
|
288
290
|
)
|
|
289
291
|
except Exception as e:
|
|
290
|
-
logger.error(f"Error in stream_chat_oai: {str(e)}")
|
|
291
|
-
|
|
292
|
+
logger.error(f"Error in stream_chat_oai: {str(e)}")
|
|
293
|
+
traceback.print_exc()
|
|
292
294
|
return ["出现错误,请稍后再试。"], []
|
|
293
295
|
|
|
294
296
|
def _stream_chat_oai(
|
|
@@ -2,7 +2,7 @@ import time
|
|
|
2
2
|
from loguru import logger
|
|
3
3
|
from tokenizers import Tokenizer
|
|
4
4
|
from multiprocessing import Pool, cpu_count
|
|
5
|
-
from autocoder.rag.variable_holder import
|
|
5
|
+
from autocoder.rag.variable_holder import VariableHolder
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
class RemoteTokenCounter:
|
|
@@ -28,7 +28,7 @@ def initialize_tokenizer(tokenizer_path):
|
|
|
28
28
|
def count_tokens(text: str) -> int:
|
|
29
29
|
try:
|
|
30
30
|
# start_time = time.time_ns()
|
|
31
|
-
encoded = TOKENIZER_MODEL.encode('{"role":"user","content":"' + text + '"}')
|
|
31
|
+
encoded = VariableHolder.TOKENIZER_MODEL.encode('{"role":"user","content":"' + text + '"}')
|
|
32
32
|
v = len(encoded.ids)
|
|
33
33
|
# elapsed_time = time.time_ns() - start_time
|
|
34
34
|
# logger.info(f"Token counting took {elapsed_time/1000000} ms")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.180"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.177"
|
|
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.177 → auto_coder-0.1.180}/src/autocoder/common/code_auto_generate_editblock.py
RENAMED
|
File without changes
|
{auto-coder-0.1.177 → auto_coder-0.1.180}/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.177 → auto_coder-0.1.180}/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
|
{auto-coder-0.1.177 → auto_coder-0.1.180}/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
|