auto-coder 0.1.388__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.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto-coder
3
- Version: 0.1.388
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.186
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=hNsmB1tFGyMvodXf4gkbGjHmHME4WMQKrmpne8xb3T0,25
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
@@ -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=TNN5CmR1nlMgeuZVYZ1U3a48XBp647Io9P-VvCkdI9o,13936
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=HvcMeu6jReEJOGxyLMn4rwBoD-myFwmykS3VLceBJLs,3364
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=z5A_RTIgNq52ridpBAiaUQfkvUtrFtnnmBVuTBNiH_I,52970
274
- autocoder/rag/qa_conversation_strategy.py,sha256=4CiMK88apKbJ2YM4HHq1KGpr5jUkTh0_m_aCyt-JYgc,10568
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.388.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
340
- auto_coder-0.1.388.dist-info/METADATA,sha256=fjJIU0SQjvcMLq6RwM8_uFL9u4AvvnwI3GeEUwEEUzg,2796
341
- auto_coder-0.1.388.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
342
- auto_coder-0.1.388.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
343
- auto_coder-0.1.388.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
344
- auto_coder-0.1.388.dist-info/RECORD,,
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,,
@@ -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 ![image](/path/to/image.png):
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
- {% endif %}
226
+ for example: ![image](/path/to/image.png), return ![image](http://{{ local_image_host }}/static/path/to/image.png)
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.388"
2
+ __version__ = "0.1.389"