auto-coder 0.1.387__py3-none-any.whl → 0.1.389__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.387.dist-info → auto_coder-0.1.389.dist-info}/METADATA +2 -2
- {auto_coder-0.1.387.dist-info → auto_coder-0.1.389.dist-info}/RECORD +12 -12
- autocoder/common/file_checkpoint/conversation_checkpoint.py +1 -1
- autocoder/rag/api_server.py +9 -2
- autocoder/rag/lang.py +4 -0
- autocoder/rag/long_context_rag.py +11 -2
- autocoder/rag/qa_conversation_strategy.py +5 -3
- autocoder/version.py +1 -1
- {auto_coder-0.1.387.dist-info → auto_coder-0.1.389.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.387.dist-info → auto_coder-0.1.389.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.387.dist-info → auto_coder-0.1.389.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.387.dist-info → auto_coder-0.1.389.dist-info}/top_level.txt +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.389
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Programming Language :: Python :: 3.10
|
|
@@ -28,7 +28,7 @@ Requires-Dist: prompt-toolkit
|
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
29
|
Requires-Dist: aiofiles
|
|
30
30
|
Requires-Dist: readerwriterlock
|
|
31
|
-
Requires-Dist: byzerllm[saas] >=0.1.
|
|
31
|
+
Requires-Dist: byzerllm[saas] >=0.1.187
|
|
32
32
|
Requires-Dist: patch
|
|
33
33
|
Requires-Dist: diff-match-patch
|
|
34
34
|
Requires-Dist: GitPython
|
|
@@ -11,7 +11,7 @@ autocoder/command_parser.py,sha256=fx1g9E6GaM273lGTcJqaFQ-hoksS_Ik2glBMnVltPCE,1
|
|
|
11
11
|
autocoder/lang.py,sha256=PFtATuOhHRnfpqHQkXr6p4C893JvpsgwTMif3l-GEi0,14321
|
|
12
12
|
autocoder/models.py,sha256=pD5u6gcMKRwWaLxeVin18g25k-ERyeHOFsRpOgO_Ae0,13788
|
|
13
13
|
autocoder/run_context.py,sha256=IUfSO6_gp2Wt1blFWAmOpN0b0nDrTTk4LmtCYUBIoro,1643
|
|
14
|
-
autocoder/version.py,sha256=
|
|
14
|
+
autocoder/version.py,sha256=_eG6Vyzk-NJSxEJd-HpLZRgj5aU8TeLxkg-hboV3wU4,25
|
|
15
15
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
autocoder/agent/agentic_filter.py,sha256=zlInIRhawKIYTJjCiJBWqPCOV5UtMbh5VnvszfTy2vo,39824
|
|
17
17
|
autocoder/agent/auto_demand_organizer.py,sha256=URAq0gSEiHeV_W4zwhOI_83kHz0Ryfj1gcfh5jwCv_w,6501
|
|
@@ -139,7 +139,7 @@ autocoder/common/directory_cache/cache.py,sha256=Jknygb_U6DkF04_SX04IwsOcQdd-2QQ
|
|
|
139
139
|
autocoder/common/directory_cache/test_cache.py,sha256=0iQkHaZQPhZBwSS6dwK_je93QMLbYGY0BYrTSt45Cao,6610
|
|
140
140
|
autocoder/common/file_checkpoint/__init__.py,sha256=qwoM0tIU-IMr-zGVCMN8yZtmz0NWpRe027l8z8sCjjk,847
|
|
141
141
|
autocoder/common/file_checkpoint/backup.py,sha256=JO26vOG9k7d8b5jgT24PdccSrTuPqKghp1nz5cmjSiE,8813
|
|
142
|
-
autocoder/common/file_checkpoint/conversation_checkpoint.py,sha256=
|
|
142
|
+
autocoder/common/file_checkpoint/conversation_checkpoint.py,sha256=OTDLL7TG5kXLGeYhAIL7pannKq_I43Bii97XZCHE6Uc,6333
|
|
143
143
|
autocoder/common/file_checkpoint/examples.py,sha256=HTik8E0ddvKjEPGwzizWJBHIP9URrWRyRUOKSjYRUG8,6272
|
|
144
144
|
autocoder/common/file_checkpoint/manager.py,sha256=H1s1l8biFGpgrEHZK7Em59DqLSvSgguilSfWRXmRF7c,23769
|
|
145
145
|
autocoder/common/file_checkpoint/models.py,sha256=dcZL2QGnklsa_BV_QY81fH-H5hYfhelXrH6GSrubMZo,4730
|
|
@@ -264,14 +264,14 @@ autocoder/privacy/model_filter.py,sha256=RyGh_uWWE6hHqvaYZGjFylDJldDLxBz5LDZP7CG
|
|
|
264
264
|
autocoder/pyproject/__init__.py,sha256=qn0_-6O_LP-ZH91nneYrn3yaIMYCYYRD1Z3MSNhXUXI,13754
|
|
265
265
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
266
266
|
autocoder/rag/agentic_rag.py,sha256=sXs1qo696zp6ZFaueYDa6AKBzy7O8x9D3wgTkC0zjr4,7851
|
|
267
|
-
autocoder/rag/api_server.py,sha256=
|
|
267
|
+
autocoder/rag/api_server.py,sha256=fFJs4-BxCkKRJwmqupkcEOZwwe5ALBew0QTw6JszaXY,14236
|
|
268
268
|
autocoder/rag/conversation_to_queries.py,sha256=QUeRacDZVVd5XiDvKZ1G71h2QpfmfZldc27Is6sTMdU,6508
|
|
269
269
|
autocoder/rag/doc_filter.py,sha256=UduVO2mlrngwJICrefjDJTYfdmQ4GcRXrfWDQ7xXksk,14206
|
|
270
270
|
autocoder/rag/document_retriever.py,sha256=rFwbAuHTvEFJq16HQNlmRLyJp2ddn2RNFslw_ncU7NI,8847
|
|
271
|
-
autocoder/rag/lang.py,sha256=
|
|
271
|
+
autocoder/rag/lang.py,sha256=TRtbyicotAQdOU5SDDTNvddAo9Lz2T0WCSvc1JNlrlQ,3459
|
|
272
272
|
autocoder/rag/llm_wrapper.py,sha256=LsNv8maCnvazyXjjtkO9aN3OT7Br20V1ilHV8Lt45Os,4245
|
|
273
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
274
|
-
autocoder/rag/qa_conversation_strategy.py,sha256=
|
|
273
|
+
autocoder/rag/long_context_rag.py,sha256=t9SEhkc0Rc1nWcezj_fANvsUVH5lFZ6ZpWtyBqJl4jk,53236
|
|
274
|
+
autocoder/rag/qa_conversation_strategy.py,sha256=MdOBP7aZUtOSou5vQhDcUxySBCVZXytZwNqmrGW6fXg,10700
|
|
275
275
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
276
276
|
autocoder/rag/rag_entry.py,sha256=QOdUX_nd1Qak2NyOW0CYcLRDB26AZ6MeByHJaMMGgqs,2316
|
|
277
277
|
autocoder/rag/relevant_utils.py,sha256=25wRiX-CrBsratASLGHsZE3ux7VjwaQoDNtl74UlV5U,1749
|
|
@@ -336,9 +336,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
336
336
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
337
337
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=t902pKxQ5xM7zgIHiAOsTPLwxhE6VuvXAqPy751S7fg,14096
|
|
338
338
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
339
|
-
auto_coder-0.1.
|
|
340
|
-
auto_coder-0.1.
|
|
341
|
-
auto_coder-0.1.
|
|
342
|
-
auto_coder-0.1.
|
|
343
|
-
auto_coder-0.1.
|
|
344
|
-
auto_coder-0.1.
|
|
339
|
+
auto_coder-0.1.389.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
340
|
+
auto_coder-0.1.389.dist-info/METADATA,sha256=vmgcu_JB1Mf3kCDXkyJ0NZzjh_ItUfwdIV2bKKNanGU,2796
|
|
341
|
+
auto_coder-0.1.389.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
342
|
+
auto_coder-0.1.389.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
343
|
+
auto_coder-0.1.389.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
344
|
+
auto_coder-0.1.389.dist-info/RECORD,,
|
|
@@ -62,7 +62,7 @@ class ConversationCheckpointStore:
|
|
|
62
62
|
# 保存为JSON文件
|
|
63
63
|
try:
|
|
64
64
|
with open(file_path, 'w', encoding='utf-8') as f:
|
|
65
|
-
f.write(checkpoint.
|
|
65
|
+
f.write(checkpoint.model_dump_json(ensure_ascii=False, indent=2))
|
|
66
66
|
|
|
67
67
|
logger.info(f"已保存对话检查点: {checkpoint.checkpoint_id}")
|
|
68
68
|
|
autocoder/rag/api_server.py
CHANGED
|
@@ -127,7 +127,14 @@ async def create_chat_completion(
|
|
|
127
127
|
if body.stream:
|
|
128
128
|
return StreamingResponse(
|
|
129
129
|
content=generator,
|
|
130
|
-
media_type="text/event-stream"
|
|
130
|
+
media_type="text/event-stream",
|
|
131
|
+
headers={
|
|
132
|
+
"Cache-Control": "no-cache, no-transform",
|
|
133
|
+
"Connection": "keep-alive",
|
|
134
|
+
"Content-Type": "text/event-stream",
|
|
135
|
+
"X-Accel-Buffering": "no",
|
|
136
|
+
"Transfer-Encoding": "chunked",
|
|
137
|
+
}
|
|
131
138
|
)
|
|
132
139
|
else:
|
|
133
140
|
return JSONResponse(content=generator.model_dump())
|
|
@@ -381,5 +388,5 @@ def serve(llm:ByzerLLM, args: ServerArgs):
|
|
|
381
388
|
log_level=args.uvicorn_log_level,
|
|
382
389
|
timeout_keep_alive=TIMEOUT_KEEP_ALIVE,
|
|
383
390
|
ssl_keyfile=args.ssl_keyfile,
|
|
384
|
-
ssl_certfile=args.ssl_certfile
|
|
391
|
+
ssl_certfile=args.ssl_certfile
|
|
385
392
|
)
|
autocoder/rag/lang.py
CHANGED
|
@@ -49,6 +49,10 @@ MESSAGES = {
|
|
|
49
49
|
"context_docs_names": {
|
|
50
50
|
"en": "The following are the documents related to the user's question: {{context_docs_names}}",
|
|
51
51
|
"zh": "以下是和用户问题相关的文档:{{context_docs_names}}"
|
|
52
|
+
},
|
|
53
|
+
"rag_processing": {
|
|
54
|
+
"en": "Processing...\n",
|
|
55
|
+
"zh": "处理中...\n"
|
|
52
56
|
}
|
|
53
57
|
}
|
|
54
58
|
|
|
@@ -460,7 +460,7 @@ class LongContextRAG:
|
|
|
460
460
|
),
|
|
461
461
|
)
|
|
462
462
|
|
|
463
|
-
context = []
|
|
463
|
+
context = []
|
|
464
464
|
|
|
465
465
|
return self._generate_sream(
|
|
466
466
|
conversations=conversations,
|
|
@@ -492,6 +492,15 @@ class LongContextRAG:
|
|
|
492
492
|
extra_request_params=None
|
|
493
493
|
):
|
|
494
494
|
"""将RAG流程分为三个主要阶段的生成器函数"""
|
|
495
|
+
|
|
496
|
+
yield ("", SingleOutputMeta(
|
|
497
|
+
input_tokens_count=0,
|
|
498
|
+
generated_tokens_count=0,
|
|
499
|
+
reasoning_content=get_message_with_format_and_newline(
|
|
500
|
+
"rag_processing"
|
|
501
|
+
)
|
|
502
|
+
))
|
|
503
|
+
|
|
495
504
|
# 第一阶段:文档召回和过滤
|
|
496
505
|
doc_retrieval_generator = self._process_document_retrieval(
|
|
497
506
|
conversations=conversations,
|
|
@@ -676,7 +685,7 @@ class LongContextRAG:
|
|
|
676
685
|
def _process_document_retrieval(self, conversations,
|
|
677
686
|
query, rag_stat):
|
|
678
687
|
"""第一阶段:文档召回和过滤"""
|
|
679
|
-
recall_start_time = time.time() # 记录召回阶段开始时间
|
|
688
|
+
recall_start_time = time.time() # 记录召回阶段开始时间
|
|
680
689
|
|
|
681
690
|
yield ("", SingleOutputMeta(
|
|
682
691
|
input_tokens_count=0,
|
|
@@ -216,13 +216,15 @@ class SingleRoundStrategy(QAConversationStrategy):
|
|
|
216
216
|
- If the documents do not contain enough information to answer, reply: "抱歉,文档中没有足够的信息来回答这个问题。"
|
|
217
217
|
- Do NOT invent, guess, or add information beyond what is provided.
|
|
218
218
|
|
|
219
|
+
|
|
220
|
+
{% if local_image_host %}
|
|
219
221
|
- For Markdown images like :
|
|
220
222
|
- Analyze surrounding text to determine relevance.
|
|
221
223
|
- Include relevant images naturally in your answer, preserving image paths.
|
|
222
|
-
- Convert Windows paths to Linux style (e.g., C:\\path\\to\\img.png -> C:/path/to/img.png)
|
|
223
|
-
{% if local_image_host %}
|
|
224
|
+
- Convert Windows paths to Linux style (e.g., C:\\path\\to\\img.png -> C:/path/to/img.png)
|
|
224
225
|
- Prefix image URLs with http://{{ local_image_host }}/static/
|
|
225
|
-
{
|
|
226
|
+
for example: , return 
|
|
227
|
+
{% endif %}
|
|
226
228
|
|
|
227
229
|
- Format your answer with Markdown for readability.
|
|
228
230
|
- Always use the language used by the user in their question.
|
autocoder/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.389"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|