auto-coder 0.1.285__py3-none-any.whl → 0.1.287__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.285
3
+ Version: 0.1.287
4
4
  Summary: AutoCoder: AutoCoder
5
5
  Author: allwefantasy
6
6
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
@@ -1,5 +1,5 @@
1
1
  autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- autocoder/auto_coder.py,sha256=cxH77xjLPwCmE6R-o1KpONOZlVNOvbTYV4ilAjL8w8A,65592
2
+ autocoder/auto_coder.py,sha256=zKqfMdm2F419hrNGaosW4kYJ3IbaxBKlpTlVl6JFWmE,65563
3
3
  autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
4
4
  autocoder/auto_coder_rag.py,sha256=cwsCpudP6d2CHOUTD-RXw7CCgx-c7sG7_cKqnjzphlk,32973
5
5
  autocoder/auto_coder_rag_client_mcp.py,sha256=QRxUbjc6A8UmDMQ8lXgZkjgqtq3lgKYeatJbDY6rSo0,6270
@@ -12,7 +12,7 @@ autocoder/chat_auto_coder_lang.py,sha256=ShOQVOnMA-WlT-fB9OrOer-xQkbcWxJGl-WMPuZ
12
12
  autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
13
13
  autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
14
14
  autocoder/models.py,sha256=AyoZ-Pzy0oyYUmWCxOIRiOImsqboSfRET7LO9-UOuxI,11172
15
- autocoder/version.py,sha256=ZNl6eGKNCUhwHmou7juFkfrLHxtIBnhFYAdxG4tZCVU,23
15
+ autocoder/version.py,sha256=TgX7xT-wBNrY4JVme-rsCx4pxrknseeO4ib0p9_mSr0,23
16
16
  autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
17
  autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
18
18
  autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
@@ -131,7 +131,7 @@ autocoder/rag/cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
131
131
  autocoder/rag/cache/base_cache.py,sha256=EaYYYbclMBvnlOUoM7qonnluwZX5oSvUjdvGvFun8_8,742
132
132
  autocoder/rag/cache/byzer_storage_cache.py,sha256=gK90pf741CgccCzQ73urBorCqVyAfwU1FAqMtSorWVk,17232
133
133
  autocoder/rag/cache/file_monitor_cache.py,sha256=2TnOW8Y81Zc0WA1upRrkmQH18IMdv40CeNccmnTvd3c,4981
134
- autocoder/rag/cache/local_byzer_storage_cache.py,sha256=P9JrykSDrJ-lpqMBcj3jiMpRDhJroMtilgfagJDhEM4,17547
134
+ autocoder/rag/cache/local_byzer_storage_cache.py,sha256=kgGMYP4MIc4upXcwTmeGbWYW4dDnt-hhJKmnjsFPKU4,18977
135
135
  autocoder/rag/cache/simple_cache.py,sha256=8FMmBAfhAPcdSNUWC6Ga43LBFGXD-klwabVbzm_bciI,9347
136
136
  autocoder/rag/loaders/__init__.py,sha256=EQHEZ5Cmz-mGP2SllUTvcIbYCnF7W149dNpNItfs0yE,304
137
137
  autocoder/rag/loaders/docx_loader.py,sha256=ZswPqiiLngUEpzLhNNm1nmwEYV7ZHFEfIoXoG7c5GDU,614
@@ -169,9 +169,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
170
170
  autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=lkJ_A-sYU36JMzjFWkk3pR6uos8oZHYt9GPsPe_CPAo,11766
171
171
  autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
172
- auto_coder-0.1.285.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
173
- auto_coder-0.1.285.dist-info/METADATA,sha256=J5zwU-ff0TGeethVz51HTvLJ4F02owu3Fk6XronBJ4E,2643
174
- auto_coder-0.1.285.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
175
- auto_coder-0.1.285.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
176
- auto_coder-0.1.285.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
177
- auto_coder-0.1.285.dist-info/RECORD,,
172
+ auto_coder-0.1.287.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
173
+ auto_coder-0.1.287.dist-info/METADATA,sha256=GlAQDZSfDaELMYZ98w_-N91PzQVS1KVD4-Xil0RNTH0,2643
174
+ auto_coder-0.1.287.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
175
+ auto_coder-0.1.287.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
176
+ auto_coder-0.1.287.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
177
+ auto_coder-0.1.287.dist-info/RECORD,,
autocoder/auto_coder.py CHANGED
@@ -1321,8 +1321,8 @@ def main(input_args: Optional[List[str]] = None):
1321
1321
  args.enable_rag_context = False
1322
1322
  rag = RAGFactory.get_rag(llm=chat_llm, args=args, path="")
1323
1323
  response = rag.stream_chat_oai(
1324
- conversations=[{"role": "user", "content": args.query}])[0]
1325
- v = ([item, None] for item in response)
1324
+ conversations=loaded_conversations)[0]
1325
+ v = (item for item in response)
1326
1326
 
1327
1327
  elif "mcp" in args.action:
1328
1328
  from autocoder.common.mcp_server import get_mcp_server, McpRequest, McpInstallRequest, McpRemoveRequest, McpListRequest, McpListRunningRequest, McpRefreshRequest
@@ -399,6 +399,27 @@ class LocalByzerStorageCache(BaseCacheManager):
399
399
 
400
400
  results = query_builder.execute()
401
401
 
402
+ logger.info(f"从缓存获取: {len(results)} 条数据")
403
+ # Preview first 5 results with all fields but limited content size
404
+ preview_results = []
405
+ for r in results[:5]:
406
+ # Create a copy of the entire result
407
+ preview = r.copy()
408
+ # Similarly limit raw_content if it exists
409
+ if "raw_content" in preview and isinstance(preview["raw_content"], str):
410
+ preview["raw_content"] = preview["raw_content"][:100] + "..." if len(preview["raw_content"]) > 100 else preview["raw_content"]
411
+ preview_results.append(preview)
412
+ logger.info(f"预览前5条数据:")
413
+
414
+ for r in preview_results:
415
+ logger.info(f"文件路径: {r['file_path']}")
416
+ logger.info(f"原始内容: {r['raw_content']}")
417
+ # 打印其他字段
418
+ for k, v in r.items():
419
+ if k not in ["file_path", "raw_content"]:
420
+ logger.info(f"{k}: {v}")
421
+ logger.info("-"*100)
422
+
402
423
  # Group results by file_path and reconstruct documents while preserving order
403
424
  # 这里还可以有排序优化,综合考虑一篇内容出现的次数以及排序位置
404
425
  file_paths = []
@@ -416,10 +437,12 @@ class LocalByzerStorageCache(BaseCacheManager):
416
437
  cached_data = self.cache[file_path]
417
438
  for doc in cached_data.content:
418
439
  if total_tokens + doc["tokens"] > self.max_output_tokens:
440
+ logger.info(f"用户tokens设置为:{self.max_output_tokens},累计tokens: {total_tokens} 当前文件: {file_path} tokens: {doc['tokens']},数据条数变化: {len(results)} -> {len(result)}")
419
441
  return result
420
442
  total_tokens += doc["tokens"]
421
443
  result[file_path] = cached_data.model_dump()
422
-
444
+
445
+ logger.info(f"用户tokens设置为:{self.max_output_tokens},累计tokens: {total_tokens},数据条数变化: {len(results)} -> {len(result)}")
423
446
  return result
424
447
 
425
448
  def get_all_files(self) -> List[FileInfo]:
autocoder/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.285"
1
+ __version__ = "0.1.287"