auto-coder 0.1.385__py3-none-any.whl → 0.1.386__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.385
3
+ Version: 0.1.386
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -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=iaY60sgwWc9wED3HJ9j7D-Lk6OSNJoA1OS8XwdbqWtI,25
14
+ autocoder/version.py,sha256=ewlcOPLprhg9FRUvKAkBRztROZ3NcCXy95_cE4YsrEw,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
@@ -270,7 +270,7 @@ autocoder/rag/doc_filter.py,sha256=UduVO2mlrngwJICrefjDJTYfdmQ4GcRXrfWDQ7xXksk,1
270
270
  autocoder/rag/document_retriever.py,sha256=rFwbAuHTvEFJq16HQNlmRLyJp2ddn2RNFslw_ncU7NI,8847
271
271
  autocoder/rag/lang.py,sha256=HvcMeu6jReEJOGxyLMn4rwBoD-myFwmykS3VLceBJLs,3364
272
272
  autocoder/rag/llm_wrapper.py,sha256=LsNv8maCnvazyXjjtkO9aN3OT7Br20V1ilHV8Lt45Os,4245
273
- autocoder/rag/long_context_rag.py,sha256=gL35Y52lCJB3Lf0JgU-kDPCHEf6cR5QgA8uUontyKbo,52822
273
+ autocoder/rag/long_context_rag.py,sha256=z5A_RTIgNq52ridpBAiaUQfkvUtrFtnnmBVuTBNiH_I,52970
274
274
  autocoder/rag/qa_conversation_strategy.py,sha256=4CiMK88apKbJ2YM4HHq1KGpr5jUkTh0_m_aCyt-JYgc,10568
275
275
  autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
276
276
  autocoder/rag/rag_entry.py,sha256=QOdUX_nd1Qak2NyOW0CYcLRDB26AZ6MeByHJaMMGgqs,2316
@@ -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.385.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
340
- auto_coder-0.1.385.dist-info/METADATA,sha256=CBTR-3ZwyAp_dQkgpXTl3XVwwwUjkQjz6zdkVJnc1WI,2796
341
- auto_coder-0.1.385.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
342
- auto_coder-0.1.385.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
343
- auto_coder-0.1.385.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
344
- auto_coder-0.1.385.dist-info/RECORD,,
339
+ auto_coder-0.1.386.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
340
+ auto_coder-0.1.386.dist-info/METADATA,sha256=JEM-W8Syh3EbBSXxkad9DNuS08NI-_u_Q-uYWX94c4A,2796
341
+ auto_coder-0.1.386.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
342
+ auto_coder-0.1.386.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
343
+ auto_coder-0.1.386.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
344
+ auto_coder-0.1.386.dist-info/RECORD,,
@@ -868,16 +868,7 @@ class LongContextRAG:
868
868
  new_conversations = qa_strategy.create_conversation(
869
869
  documents=[doc.source_code for doc in relevant_docs],
870
870
  conversations=conversations, local_image_host=self.args.local_image_host
871
- )
872
-
873
- # 保存对话日志
874
- try:
875
- logger.info(f"Saving new_conversations log to {self.args.source_dir}/.cache/logs")
876
- project_root = self.args.source_dir
877
- json_text = json.dumps(new_conversations, ensure_ascii=False)
878
- save_formatted_log(project_root, json_text, "rag_conversation")
879
- except Exception as e:
880
- logger.warning(f"Failed to save new_conversations log: {e}")
871
+ )
881
872
 
882
873
  # 流式生成回答
883
874
  chunks = target_llm.stream_chat_oai(
@@ -888,8 +879,9 @@ class LongContextRAG:
888
879
  delta_mode=True,
889
880
  extra_request_params=extra_request_params
890
881
  )
891
-
882
+
892
883
  # 返回结果并更新统计信息
884
+ last_content = ""
893
885
  for chunk in chunks:
894
886
  if chunk[1] is not None:
895
887
  rag_stat.answer_stat.total_input_tokens += chunk[1].input_tokens_count
@@ -900,7 +892,18 @@ class LongContextRAG:
900
892
  chunk[1].generated_tokens_count = rag_stat.recall_stat.total_generated_tokens + \
901
893
  rag_stat.chunk_stat.total_generated_tokens + \
902
894
  rag_stat.answer_stat.total_generated_tokens
895
+ last_content += chunk[0]
903
896
  yield chunk
897
+
898
+ # 保存对话日志
899
+ try:
900
+ logger.info(f"Saving new_conversations log to {self.args.source_dir}/.cache/logs")
901
+ project_root = self.args.source_dir
902
+ json_text = json.dumps(new_conversations + [{"role": "assistant", "content": last_content}], ensure_ascii=False)
903
+ save_formatted_log(project_root, json_text, "rag_conversation")
904
+ except Exception as e:
905
+ logger.warning(f"Failed to save new_conversations log: {e}")
906
+
904
907
  rag_stat.answer_stat.duration = time.time() - answer_start_time # 记录答案生成阶段耗时
905
908
 
906
909
  def _print_rag_stats(self, rag_stat: RAGStat, conversations: Optional[List[Dict[str, str]]] = None) -> None:
autocoder/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
 
2
- __version__ = "0.1.385"
2
+ __version__ = "0.1.386"