auto-coder 0.1.251__py3-none-any.whl → 0.1.253__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.251.dist-info → auto_coder-0.1.253.dist-info}/METADATA +2 -2
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.253.dist-info}/RECORD +32 -30
- autocoder/auto_coder.py +32 -7
- autocoder/auto_coder_rag.py +198 -35
- autocoder/chat_auto_coder.py +73 -19
- autocoder/chat_auto_coder_lang.py +21 -3
- autocoder/common/__init__.py +2 -0
- autocoder/common/auto_coder_lang.py +6 -4
- autocoder/common/code_auto_merge.py +1 -1
- autocoder/common/code_auto_merge_diff.py +1 -1
- autocoder/common/code_auto_merge_editblock.py +1 -1
- autocoder/common/code_auto_merge_strict_diff.py +1 -1
- autocoder/common/code_modification_ranker.py +3 -3
- autocoder/common/global_cancel.py +21 -0
- autocoder/common/mcp_server.py +3 -4
- autocoder/common/mcp_servers/mcp_server_perplexity.py +1 -1
- autocoder/dispacher/actions/action.py +29 -8
- autocoder/dispacher/actions/plugins/action_regex_project.py +17 -5
- autocoder/index/filter/quick_filter.py +4 -6
- autocoder/index/index.py +13 -6
- autocoder/models.py +87 -6
- autocoder/rag/doc_filter.py +2 -4
- autocoder/rag/long_context_rag.py +8 -6
- autocoder/rag/token_limiter.py +1 -3
- autocoder/utils/auto_coder_utils/chat_stream_out.py +40 -17
- autocoder/utils/llms.py +15 -1
- autocoder/utils/thread_utils.py +201 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.253.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.253.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.253.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.253.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.253
|
|
4
4
|
Summary: AutoCoder: AutoCoder
|
|
5
5
|
Author: allwefantasy
|
|
6
6
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
@@ -26,7 +26,7 @@ Requires-Dist: tabulate
|
|
|
26
26
|
Requires-Dist: jupyter-client
|
|
27
27
|
Requires-Dist: prompt-toolkit
|
|
28
28
|
Requires-Dist: tokenizers
|
|
29
|
-
Requires-Dist: byzerllm[saas] >=0.1.
|
|
29
|
+
Requires-Dist: byzerllm[saas] >=0.1.163
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff-match-patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=KTc-twhc4MNabzgNWj8nDZZTD-uMneDABnFSWnt6Ta8,64640
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
4
|
-
autocoder/auto_coder_rag.py,sha256=
|
|
4
|
+
autocoder/auto_coder_rag.py,sha256=DDAmqw36CO6phtdQuN8LYIbIR3YGdoZw5-pG0LjVxMc,29063
|
|
5
5
|
autocoder/auto_coder_rag_client_mcp.py,sha256=WV7j5JUiQge0x4-B7Hp5-pSAFXLbvLpzQMcCovbauIM,6276
|
|
6
6
|
autocoder/auto_coder_rag_mcp.py,sha256=-RrjNwFaS2e5v8XDIrKR-zlUNUE8UBaeOtojffBrvJo,8521
|
|
7
7
|
autocoder/auto_coder_server.py,sha256=XU9b4SBH7zjPPXaTWWHV4_zJm-XYa6njuLQaplYJH_c,20290
|
|
8
8
|
autocoder/benchmark.py,sha256=Ypomkdzd1T3GE6dRICY3Hj547dZ6_inqJbBJIp5QMco,4423
|
|
9
|
-
autocoder/chat_auto_coder.py,sha256=
|
|
10
|
-
autocoder/chat_auto_coder_lang.py,sha256=
|
|
9
|
+
autocoder/chat_auto_coder.py,sha256=1QgTy6SiZjN2mkYe5pVvPTdZyedwijDctTUS8tSukVM,107527
|
|
10
|
+
autocoder/chat_auto_coder_lang.py,sha256=OiwjnOqbiWwbaVuOhehEqdUFPOJbhfvQr3sIq3b0xj4,17455
|
|
11
11
|
autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
|
|
12
12
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
13
|
-
autocoder/models.py,sha256=
|
|
14
|
-
autocoder/version.py,sha256
|
|
13
|
+
autocoder/models.py,sha256=uo4mFWb-kdtd-8e2HPfCuXjhkDsE37n1dY6Nt1SU6kk,7625
|
|
14
|
+
autocoder/version.py,sha256=r3svv_IwmWAh4ENi7e33jEo4y7TePaK1ugMkXwnow5w,23
|
|
15
15
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
|
|
17
17
|
autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
|
|
@@ -25,11 +25,11 @@ autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMb
|
|
|
25
25
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
27
27
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
28
|
-
autocoder/common/__init__.py,sha256=
|
|
28
|
+
autocoder/common/__init__.py,sha256=6maackdzrYnUPvpgVPl92JdMOnw7X4n3EnEQA9OnLGE,11984
|
|
29
29
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
30
30
|
autocoder/common/anything2img.py,sha256=4TREa-sOA-iargieUy7MpyCYVUE-9Mmq0wJtwomPqnE,7662
|
|
31
31
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
32
|
-
autocoder/common/auto_coder_lang.py,sha256=
|
|
32
|
+
autocoder/common/auto_coder_lang.py,sha256=9qaluOOt0X6soURfQs27_jw2tIA95yoLdAcACt-Zsf4,16359
|
|
33
33
|
autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
|
|
34
34
|
autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
|
|
35
35
|
autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
|
|
@@ -38,22 +38,23 @@ autocoder/common/code_auto_generate.py,sha256=N_kENWW4eVPKmihpIQ4Q2ivYkugAuCWIPL
|
|
|
38
38
|
autocoder/common/code_auto_generate_diff.py,sha256=QAm-BVJgGl_wbw0VjY2RZigVCwOBO-l1W-90PrYDdOQ,16741
|
|
39
39
|
autocoder/common/code_auto_generate_editblock.py,sha256=FuVH-sP4_Ys2MJk9SkWgHHLAKp51bKSxTwFzd7voilg,18356
|
|
40
40
|
autocoder/common/code_auto_generate_strict_diff.py,sha256=kieVUx2KuR0BGtQHE0Ll7i8e_3Lb4xfFXHIXDttQACE,15274
|
|
41
|
-
autocoder/common/code_auto_merge.py,sha256
|
|
42
|
-
autocoder/common/code_auto_merge_diff.py,sha256=
|
|
43
|
-
autocoder/common/code_auto_merge_editblock.py,sha256=
|
|
44
|
-
autocoder/common/code_auto_merge_strict_diff.py,sha256=
|
|
45
|
-
autocoder/common/code_modification_ranker.py,sha256=
|
|
41
|
+
autocoder/common/code_auto_merge.py,sha256=-ksBjj4ZVcbY_tVH4JLXAMSRtsgaSxrSZ5-MOl9cAgE,7354
|
|
42
|
+
autocoder/common/code_auto_merge_diff.py,sha256=qpEuHJEgX6sWK7EDFEKqcYkyI28wOyM4pytyl8BLohY,15350
|
|
43
|
+
autocoder/common/code_auto_merge_editblock.py,sha256=sxgYMLMACRwJvw-bABkdDHezPelsDFrOCpGuhtT5Dzs,17504
|
|
44
|
+
autocoder/common/code_auto_merge_strict_diff.py,sha256=P0nKNkBrFMybTSZ7kOdA_JixoVmLCZIhAP5q7ILJ9j0,9538
|
|
45
|
+
autocoder/common/code_modification_ranker.py,sha256=qfadP9P-iiidCG2A_MjAf3Ca8cMz7YlnN08D_kH6uFc,6447
|
|
46
46
|
autocoder/common/command_completer.py,sha256=SSeb8MDH0JPvfdyW-S2uaHnui4VBDfSQvQPLbv3ORPA,9314
|
|
47
47
|
autocoder/common/command_generator.py,sha256=-hmbD_AnCa5HxL4BznuEfYAf_l8AxU5fAG5F0sM_fuE,2116
|
|
48
48
|
autocoder/common/command_templates.py,sha256=mnB3n8i0yjH1mqzyClEg8Wpr9VbZV44kxky66Zu6OJY,8557
|
|
49
49
|
autocoder/common/const.py,sha256=eTjhjh4Aj4CUzviJ81jaf3Y5cwqsLATySn2wJxaS6RQ,2911
|
|
50
50
|
autocoder/common/files.py,sha256=CguxG9digkWBJpRaILErZmL_G5ryPRahPmPFWGB7X18,1973
|
|
51
51
|
autocoder/common/git_utils.py,sha256=zxgQt2PukabV_21podylAUzTY7Xk60bsQ7MQYw4s-Tg,23234
|
|
52
|
+
autocoder/common/global_cancel.py,sha256=hT7J7J5ChThIhk2x11_v4v9ASIn4HtwyPD26t2s-fwc,418
|
|
52
53
|
autocoder/common/image_to_page.py,sha256=O0cNO_vHHUP-fP4GXiVojShmNqkPnZXeIyiY1MRLpKg,13936
|
|
53
54
|
autocoder/common/interpreter.py,sha256=62-dIakOunYB4yjmX8SHC0Gdy2h8NtxdgbpdqRZJ5vk,2833
|
|
54
55
|
autocoder/common/llm_rerank.py,sha256=FbvtCzaR661Mt2wn0qsuiEL1Y3puD6jeIJS4zg_e7Bs,3260
|
|
55
56
|
autocoder/common/mcp_hub.py,sha256=2ZyJv3Aiv4Y97UHut49oYhIFcu7ICR-mptDEBSgT3uE,14234
|
|
56
|
-
autocoder/common/mcp_server.py,sha256=
|
|
57
|
+
autocoder/common/mcp_server.py,sha256=1G6e0IbeS_h7CA1vr0dPAnf0o2H1f1A8I4bua8EUtKw,12318
|
|
57
58
|
autocoder/common/mcp_tools.py,sha256=KsLvRrB6pvmebqd-lDaSH6IBJR0AIxWRE-dtCEG_w9k,12485
|
|
58
59
|
autocoder/common/memory_manager.py,sha256=2ZjYG7BPyvbYalZBF6AM_G5e10Qkw_zrqtD4Zd7GSsQ,3663
|
|
59
60
|
autocoder/common/printer.py,sha256=P1WU0QjlfnjqTP5uA55GkHZCpFzRPFkc34DMMandreg,2023
|
|
@@ -67,33 +68,33 @@ autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
|
67
68
|
autocoder/common/types.py,sha256=PXTETrsTvhLE49jqAeUKGySvxBN9pjeyCgRHLDYdd9U,664
|
|
68
69
|
autocoder/common/utils_code_auto_generate.py,sha256=kDW5B_2wRLk7hAls2hewliDacV86lrPz8Jan01BvtCw,3573
|
|
69
70
|
autocoder/common/mcp_servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
70
|
-
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=
|
|
71
|
+
autocoder/common/mcp_servers/mcp_server_perplexity.py,sha256=IXTyMpd1CQcBLzVinA-_OIOHoNmbzvuW6pXIadaKHJE,5533
|
|
71
72
|
autocoder/data/tokenizer.json,sha256=7Lb5_DaYlDRvBRH0B0ynXO5c1fOwbQLxujX805-OEh0,7847602
|
|
72
73
|
autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
73
74
|
autocoder/db/store.py,sha256=tFT66bP2ZKIqZip-uhLkHRSLaaOAUUDZfozJwcqix3c,1908
|
|
74
75
|
autocoder/dispacher/__init__.py,sha256=YoA64dIxnx4jcE1pwSfg81sjkQtjDkhddkfac1-cMWo,1230
|
|
75
76
|
autocoder/dispacher/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
76
|
-
autocoder/dispacher/actions/action.py,sha256=
|
|
77
|
+
autocoder/dispacher/actions/action.py,sha256=AmckPmTHFKRPTWi4lcw0kAnFw8dyQ9KKoN40JGMuP2s,21971
|
|
77
78
|
autocoder/dispacher/actions/copilot.py,sha256=iMh4ckj9hO5Q-iemF3CStXd7DatWai7Eci5zOlKxK9c,13072
|
|
78
79
|
autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
79
|
-
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=
|
|
80
|
+
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=ckTbisMlvwMNHQbrt5WB7pBvf2XAhYQYGH8uyYrvGXU,6060
|
|
80
81
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=nVAtRSQpdGNmZxg1R_9zXG3AuTv3CHf2v7ODgj8u65c,7727
|
|
81
82
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
82
83
|
autocoder/index/entry.py,sha256=hXSOi-jPgRBKQB55eqWkT95vxvWrbVHDuIMtDkqjNNw,12232
|
|
83
84
|
autocoder/index/for_command.py,sha256=BFvljE4t6VaMBGboZAuhUCzVK0EitCy_n5D_7FEnihw,3204
|
|
84
|
-
autocoder/index/index.py,sha256=
|
|
85
|
+
autocoder/index/index.py,sha256=hVAIyF10N9hxKMWHA_ibYygGRZYJQZfZxRRrhQhrTvk,21225
|
|
85
86
|
autocoder/index/symbols_utils.py,sha256=CjcjUVajmJZB75Ty3a7kMv1BZphrm-tIBAdOJv6uo-0,2037
|
|
86
87
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
87
88
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
89
|
autocoder/index/filter/normal_filter.py,sha256=APu34iSvWhtlLtWgkj8N3Vo4oW1TegtZQq2bwDX_cs4,8031
|
|
89
|
-
autocoder/index/filter/quick_filter.py,sha256=
|
|
90
|
+
autocoder/index/filter/quick_filter.py,sha256=8R54qtcAAAu0C6TQgJ4WkqkryGOke1mJXrv82vnvMAA,9342
|
|
90
91
|
autocoder/pyproject/__init__.py,sha256=dQ2_7YZ7guybT9BhfxSGn43eLQJGQN2zgeKa6--JlaQ,14403
|
|
91
92
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
92
93
|
autocoder/rag/api_server.py,sha256=dRbhAZVRAOlZ64Cnxf4_rKb4iJwHnrWS9Zr67IVORw0,7288
|
|
93
|
-
autocoder/rag/doc_filter.py,sha256=
|
|
94
|
+
autocoder/rag/doc_filter.py,sha256=bGx3OEmSwmqAFOT12nGDE8saMpukSsHFMVRVbHBgXik,6516
|
|
94
95
|
autocoder/rag/document_retriever.py,sha256=5oThtxukGuRFF96o3pHKsk306a8diXbhgSrbqyU2BvM,8894
|
|
95
96
|
autocoder/rag/llm_wrapper.py,sha256=sbDxCANiZyWb_ocqNgqu2oy3c2t8orPNRGleEs-Uwl8,2649
|
|
96
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
97
|
+
autocoder/rag/long_context_rag.py,sha256=aBp0fJ9JrlGb1KsJkQw0CSy7mX4kP52GPVKLX6sIXB4,25366
|
|
97
98
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
98
99
|
autocoder/rag/rag_entry.py,sha256=6TKtErZ0Us9XSV6HgRKXA6yR3SiZGPHpynOKSaR1wgE,2463
|
|
99
100
|
autocoder/rag/raw_rag.py,sha256=yS2Ur6kG0IRjhCj2_VonwxjY_xls_E62jO5Gz5j2nqE,2952
|
|
@@ -102,7 +103,7 @@ autocoder/rag/simple_directory_reader.py,sha256=LkKreCkNdEOoL4fNhc3_hDoyyWTQUte4
|
|
|
102
103
|
autocoder/rag/simple_rag.py,sha256=I902EUqOK1WM0Y2WFd7RzDJYofElvTZNLVCBtX5A9rc,14885
|
|
103
104
|
autocoder/rag/token_checker.py,sha256=jc76x6KWmvVxds6W8juZfQGaoErudc2HenG3sNQfSLs,2819
|
|
104
105
|
autocoder/rag/token_counter.py,sha256=C-Lwc4oIjJpZDEqp9WLHGOe6hb4yhrdJpMtkrtp_1qc,2125
|
|
105
|
-
autocoder/rag/token_limiter.py,sha256=
|
|
106
|
+
autocoder/rag/token_limiter.py,sha256=5JznJ-h1bG5x2Plx5H0MGkaAHo2GiD7CDIJmeZWWk_8,11015
|
|
106
107
|
autocoder/rag/types.py,sha256=WPgLpUTwbk0BAikyDOc0NOEwV5k73myF38zWdOuYdC4,2499
|
|
107
108
|
autocoder/rag/utils.py,sha256=x5L8gskxUUGkVEP5K-0C-iYntE84asuDXOCqdzdNUoA,4956
|
|
108
109
|
autocoder/rag/variable_holder.py,sha256=PFvBjFcR7-fNDD4Vcsc8CpH2Te057vcpwJMxtrfUgKI,75
|
|
@@ -128,7 +129,7 @@ autocoder/utils/_markitdown.py,sha256=RU88qn4eZfYIy0GDrPxlI8oYXIypbi63VRJjdlnE0V
|
|
|
128
129
|
autocoder/utils/coder.py,sha256=rK8e0svQBe0NOP26dIGToUXgha_hUDgxlWoC_p_r7oc,5698
|
|
129
130
|
autocoder/utils/conversation_store.py,sha256=sz-hhY7sttPAUOAQU6Pze-5zJc3j0_Emj22dM_0l5ro,1161
|
|
130
131
|
autocoder/utils/llm_client_interceptors.py,sha256=FEHNXoFZlCjAHQcjPRyX8FOMjo6rPXpO2AJ2zn2KTTo,901
|
|
131
|
-
autocoder/utils/llms.py,sha256=
|
|
132
|
+
autocoder/utils/llms.py,sha256=RBOSzH6xhedISzmiQMGH_swmVfY-QSTe5Cm1ZZGBhNE,2948
|
|
132
133
|
autocoder/utils/log_capture.py,sha256=I-bsJFLWoGUiX-GKoZsH9kWJCKSV7ZlUnRt7jh-fOL0,1548
|
|
133
134
|
autocoder/utils/multi_turn.py,sha256=unK9OpqVRbK6uIcTKXgggX2wNmyj7s5eyEAQ2xUwHoM,88
|
|
134
135
|
autocoder/utils/operate_config_api.py,sha256=99YAKsuUFLPwrRvj0CJal_bAPgyiXWMma6ZKMU56thw,5790
|
|
@@ -138,13 +139,14 @@ autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1
|
|
|
138
139
|
autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
|
|
139
140
|
autocoder/utils/rest.py,sha256=hLBhr78y-WVnV0oQf9Rxc22EwqF78KINkScvYa1MuYA,6435
|
|
140
141
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
142
|
+
autocoder/utils/thread_utils.py,sha256=uXc9HEr1kSTi491lc-BhFUsbc0wb3ikltZNJkL7Ocz4,8195
|
|
141
143
|
autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
142
144
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
143
|
-
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=
|
|
145
|
+
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xWXqICANbDOovH4wcFW1eSI7lB7TjXbk1mSU4bTKEW4,11434
|
|
144
146
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
145
|
-
auto_coder-0.1.
|
|
146
|
-
auto_coder-0.1.
|
|
147
|
-
auto_coder-0.1.
|
|
148
|
-
auto_coder-0.1.
|
|
149
|
-
auto_coder-0.1.
|
|
150
|
-
auto_coder-0.1.
|
|
147
|
+
auto_coder-0.1.253.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
148
|
+
auto_coder-0.1.253.dist-info/METADATA,sha256=NipnGMN1xPzRQLC0rvEbcWax5fPTf5T2pixSG_qVyYA,2616
|
|
149
|
+
auto_coder-0.1.253.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
150
|
+
auto_coder-0.1.253.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
151
|
+
auto_coder-0.1.253.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
152
|
+
auto_coder-0.1.253.dist-info/RECORD,,
|
autocoder/auto_coder.py
CHANGED
|
@@ -6,6 +6,7 @@ from autocoder.common import git_utils, code_auto_execute
|
|
|
6
6
|
from autocoder.utils.llm_client_interceptors import token_counter_interceptor
|
|
7
7
|
from autocoder.db.store import Store
|
|
8
8
|
|
|
9
|
+
from autocoder.utils.llms import get_llm_names
|
|
9
10
|
from autocoder.utils.queue_communicate import (
|
|
10
11
|
queue_communicate,
|
|
11
12
|
CommunicateEvent,
|
|
@@ -765,6 +766,23 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
765
766
|
)
|
|
766
767
|
llm.setup_sub_client("planner_model", planner_model)
|
|
767
768
|
|
|
769
|
+
if args.commit_model:
|
|
770
|
+
model_name = args.commit_model.strip()
|
|
771
|
+
model_info = models_module.get_model_by_name(model_name)
|
|
772
|
+
commit_model = byzerllm.SimpleByzerLLM(default_model_name=model_name)
|
|
773
|
+
commit_model.deploy(
|
|
774
|
+
model_path="",
|
|
775
|
+
pretrained_model_type=model_info["model_type"],
|
|
776
|
+
udf_name=model_name,
|
|
777
|
+
infer_params={
|
|
778
|
+
"saas.base_url": model_info["base_url"],
|
|
779
|
+
"saas.api_key": model_info["api_key"],
|
|
780
|
+
"saas.model": model_info["model_name"],
|
|
781
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
782
|
+
}
|
|
783
|
+
)
|
|
784
|
+
llm.setup_sub_client("commit_model", commit_model)
|
|
785
|
+
|
|
768
786
|
if args.designer_model:
|
|
769
787
|
model_name = args.designer_model.strip()
|
|
770
788
|
model_info = models_module.get_model_by_name(model_name)
|
|
@@ -875,6 +893,11 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
875
893
|
designer_model.setup_default_model_name(args.designer_model)
|
|
876
894
|
llm.setup_sub_client("designer_model", designer_model)
|
|
877
895
|
|
|
896
|
+
if args.commit_model:
|
|
897
|
+
commit_model = byzerllm.ByzerLLM()
|
|
898
|
+
commit_model.setup_default_model_name(args.commit_model)
|
|
899
|
+
llm.setup_sub_client("commit_model", commit_model)
|
|
900
|
+
|
|
878
901
|
else:
|
|
879
902
|
llm = None
|
|
880
903
|
|
|
@@ -1086,8 +1109,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1086
1109
|
return
|
|
1087
1110
|
|
|
1088
1111
|
elif raw_args.agent_command == "chat":
|
|
1089
|
-
|
|
1090
|
-
|
|
1112
|
+
|
|
1091
1113
|
memory_dir = os.path.join(args.source_dir, ".auto-coder", "memory")
|
|
1092
1114
|
os.makedirs(memory_dir, exist_ok=True)
|
|
1093
1115
|
memory_file = os.path.join(memory_dir, "chat_history.json")
|
|
@@ -1312,6 +1334,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1312
1334
|
start_time = time.time()
|
|
1313
1335
|
|
|
1314
1336
|
if "rag" in args.action:
|
|
1337
|
+
from autocoder.rag.rag_entry import RAGFactory
|
|
1315
1338
|
args.enable_rag_search = True
|
|
1316
1339
|
args.enable_rag_context = False
|
|
1317
1340
|
rag = RAGFactory.get_rag(llm=chat_llm, args=args, path="")
|
|
@@ -1325,7 +1348,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1325
1348
|
response = mcp_server.send_request(
|
|
1326
1349
|
McpRequest(
|
|
1327
1350
|
query=args.query,
|
|
1328
|
-
model=args.inference_model or args.model
|
|
1351
|
+
model=args.inference_model or args.model,
|
|
1352
|
+
product_mode=args.product_mode
|
|
1329
1353
|
)
|
|
1330
1354
|
)
|
|
1331
1355
|
v = [[response.result,None]]
|
|
@@ -1348,9 +1372,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1348
1372
|
)
|
|
1349
1373
|
|
|
1350
1374
|
|
|
1351
|
-
model_name =
|
|
1352
|
-
if not model_name:
|
|
1353
|
-
model_name = "unknown(without default model name)"
|
|
1375
|
+
model_name = ",".join(get_llm_names(chat_llm))
|
|
1354
1376
|
|
|
1355
1377
|
assistant_response, last_meta = stream_out(
|
|
1356
1378
|
v,
|
|
@@ -1364,10 +1386,13 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1364
1386
|
if last_meta:
|
|
1365
1387
|
elapsed_time = time.time() - start_time
|
|
1366
1388
|
printer = Printer()
|
|
1389
|
+
speed = last_meta.generated_tokens_count / elapsed_time
|
|
1367
1390
|
printer.print_in_terminal("stream_out_stats",
|
|
1368
1391
|
elapsed_time=elapsed_time,
|
|
1392
|
+
first_token_time=last_meta.first_token_time,
|
|
1369
1393
|
input_tokens=last_meta.input_tokens_count,
|
|
1370
|
-
output_tokens=last_meta.generated_tokens_count
|
|
1394
|
+
output_tokens=last_meta.generated_tokens_count,
|
|
1395
|
+
speed=round(speed, 2))
|
|
1371
1396
|
|
|
1372
1397
|
chat_history["ask_conversation"].append(
|
|
1373
1398
|
{"role": "assistant", "content": assistant_response}
|
autocoder/auto_coder_rag.py
CHANGED
|
@@ -32,7 +32,10 @@ if platform.system() == "Windows":
|
|
|
32
32
|
init()
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
def initialize_system():
|
|
35
|
+
def initialize_system(args):
|
|
36
|
+
if args.product_mode == "lite":
|
|
37
|
+
return
|
|
38
|
+
|
|
36
39
|
print(f"\n\033[1;34m{get_message('initializing')}\033[0m")
|
|
37
40
|
|
|
38
41
|
def print_status(message, status):
|
|
@@ -316,13 +319,30 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
316
319
|
action="store_true",
|
|
317
320
|
help="Whether to return responses without contexts. only works when pro plugin is installed",
|
|
318
321
|
)
|
|
319
|
-
|
|
320
|
-
|
|
322
|
+
|
|
323
|
+
serve_parser.add_argument("--data_cells_max_num",
|
|
321
324
|
type=int,
|
|
322
325
|
default=2000,
|
|
323
326
|
help="Maximum number of data cells to process",
|
|
324
327
|
)
|
|
325
328
|
|
|
329
|
+
serve_parser.add_argument(
|
|
330
|
+
"--product_mode",
|
|
331
|
+
type=str,
|
|
332
|
+
default="pro",
|
|
333
|
+
help="The mode of the auto-coder.rag, lite/pro default is pro",
|
|
334
|
+
)
|
|
335
|
+
serve_parser.add_argument(
|
|
336
|
+
"--lite",
|
|
337
|
+
action="store_true",
|
|
338
|
+
help="Run in lite mode (equivalent to --product_mode=lite)",
|
|
339
|
+
)
|
|
340
|
+
serve_parser.add_argument(
|
|
341
|
+
"--pro",
|
|
342
|
+
action="store_true",
|
|
343
|
+
help="Run in pro mode (equivalent to --product_mode=pro)",
|
|
344
|
+
)
|
|
345
|
+
|
|
326
346
|
serve_parser.add_argument(
|
|
327
347
|
"--recall_model",
|
|
328
348
|
default="",
|
|
@@ -373,6 +393,22 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
373
393
|
# Tools command
|
|
374
394
|
tools_parser = subparsers.add_parser("tools", help="Various tools")
|
|
375
395
|
tools_subparsers = tools_parser.add_subparsers(dest="tool", help="Available tools")
|
|
396
|
+
tools_parser.add_argument(
|
|
397
|
+
"--product_mode",
|
|
398
|
+
type=str,
|
|
399
|
+
default="pro",
|
|
400
|
+
help="The mode of the auto-coder.rag, lite/pro default is pro",
|
|
401
|
+
)
|
|
402
|
+
tools_parser.add_argument(
|
|
403
|
+
"--lite",
|
|
404
|
+
action="store_true",
|
|
405
|
+
help="Run in lite mode (equivalent to --product_mode=lite)",
|
|
406
|
+
)
|
|
407
|
+
tools_parser.add_argument(
|
|
408
|
+
"--pro",
|
|
409
|
+
action="store_true",
|
|
410
|
+
help="Run in pro mode (equivalent to --product_mode=pro)",
|
|
411
|
+
)
|
|
376
412
|
|
|
377
413
|
# Count tool
|
|
378
414
|
count_parser = tools_subparsers.add_parser("count", help="Count tokens in a file")
|
|
@@ -431,8 +467,15 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
431
467
|
benchmark_byzerllm(args.model, args.parallel, args.rounds, args.query)
|
|
432
468
|
|
|
433
469
|
elif args.command == "serve":
|
|
470
|
+
# Handle lite/pro flags
|
|
471
|
+
if args.lite:
|
|
472
|
+
args.product_mode = "lite"
|
|
473
|
+
elif args.pro:
|
|
474
|
+
args.product_mode = "pro"
|
|
475
|
+
|
|
434
476
|
if not args.quick:
|
|
435
|
-
initialize_system()
|
|
477
|
+
initialize_system(args)
|
|
478
|
+
|
|
436
479
|
server_args = ServerArgs(
|
|
437
480
|
**{
|
|
438
481
|
arg: getattr(args, arg)
|
|
@@ -448,7 +491,11 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
448
491
|
}
|
|
449
492
|
)
|
|
450
493
|
|
|
451
|
-
|
|
494
|
+
|
|
495
|
+
if auto_coder_args.enable_hybrid_index and args.product_mode == "lite":
|
|
496
|
+
raise Exception("Hybrid index is not supported in lite mode")
|
|
497
|
+
|
|
498
|
+
if auto_coder_args.enable_hybrid_index and args.product_mode == "pro":
|
|
452
499
|
# 尝试连接storage
|
|
453
500
|
try:
|
|
454
501
|
from byzerllm.apps.byzer_storage.simple_api import ByzerStorage
|
|
@@ -460,36 +507,107 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
460
507
|
"When enable_hybrid_index is true, ByzerStorage must be started"
|
|
461
508
|
)
|
|
462
509
|
logger.error("Please run 'byzerllm storage start' first")
|
|
463
|
-
return
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
llm = byzerllm.ByzerLLM()
|
|
467
|
-
llm.setup_default_model_name(args.model)
|
|
468
|
-
|
|
469
|
-
# Setup sub models if specified
|
|
470
|
-
if args.recall_model:
|
|
471
|
-
recall_model = byzerllm.ByzerLLM()
|
|
472
|
-
recall_model.setup_default_model_name(args.recall_model)
|
|
473
|
-
llm.setup_sub_client("recall_model", recall_model)
|
|
474
|
-
|
|
475
|
-
if args.chunk_model:
|
|
476
|
-
chunk_model = byzerllm.ByzerLLM()
|
|
477
|
-
chunk_model.setup_default_model_name(args.chunk_model)
|
|
478
|
-
llm.setup_sub_client("chunk_model", chunk_model)
|
|
510
|
+
return
|
|
511
|
+
|
|
512
|
+
|
|
479
513
|
|
|
480
|
-
if args.
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
llm.
|
|
514
|
+
if args.product_mode == "pro":
|
|
515
|
+
byzerllm.connect_cluster(address=args.ray_address)
|
|
516
|
+
llm = byzerllm.ByzerLLM()
|
|
517
|
+
llm.skip_nontext_check = True
|
|
518
|
+
llm.setup_default_model_name(args.model)
|
|
519
|
+
|
|
520
|
+
# Setup sub models if specified
|
|
521
|
+
if args.recall_model:
|
|
522
|
+
recall_model = byzerllm.ByzerLLM()
|
|
523
|
+
recall_model.setup_default_model_name(args.recall_model)
|
|
524
|
+
recall_model.skip_nontext_check = True
|
|
525
|
+
llm.setup_sub_client("recall_model", recall_model)
|
|
526
|
+
|
|
527
|
+
if args.chunk_model:
|
|
528
|
+
chunk_model = byzerllm.ByzerLLM()
|
|
529
|
+
chunk_model.setup_default_model_name(args.chunk_model)
|
|
530
|
+
llm.setup_sub_client("chunk_model", chunk_model)
|
|
531
|
+
|
|
532
|
+
if args.qa_model:
|
|
533
|
+
qa_model = byzerllm.ByzerLLM()
|
|
534
|
+
qa_model.setup_default_model_name(args.qa_model)
|
|
535
|
+
qa_model.skip_nontext_check = True
|
|
536
|
+
llm.setup_sub_client("qa_model", qa_model)
|
|
537
|
+
|
|
538
|
+
# 当启用hybrid_index时,检查必要的组件
|
|
539
|
+
if auto_coder_args.enable_hybrid_index:
|
|
540
|
+
if not llm.is_model_exist("emb"):
|
|
541
|
+
logger.error(
|
|
542
|
+
"When enable_hybrid_index is true, an 'emb' model must be deployed"
|
|
543
|
+
)
|
|
544
|
+
return
|
|
545
|
+
llm.setup_default_emb_model_name("emb")
|
|
546
|
+
|
|
547
|
+
elif args.product_mode == "lite":
|
|
548
|
+
from autocoder import models as models_module
|
|
549
|
+
model_info = models_module.get_model_by_name(args.model)
|
|
550
|
+
llm = byzerllm.SimpleByzerLLM(default_model_name=args.model)
|
|
551
|
+
llm.deploy(
|
|
552
|
+
model_path="",
|
|
553
|
+
pretrained_model_type=model_info["model_type"],
|
|
554
|
+
udf_name=args.model,
|
|
555
|
+
infer_params={
|
|
556
|
+
"saas.base_url": model_info["base_url"],
|
|
557
|
+
"saas.api_key": model_info["api_key"],
|
|
558
|
+
"saas.model": model_info["model_name"],
|
|
559
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
560
|
+
}
|
|
561
|
+
)
|
|
484
562
|
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
563
|
+
# Setup sub models if specified
|
|
564
|
+
if args.recall_model:
|
|
565
|
+
model_info = models_module.get_model_by_name(args.recall_model)
|
|
566
|
+
recall_model = byzerllm.SimpleByzerLLM(default_model_name=args.recall_model)
|
|
567
|
+
recall_model.deploy(
|
|
568
|
+
model_path="",
|
|
569
|
+
pretrained_model_type=model_info["model_type"],
|
|
570
|
+
udf_name=args.recall_model,
|
|
571
|
+
infer_params={
|
|
572
|
+
"saas.base_url": model_info["base_url"],
|
|
573
|
+
"saas.api_key": model_info["api_key"],
|
|
574
|
+
"saas.model": model_info["model_name"],
|
|
575
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
576
|
+
}
|
|
490
577
|
)
|
|
491
|
-
|
|
492
|
-
|
|
578
|
+
llm.setup_sub_client("recall_model", recall_model)
|
|
579
|
+
|
|
580
|
+
if args.chunk_model:
|
|
581
|
+
model_info = models_module.get_model_by_name(args.chunk_model)
|
|
582
|
+
chunk_model = byzerllm.SimpleByzerLLM(default_model_name=args.chunk_model)
|
|
583
|
+
chunk_model.deploy(
|
|
584
|
+
model_path="",
|
|
585
|
+
pretrained_model_type=model_info["model_type"],
|
|
586
|
+
udf_name=args.chunk_model,
|
|
587
|
+
infer_params={
|
|
588
|
+
"saas.base_url": model_info["base_url"],
|
|
589
|
+
"saas.api_key": model_info["api_key"],
|
|
590
|
+
"saas.model": model_info["model_name"],
|
|
591
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
592
|
+
}
|
|
593
|
+
)
|
|
594
|
+
llm.setup_sub_client("chunk_model", chunk_model)
|
|
595
|
+
|
|
596
|
+
if args.qa_model:
|
|
597
|
+
model_info = models_module.get_model_by_name(args.qa_model)
|
|
598
|
+
qa_model = byzerllm.SimpleByzerLLM(default_model_name=args.qa_model)
|
|
599
|
+
qa_model.deploy(
|
|
600
|
+
model_path="",
|
|
601
|
+
pretrained_model_type=model_info["model_type"],
|
|
602
|
+
udf_name=args.qa_model,
|
|
603
|
+
infer_params={
|
|
604
|
+
"saas.base_url": model_info["base_url"],
|
|
605
|
+
"saas.api_key": model_info["api_key"],
|
|
606
|
+
"saas.model": model_info["model_name"],
|
|
607
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
llm.setup_sub_client("qa_model", qa_model)
|
|
493
611
|
|
|
494
612
|
if server_args.doc_dir:
|
|
495
613
|
auto_coder_args.rag_type = "simple"
|
|
@@ -577,16 +695,61 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
577
695
|
count_tokens(args.tokenizer_path, args.file)
|
|
578
696
|
elif args.tool == "recall":
|
|
579
697
|
from .common.recall_validation import validate_recall
|
|
580
|
-
|
|
581
|
-
|
|
698
|
+
from autocoder import models as models_module
|
|
699
|
+
|
|
700
|
+
# Handle lite/pro flags
|
|
701
|
+
if args.lite:
|
|
702
|
+
args.product_mode = "lite"
|
|
703
|
+
elif args.pro:
|
|
704
|
+
args.product_mode = "pro"
|
|
705
|
+
|
|
706
|
+
if args.product_mode == "pro":
|
|
707
|
+
llm = byzerllm.ByzerLLM.from_default_model(args.model)
|
|
708
|
+
else: # lite mode
|
|
709
|
+
model_info = models_module.get_model_by_name(args.model)
|
|
710
|
+
llm = byzerllm.SimpleByzerLLM(default_model_name=args.model)
|
|
711
|
+
llm.deploy(
|
|
712
|
+
model_path="",
|
|
713
|
+
pretrained_model_type=model_info["model_type"],
|
|
714
|
+
udf_name=args.model,
|
|
715
|
+
infer_params={
|
|
716
|
+
"saas.base_url": model_info["base_url"],
|
|
717
|
+
"saas.api_key": model_info["api_key"],
|
|
718
|
+
"saas.model": model_info["model_name"],
|
|
719
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
720
|
+
}
|
|
721
|
+
)
|
|
582
722
|
|
|
583
723
|
content = None if not args.content else [args.content]
|
|
584
724
|
result = validate_recall(llm, content=content, query=args.query)
|
|
585
725
|
print(f"Recall Validation Result:\n{result}")
|
|
726
|
+
|
|
586
727
|
elif args.tool == "chunk":
|
|
587
728
|
from .common.chunk_validation import validate_chunk
|
|
729
|
+
from autocoder import models as models_module
|
|
730
|
+
|
|
731
|
+
if args.lite:
|
|
732
|
+
args.product_mode = "lite"
|
|
733
|
+
elif args.pro:
|
|
734
|
+
args.product_mode = "pro"
|
|
735
|
+
|
|
736
|
+
if args.product_mode == "pro":
|
|
737
|
+
llm = byzerllm.ByzerLLM.from_default_model(args.model)
|
|
738
|
+
else: # lite mode
|
|
739
|
+
model_info = models_module.get_model_by_name(args.model)
|
|
740
|
+
llm = byzerllm.SimpleByzerLLM(default_model_name=args.model)
|
|
741
|
+
llm.deploy(
|
|
742
|
+
model_path="",
|
|
743
|
+
pretrained_model_type=model_info["model_type"],
|
|
744
|
+
udf_name=args.model,
|
|
745
|
+
infer_params={
|
|
746
|
+
"saas.base_url": model_info["base_url"],
|
|
747
|
+
"saas.api_key": model_info["api_key"],
|
|
748
|
+
"saas.model": model_info["model_name"],
|
|
749
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
750
|
+
}
|
|
751
|
+
)
|
|
588
752
|
|
|
589
|
-
llm = byzerllm.ByzerLLM.from_default_model(args.model)
|
|
590
753
|
content = None if not args.content else [args.content]
|
|
591
754
|
result = validate_chunk(llm, content=content, query=args.query)
|
|
592
755
|
print(f"Chunk Model Validation Result:\n{result}")
|