auto-coder 0.1.250__py3-none-any.whl → 0.1.252__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.250.dist-info → auto_coder-0.1.252.dist-info}/METADATA +2 -2
- {auto_coder-0.1.250.dist-info → auto_coder-0.1.252.dist-info}/RECORD +31 -29
- autocoder/auto_coder.py +36 -4
- autocoder/auto_coder_rag.py +198 -35
- autocoder/chat_auto_coder.py +58 -5
- autocoder/chat_auto_coder_lang.py +21 -3
- autocoder/common/__init__.py +2 -1
- autocoder/common/auto_coder_lang.py +11 -5
- autocoder/common/code_auto_generate.py +10 -0
- autocoder/common/code_auto_generate_diff.py +10 -0
- autocoder/common/code_auto_generate_editblock.py +22 -8
- autocoder/common/code_auto_generate_strict_diff.py +10 -0
- autocoder/common/code_modification_ranker.py +3 -3
- autocoder/common/global_cancel.py +21 -0
- autocoder/common/printer.py +4 -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 +17 -6
- autocoder/models.py +87 -6
- autocoder/rag/doc_filter.py +1 -3
- autocoder/rag/long_context_rag.py +7 -5
- autocoder/rag/token_limiter.py +1 -3
- autocoder/utils/auto_coder_utils/chat_stream_out.py +13 -2
- autocoder/utils/llms.py +15 -1
- autocoder/utils/thread_utils.py +201 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.250.dist-info → auto_coder-0.1.252.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.250.dist-info → auto_coder-0.1.252.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.250.dist-info → auto_coder-0.1.252.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.250.dist-info → auto_coder-0.1.252.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.252
|
|
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=0Bjv8WtImwcObAgBeJ1FZsL6M_wZU04aKMIlLBnCXS8,64568
|
|
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=oKVoZr66oHNj43SUlqan0i1qBFIleOTrwFDy9iJRgaU,107441
|
|
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=1gGmGBolGnZ8y1dxxyDRAeCnjQZMw6R1feRdZma-dZY,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,30 +25,31 @@ 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=PjFsST8SG14PiZH4VmMSLGTUz1FqPfcx7GlUmkhT9IQ,11928
|
|
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
|
|
36
36
|
autocoder/common/code_auto_execute.py,sha256=4KXGmiGObr_B1d6tzV9dwS6MifCSc3Gm4j2d6ildBXQ,6867
|
|
37
|
-
autocoder/common/code_auto_generate.py,sha256=
|
|
38
|
-
autocoder/common/code_auto_generate_diff.py,sha256=
|
|
39
|
-
autocoder/common/code_auto_generate_editblock.py,sha256=
|
|
40
|
-
autocoder/common/code_auto_generate_strict_diff.py,sha256=
|
|
37
|
+
autocoder/common/code_auto_generate.py,sha256=N_kENWW4eVPKmihpIQ4Q2ivYkugAuCWIPLDCKiarRWg,10818
|
|
38
|
+
autocoder/common/code_auto_generate_diff.py,sha256=QAm-BVJgGl_wbw0VjY2RZigVCwOBO-l1W-90PrYDdOQ,16741
|
|
39
|
+
autocoder/common/code_auto_generate_editblock.py,sha256=FuVH-sP4_Ys2MJk9SkWgHHLAKp51bKSxTwFzd7voilg,18356
|
|
40
|
+
autocoder/common/code_auto_generate_strict_diff.py,sha256=kieVUx2KuR0BGtQHE0Ll7i8e_3Lb4xfFXHIXDttQACE,15274
|
|
41
41
|
autocoder/common/code_auto_merge.py,sha256=8dtnz61l0B5gNbQmx26TZ4_jD825dsnnWtAFD_zs6es,7335
|
|
42
42
|
autocoder/common/code_auto_merge_diff.py,sha256=yocfe8s3Pz6hTGDUl9wRIewY3NcTize_gEla64lsGT0,15331
|
|
43
43
|
autocoder/common/code_auto_merge_editblock.py,sha256=sp7C0fZJMVcNgI8uWy43CKDk7gGXFTkMB9kbP2VdY8k,17485
|
|
44
44
|
autocoder/common/code_auto_merge_strict_diff.py,sha256=9rm0NJ_n6M3LohEX7xl1Jym0xmm8UEYqj_ZTSO3oSlM,9519
|
|
45
|
-
autocoder/common/code_modification_ranker.py,sha256=
|
|
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
|
|
@@ -56,7 +57,7 @@ autocoder/common/mcp_hub.py,sha256=2ZyJv3Aiv4Y97UHut49oYhIFcu7ICR-mptDEBSgT3uE,1
|
|
|
56
57
|
autocoder/common/mcp_server.py,sha256=QCFa-15kx7rbNsinwdGFFX2y47pww0fVdI-ldKFSSWI,12267
|
|
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
|
-
autocoder/common/printer.py,sha256=
|
|
60
|
+
autocoder/common/printer.py,sha256=P1WU0QjlfnjqTP5uA55GkHZCpFzRPFkc34DMMandreg,2023
|
|
60
61
|
autocoder/common/recall_validation.py,sha256=Avt9Q9dX3kG6Pf2zsdlOHmsjd-OeSj7U1PFBDp_Cve0,1700
|
|
61
62
|
autocoder/common/screenshots.py,sha256=_gA-z1HxGjPShBrtgkdideq58MG6rqFB2qMUJKjrycs,3769
|
|
62
63
|
autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16518
|
|
@@ -73,27 +74,27 @@ 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=P2L9u1zqL_igFE6DY5E2r0BY43TrpORjYb_bq7eKT50,6514
|
|
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=36ibIdFoOOasYbR1C3WmrfvQs3JB0oYSsk-O4YhTh58,25354
|
|
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=wdunUiqCe6LntrEdxqx2iClwNGXhyL5kB52Y_4qHyNo,11014
|
|
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.252.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
148
|
+
auto_coder-0.1.252.dist-info/METADATA,sha256=I9oxYdimJoBFwT8BdU5eU6PUhuesvVq-CTZpF5s55GU,2616
|
|
149
|
+
auto_coder-0.1.252.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
150
|
+
auto_coder-0.1.252.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
151
|
+
auto_coder-0.1.252.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
152
|
+
auto_coder-0.1.252.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,
|
|
@@ -45,6 +46,7 @@ from autocoder import models as models_module
|
|
|
45
46
|
from autocoder.common.utils_code_auto_generate import stream_chat_with_continue
|
|
46
47
|
from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
47
48
|
from autocoder.common.printer import Printer
|
|
49
|
+
from autocoder.rag.token_counter import count_tokens
|
|
48
50
|
console = Console()
|
|
49
51
|
|
|
50
52
|
|
|
@@ -764,6 +766,23 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
764
766
|
)
|
|
765
767
|
llm.setup_sub_client("planner_model", planner_model)
|
|
766
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
|
+
|
|
767
786
|
if args.designer_model:
|
|
768
787
|
model_name = args.designer_model.strip()
|
|
769
788
|
model_info = models_module.get_model_by_name(model_name)
|
|
@@ -874,6 +893,11 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
874
893
|
designer_model.setup_default_model_name(args.designer_model)
|
|
875
894
|
llm.setup_sub_client("designer_model", designer_model)
|
|
876
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
|
+
|
|
877
901
|
else:
|
|
878
902
|
llm = None
|
|
879
903
|
|
|
@@ -1333,6 +1357,13 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1333
1357
|
reviewer = AutoReviewCommit(llm=chat_llm, args=args)
|
|
1334
1358
|
v = reviewer.review_commit(query=args.query,conversations=loaded_conversations)
|
|
1335
1359
|
else:
|
|
1360
|
+
# 预估token数量
|
|
1361
|
+
estimated_input_tokens = count_tokens(json.dumps(loaded_conversations, ensure_ascii=False))
|
|
1362
|
+
printer = Printer()
|
|
1363
|
+
printer.print_in_terminal("estimated_chat_input_tokens", style="yellow",
|
|
1364
|
+
estimated_input_tokens=estimated_input_tokens
|
|
1365
|
+
)
|
|
1366
|
+
|
|
1336
1367
|
v = stream_chat_with_continue(
|
|
1337
1368
|
llm=chat_llm,
|
|
1338
1369
|
conversations=loaded_conversations,
|
|
@@ -1340,9 +1371,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1340
1371
|
)
|
|
1341
1372
|
|
|
1342
1373
|
|
|
1343
|
-
model_name =
|
|
1344
|
-
if not model_name:
|
|
1345
|
-
model_name = "unknown(without default model name)"
|
|
1374
|
+
model_name = ",".join(get_llm_names(chat_llm))
|
|
1346
1375
|
|
|
1347
1376
|
assistant_response, last_meta = stream_out(
|
|
1348
1377
|
v,
|
|
@@ -1356,10 +1385,13 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1356
1385
|
if last_meta:
|
|
1357
1386
|
elapsed_time = time.time() - start_time
|
|
1358
1387
|
printer = Printer()
|
|
1388
|
+
speed = last_meta.generated_tokens_count / elapsed_time
|
|
1359
1389
|
printer.print_in_terminal("stream_out_stats",
|
|
1360
1390
|
elapsed_time=elapsed_time,
|
|
1391
|
+
first_token_time=last_meta.first_token_time,
|
|
1361
1392
|
input_tokens=last_meta.input_tokens_count,
|
|
1362
|
-
output_tokens=last_meta.generated_tokens_count
|
|
1393
|
+
output_tokens=last_meta.generated_tokens_count,
|
|
1394
|
+
speed=round(speed, 2))
|
|
1363
1395
|
|
|
1364
1396
|
chat_history["ask_conversation"].append(
|
|
1365
1397
|
{"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}")
|