auto-coder 0.1.251__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.251.dist-info → auto_coder-0.1.252.dist-info}/METADATA +2 -2
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.252.dist-info}/RECORD +26 -24
- autocoder/auto_coder.py +28 -4
- autocoder/auto_coder_rag.py +198 -35
- autocoder/chat_auto_coder.py +56 -3
- autocoder/chat_auto_coder_lang.py +21 -3
- autocoder/common/__init__.py +1 -0
- autocoder/common/auto_coder_lang.py +6 -4
- autocoder/common/code_modification_ranker.py +3 -3
- autocoder/common/global_cancel.py +21 -0
- 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 +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.251.dist-info → auto_coder-0.1.252.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.252.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.251.dist-info → auto_coder-0.1.252.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.251.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,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=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
|
|
@@ -42,13 +42,14 @@ autocoder/common/code_auto_merge.py,sha256=8dtnz61l0B5gNbQmx26TZ4_jD825dsnnWtAFD
|
|
|
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
|
|
@@ -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,
|
|
@@ -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
|
|
|
@@ -1348,9 +1371,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1348
1371
|
)
|
|
1349
1372
|
|
|
1350
1373
|
|
|
1351
|
-
model_name =
|
|
1352
|
-
if not model_name:
|
|
1353
|
-
model_name = "unknown(without default model name)"
|
|
1374
|
+
model_name = ",".join(get_llm_names(chat_llm))
|
|
1354
1375
|
|
|
1355
1376
|
assistant_response, last_meta = stream_out(
|
|
1356
1377
|
v,
|
|
@@ -1364,10 +1385,13 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1364
1385
|
if last_meta:
|
|
1365
1386
|
elapsed_time = time.time() - start_time
|
|
1366
1387
|
printer = Printer()
|
|
1388
|
+
speed = last_meta.generated_tokens_count / elapsed_time
|
|
1367
1389
|
printer.print_in_terminal("stream_out_stats",
|
|
1368
1390
|
elapsed_time=elapsed_time,
|
|
1391
|
+
first_token_time=last_meta.first_token_time,
|
|
1369
1392
|
input_tokens=last_meta.input_tokens_count,
|
|
1370
|
-
output_tokens=last_meta.generated_tokens_count
|
|
1393
|
+
output_tokens=last_meta.generated_tokens_count,
|
|
1394
|
+
speed=round(speed, 2))
|
|
1371
1395
|
|
|
1372
1396
|
chat_history["ask_conversation"].append(
|
|
1373
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}")
|
autocoder/chat_auto_coder.py
CHANGED
|
@@ -54,7 +54,7 @@ import shlex
|
|
|
54
54
|
from autocoder.utils.llms import get_single_llm
|
|
55
55
|
import pkg_resources
|
|
56
56
|
from autocoder.common.printer import Printer
|
|
57
|
-
from
|
|
57
|
+
from autocoder.utils.thread_utils import run_in_thread,run_in_raw_thread
|
|
58
58
|
|
|
59
59
|
class SymbolItem(BaseModel):
|
|
60
60
|
symbol_name: str
|
|
@@ -136,6 +136,8 @@ commands = [
|
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
def show_help():
|
|
139
|
+
print(f"\033[1m{get_message('official_doc')}\033[0m")
|
|
140
|
+
print()
|
|
139
141
|
print(f"\033[1m{get_message('supported_commands')}\033[0m")
|
|
140
142
|
print()
|
|
141
143
|
print(
|
|
@@ -1713,7 +1715,7 @@ def commit(query: str):
|
|
|
1713
1715
|
if os.path.exists(temp_yaml):
|
|
1714
1716
|
os.remove(temp_yaml)
|
|
1715
1717
|
|
|
1716
|
-
target_model = args.
|
|
1718
|
+
target_model = args.commit_model or args.model
|
|
1717
1719
|
llm = get_single_llm(target_model, product_mode)
|
|
1718
1720
|
printer = Printer()
|
|
1719
1721
|
printer.print_in_terminal("commit_generating", style="yellow", model_name=target_model)
|
|
@@ -2208,6 +2210,9 @@ def manage_models(params, query: str):
|
|
|
2208
2210
|
table.add_column("Name", style="cyan", width=40, no_wrap=False)
|
|
2209
2211
|
table.add_column("Model Name", style="magenta", width=30, overflow="fold")
|
|
2210
2212
|
table.add_column("Base URL", style="white", width=50, overflow="fold")
|
|
2213
|
+
table.add_column("Input Price (M)", style="magenta", width=15)
|
|
2214
|
+
table.add_column("Output Price (M)", style="magenta", width=15)
|
|
2215
|
+
table.add_column("Speed (s/req)", style="blue", width=15)
|
|
2211
2216
|
for m in models_data:
|
|
2212
2217
|
# Check if api_key_path exists and file exists
|
|
2213
2218
|
is_api_key_set = "api_key" in m
|
|
@@ -2221,12 +2226,60 @@ def manage_models(params, query: str):
|
|
|
2221
2226
|
table.add_row(
|
|
2222
2227
|
name,
|
|
2223
2228
|
m.get("model_name", ""),
|
|
2224
|
-
m.get("base_url", "")
|
|
2229
|
+
m.get("base_url", ""),
|
|
2230
|
+
f"{m.get('input_price', 0.0):.2f}",
|
|
2231
|
+
f"{m.get('output_price', 0.0):.2f}",
|
|
2232
|
+
f"{m.get('average_speed', 0.0):.3f}"
|
|
2225
2233
|
)
|
|
2226
2234
|
console.print(table)
|
|
2227
2235
|
else:
|
|
2228
2236
|
printer.print_in_terminal("models_no_models", style="yellow")
|
|
2229
2237
|
|
|
2238
|
+
elif subcmd == "/input_price":
|
|
2239
|
+
args = query.strip().split()
|
|
2240
|
+
if len(args) >= 2:
|
|
2241
|
+
name = args[0]
|
|
2242
|
+
try:
|
|
2243
|
+
price = float(args[1])
|
|
2244
|
+
if models.update_model_input_price(name, price):
|
|
2245
|
+
printer.print_in_terminal("models_input_price_updated", style="green", name=name, price=price)
|
|
2246
|
+
else:
|
|
2247
|
+
printer.print_in_terminal("models_not_found", style="red", name=name)
|
|
2248
|
+
except ValueError as e:
|
|
2249
|
+
printer.print_in_terminal("models_invalid_price", style="red", error=str(e))
|
|
2250
|
+
else:
|
|
2251
|
+
printer.print_in_terminal("models_input_price_usage", style="red")
|
|
2252
|
+
|
|
2253
|
+
elif subcmd == "/output_price":
|
|
2254
|
+
args = query.strip().split()
|
|
2255
|
+
if len(args) >= 2:
|
|
2256
|
+
name = args[0]
|
|
2257
|
+
try:
|
|
2258
|
+
price = float(args[1])
|
|
2259
|
+
if models.update_model_output_price(name, price):
|
|
2260
|
+
printer.print_in_terminal("models_output_price_updated", style="green", name=name, price=price)
|
|
2261
|
+
else:
|
|
2262
|
+
printer.print_in_terminal("models_not_found", style="red", name=name)
|
|
2263
|
+
except ValueError as e:
|
|
2264
|
+
printer.print_in_terminal("models_invalid_price", style="red", error=str(e))
|
|
2265
|
+
else:
|
|
2266
|
+
printer.print_in_terminal("models_output_price_usage", style="red")
|
|
2267
|
+
|
|
2268
|
+
elif subcmd == "/speed":
|
|
2269
|
+
args = query.strip().split()
|
|
2270
|
+
if len(args) >= 2:
|
|
2271
|
+
name = args[0]
|
|
2272
|
+
try:
|
|
2273
|
+
speed = float(args[1])
|
|
2274
|
+
if models.update_model_speed(name, speed):
|
|
2275
|
+
printer.print_in_terminal("models_speed_updated", style="green", name=name, speed=speed)
|
|
2276
|
+
else:
|
|
2277
|
+
printer.print_in_terminal("models_not_found", style="red", name=name)
|
|
2278
|
+
except ValueError as e:
|
|
2279
|
+
printer.print_in_terminal("models_invalid_speed", style="red", error=str(e))
|
|
2280
|
+
else:
|
|
2281
|
+
printer.print_in_terminal("models_speed_usage", style="red")
|
|
2282
|
+
|
|
2230
2283
|
elif subcmd == "/add":
|
|
2231
2284
|
# Support both simplified and legacy formats
|
|
2232
2285
|
args = query.strip().split(" ")
|