auto-coder 0.1.177__py3-none-any.whl → 0.1.179__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of auto-coder might be problematic. Click here for more details.
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/METADATA +1 -1
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/RECORD +11 -11
- autocoder/rag/document_retriever.py +2 -2
- autocoder/rag/long_context_rag.py +3 -3
- autocoder/rag/token_counter.py +2 -2
- autocoder/rag/variable_holder.py +3 -2
- autocoder/version.py +1 -1
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.177.dist-info → auto_coder-0.1.179.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ autocoder/chat_auto_coder.py,sha256=i5xIuWlTqF0pJz8kXoa-_bW3Ic3SfCFvU2WJIMxrUHU,
|
|
|
7
7
|
autocoder/chat_auto_coder_lang.py,sha256=QYtu5gWEQmWKVovR_qUZ8plySZarNFX_Onk-1vN9IiA,8524
|
|
8
8
|
autocoder/command_args.py,sha256=ftWw6HnFUZPiQPt1oV-SfpHQe69XN3knaFy1lpROBcU,26854
|
|
9
9
|
autocoder/lang.py,sha256=e-07rYTgimpxS8sm-AxKSmH4kKQX4N05YFHJBg9trVs,12598
|
|
10
|
-
autocoder/version.py,sha256=
|
|
10
|
+
autocoder/version.py,sha256=2dEBMYUzBVdhW5N4Nqr07NH9Uz48P3Yl417KfXorcI4,23
|
|
11
11
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
|
|
13
13
|
autocoder/agent/coder.py,sha256=dnITYHqkcOip8zV4lywbkYNH9w7Q3qyYaUArJ4WPrTs,866
|
|
@@ -60,9 +60,9 @@ autocoder/pyproject/__init__.py,sha256=-2-ImQVw6e3NQZQOyDlHEP5b4xVs5ur2G5izB-JCa
|
|
|
60
60
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
61
61
|
autocoder/rag/api_server.py,sha256=zokIlDJlk7ucRorSLQm80uICO1mecfmn4J2zVqEBskE,6786
|
|
62
62
|
autocoder/rag/doc_filter.py,sha256=LqU8Wi6klwpY9WTHVtkioSHpmo9IWhRz39dzV1gvp6E,9315
|
|
63
|
-
autocoder/rag/document_retriever.py,sha256=
|
|
63
|
+
autocoder/rag/document_retriever.py,sha256=Kz79hl9Iro1TTznn486WuzULmEatQqtAExcEIIFbL9k,23420
|
|
64
64
|
autocoder/rag/llm_wrapper.py,sha256=xRbTBpLUH43Ah5jplL8WWWU-kjKfNgEJoUntLGBq5F4,2484
|
|
65
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
65
|
+
autocoder/rag/long_context_rag.py,sha256=FW4Qv7YpNXOMrNbe28p3hY-baes6nwyVmZ7Qq73J-uc,20173
|
|
66
66
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
67
67
|
autocoder/rag/rag_entry.py,sha256=V1RJ8RGqM30DNPmzymv64rZjNRGWn6kfc8sRy_LECg0,2451
|
|
68
68
|
autocoder/rag/raw_rag.py,sha256=yS2Ur6kG0IRjhCj2_VonwxjY_xls_E62jO5Gz5j2nqE,2952
|
|
@@ -70,10 +70,10 @@ autocoder/rag/relevant_utils.py,sha256=OGfp98OXG4jr3jNmtHIeXGPF8mOlIbTnolPIVTZzY
|
|
|
70
70
|
autocoder/rag/simple_directory_reader.py,sha256=LkKreCkNdEOoL4fNhc3_hDoyyWTQUte4uqextISRz4U,24485
|
|
71
71
|
autocoder/rag/simple_rag.py,sha256=I902EUqOK1WM0Y2WFd7RzDJYofElvTZNLVCBtX5A9rc,14885
|
|
72
72
|
autocoder/rag/token_checker.py,sha256=jc76x6KWmvVxds6W8juZfQGaoErudc2HenG3sNQfSLs,2819
|
|
73
|
-
autocoder/rag/token_counter.py,sha256=
|
|
73
|
+
autocoder/rag/token_counter.py,sha256=LReZEYXmWriDI3KYjUvK0E4Gn4MeDJX6RPCfJCmluGY,2110
|
|
74
74
|
autocoder/rag/token_limiter.py,sha256=4cGy2kFCvbsM5CtONfuvLmXgpK_1HZTHehLTob08eks,10959
|
|
75
75
|
autocoder/rag/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
-
autocoder/rag/variable_holder.py,sha256=
|
|
76
|
+
autocoder/rag/variable_holder.py,sha256=PFvBjFcR7-fNDD4Vcsc8CpH2Te057vcpwJMxtrfUgKI,75
|
|
77
77
|
autocoder/rag/loaders/__init__.py,sha256=EQHEZ5Cmz-mGP2SllUTvcIbYCnF7W149dNpNItfs0yE,304
|
|
78
78
|
autocoder/rag/loaders/docx_loader.py,sha256=g6Ta8rMUbfgwB8N1qiajhyO6wpaWl7zygAZiKShuioI,174
|
|
79
79
|
autocoder/rag/loaders/excel_loader.py,sha256=Ue8YB1z_kBs8SjIPuBskyM08Q1JiONs_BJZPrzi59oo,896
|
|
@@ -95,9 +95,9 @@ autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1
|
|
|
95
95
|
autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
|
|
96
96
|
autocoder/utils/rest.py,sha256=3tXA8KZG6jKz_tddHNLGx77Icee88WcUeesfNsgPno4,8790
|
|
97
97
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
98
|
-
auto_coder-0.1.
|
|
99
|
-
auto_coder-0.1.
|
|
100
|
-
auto_coder-0.1.
|
|
101
|
-
auto_coder-0.1.
|
|
102
|
-
auto_coder-0.1.
|
|
103
|
-
auto_coder-0.1.
|
|
98
|
+
auto_coder-0.1.179.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
99
|
+
auto_coder-0.1.179.dist-info/METADATA,sha256=Fs9mfHZCIadHFKZ7kT4yPmT_cFLvBRMtbSjySL1QT8o,2352
|
|
100
|
+
auto_coder-0.1.179.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
101
|
+
auto_coder-0.1.179.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
102
|
+
auto_coder-0.1.179.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
103
|
+
auto_coder-0.1.179.dist-info/RECORD,,
|
|
@@ -24,9 +24,9 @@ from autocoder.rag.loaders import (
|
|
|
24
24
|
extract_text_from_pdf,
|
|
25
25
|
extract_text_from_ppt,
|
|
26
26
|
)
|
|
27
|
-
from autocoder.rag import variable_holder
|
|
28
27
|
from autocoder.rag.token_counter import count_tokens_worker, count_tokens
|
|
29
28
|
from uuid import uuid4
|
|
29
|
+
from autocoder.rag.variable_holder import VariableHolder
|
|
30
30
|
|
|
31
31
|
cache_lock = threading.Lock()
|
|
32
32
|
|
|
@@ -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
|
|
|
@@ -27,7 +27,7 @@ from autocoder.rag.token_checker import check_token_limit
|
|
|
27
27
|
from autocoder.rag.token_counter import RemoteTokenCounter, TokenCounter
|
|
28
28
|
from autocoder.rag.token_limiter import TokenLimiter
|
|
29
29
|
from tokenizers import Tokenizer
|
|
30
|
-
from autocoder.rag import
|
|
30
|
+
from autocoder.rag.variable_holder import VariableHolder
|
|
31
31
|
|
|
32
32
|
try:
|
|
33
33
|
from autocoder_pro.rag.llm_compute import LLMComputeEngine
|
|
@@ -72,8 +72,8 @@ class LongContextRAG:
|
|
|
72
72
|
self.on_ray = False
|
|
73
73
|
|
|
74
74
|
if self.tokenizer_path:
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
VariableHolder.TOKENIZER_PATH = self.tokenizer_path
|
|
76
|
+
VariableHolder.TOKENIZER_MODEL = Tokenizer.from_file(self.tokenizer_path)
|
|
77
77
|
self.tokenizer = TokenCounter(self.tokenizer_path)
|
|
78
78
|
else:
|
|
79
79
|
if llm.is_model_exist("deepseek_tokenizer"):
|
autocoder/rag/token_counter.py
CHANGED
|
@@ -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")
|
autocoder/rag/variable_holder.py
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
class VariableHolder:
|
|
2
|
+
TOKENIZER_PATH = None
|
|
3
|
+
TOKENIZER_MODEL = None
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.179"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|