auto-coder 0.1.202__py3-none-any.whl → 0.1.204__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.202.dist-info → auto_coder-0.1.204.dist-info}/METADATA +1 -1
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/RECORD +23 -23
- autocoder/agent/planner.py +8 -6
- autocoder/auto_coder.py +16 -12
- autocoder/auto_coder_rag.py +34 -0
- autocoder/chat_auto_coder.py +190 -72
- autocoder/chat_auto_coder_lang.py +7 -3
- autocoder/command_args.py +1 -0
- autocoder/common/code_auto_generate.py +1 -1
- autocoder/common/code_auto_generate_diff.py +1 -1
- autocoder/common/code_auto_generate_editblock.py +1 -1
- autocoder/common/code_auto_generate_strict_diff.py +1 -1
- autocoder/common/git_utils.py +434 -0
- autocoder/common/sys_prompt.py +1 -1
- autocoder/rag/doc_filter.py +27 -9
- autocoder/rag/long_context_rag.py +11 -5
- autocoder/rag/token_limiter.py +7 -3
- autocoder/utils/__init__.py +6 -16
- autocoder/version.py +1 -1
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.202.dist-info → auto_coder-0.1.204.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=IP4aSmuZh3HaIzLIThTKHF0PB38eTPUU1GDdfuJBam4,38971
|
|
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=0JAQNHbrCiWJMFipr1ZIe9sTBNxSlHJj1T6tfeRt_Zc,17622
|
|
5
5
|
autocoder/auto_coder_server.py,sha256=XU9b4SBH7zjPPXaTWWHV4_zJm-XYa6njuLQaplYJH_c,20290
|
|
6
|
-
autocoder/chat_auto_coder.py,sha256=
|
|
7
|
-
autocoder/chat_auto_coder_lang.py,sha256=
|
|
8
|
-
autocoder/command_args.py,sha256=
|
|
6
|
+
autocoder/chat_auto_coder.py,sha256=GXyCrX7GTYHYTCg2-62LYuO9Vt7Y5DdgfpCoTCQbYfE,86488
|
|
7
|
+
autocoder/chat_auto_coder_lang.py,sha256=zU9VRY-l80fZnLJ0Op8A3wq27UhQHh9WcpSYU4SmnqU,8708
|
|
8
|
+
autocoder/command_args.py,sha256=nmVD3xgLKKNt3fLJ4wVNUdJBtBOkfAdZ2ZmaRMlS7qg,29891
|
|
9
9
|
autocoder/lang.py,sha256=Ajng6m7towmx-cvQfEHPFp43iEfddPvr8ju5GH4H8qA,13819
|
|
10
|
-
autocoder/version.py,sha256=
|
|
10
|
+
autocoder/version.py,sha256=SlTxvgnTF5p3a0pdXcWVuAco21_eHUa0QV_CmfrzNEY,24
|
|
11
11
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
12
|
autocoder/agent/auto_tool.py,sha256=DBzip-P_T6ZtT2eHexPcusmKYD0h7ufzp7TLwXAY10E,11554
|
|
13
13
|
autocoder/agent/coder.py,sha256=x6bdJwDuETGg9ebQnYlUWCxCtQcDGg73LtI6McpWslQ,72034
|
|
14
14
|
autocoder/agent/designer.py,sha256=EpRbzO58Xym3GrnppIT1Z8ZFAlnNfgzHbIzZ3PX-Yv8,27037
|
|
15
|
-
autocoder/agent/planner.py,sha256=
|
|
15
|
+
autocoder/agent/planner.py,sha256=wvvuX9o6yhWlGm9t7fIT0wiChV5NkXBrYElxKiAjldU,9127
|
|
16
16
|
autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMbfGl8,18234
|
|
17
17
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
@@ -22,10 +22,10 @@ autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfI
|
|
|
22
22
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
23
23
|
autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
|
|
24
24
|
autocoder/common/code_auto_execute.py,sha256=4KXGmiGObr_B1d6tzV9dwS6MifCSc3Gm4j2d6ildBXQ,6867
|
|
25
|
-
autocoder/common/code_auto_generate.py,sha256=
|
|
26
|
-
autocoder/common/code_auto_generate_diff.py,sha256=
|
|
27
|
-
autocoder/common/code_auto_generate_editblock.py,sha256=
|
|
28
|
-
autocoder/common/code_auto_generate_strict_diff.py,sha256=
|
|
25
|
+
autocoder/common/code_auto_generate.py,sha256=bREGPj2yNQ1oy35ivHRHQSXAdmIsPaW4HQ9BkO7Ytco,8099
|
|
26
|
+
autocoder/common/code_auto_generate_diff.py,sha256=sItR67cGIY0QXOgJcK28HCHhhloFpAALIDC7zz5DpBM,13215
|
|
27
|
+
autocoder/common/code_auto_generate_editblock.py,sha256=X-F13eEjM5Gl778FdyFQo-Khvvr3mOdbROxA7f6bK-Y,15844
|
|
28
|
+
autocoder/common/code_auto_generate_strict_diff.py,sha256=APSAbH6cKDQwAOLkhoNNvenY1s7fehZxc5_YBKkJghg,11825
|
|
29
29
|
autocoder/common/code_auto_merge.py,sha256=3PB2fQtqgA0wPQSdwFqoOHfNT-mORgGfOXjfRGflikQ,5141
|
|
30
30
|
autocoder/common/code_auto_merge_diff.py,sha256=b5INrBJJ2EI0uj5AIiMobCS5S9xevCvdescs3nzCPhY,12594
|
|
31
31
|
autocoder/common/code_auto_merge_editblock.py,sha256=gIM90aZLKLHft4OzfUuAB6dWx7ntbnrqzZiJuOVukJQ,13774
|
|
@@ -34,14 +34,14 @@ autocoder/common/command_completer.py,sha256=pmPpdfGhpNV3v4u3KadL1BEG5H0QRO6eGv9
|
|
|
34
34
|
autocoder/common/command_generator.py,sha256=v4LmU7sO-P7jEZIXCWHUC6P-vT7AvBi_x_PTwCqBAE8,1323
|
|
35
35
|
autocoder/common/command_templates.py,sha256=3G-pCNbL6iHbnkG6v1JZpbIK3Mc9d373_RYGmCcDPMY,8548
|
|
36
36
|
autocoder/common/const.py,sha256=eTjhjh4Aj4CUzviJ81jaf3Y5cwqsLATySn2wJxaS6RQ,2911
|
|
37
|
-
autocoder/common/git_utils.py,sha256=
|
|
37
|
+
autocoder/common/git_utils.py,sha256=btK45sxvfm4tX3fBRNUPRZoGQuZuOEQrWSAwLy1yoLw,23095
|
|
38
38
|
autocoder/common/image_to_page.py,sha256=O0cNO_vHHUP-fP4GXiVojShmNqkPnZXeIyiY1MRLpKg,13936
|
|
39
39
|
autocoder/common/interpreter.py,sha256=62-dIakOunYB4yjmX8SHC0Gdy2h8NtxdgbpdqRZJ5vk,2833
|
|
40
40
|
autocoder/common/llm_rerank.py,sha256=FbvtCzaR661Mt2wn0qsuiEL1Y3puD6jeIJS4zg_e7Bs,3260
|
|
41
41
|
autocoder/common/screenshots.py,sha256=_gA-z1HxGjPShBrtgkdideq58MG6rqFB2qMUJKjrycs,3769
|
|
42
42
|
autocoder/common/search.py,sha256=_ZX03ph89rDPGMY1OrfqaDfxsDR-flh6YEHixherjwM,16616
|
|
43
43
|
autocoder/common/search_replace.py,sha256=GphFkc57Hb673CAwmbiocqTbw8vrV7TrZxtOhD0332g,22147
|
|
44
|
-
autocoder/common/sys_prompt.py,sha256=
|
|
44
|
+
autocoder/common/sys_prompt.py,sha256=JlexfjZt554faqbgkCmzOJqYUzDHfbnxly5ugFfHfEE,26403
|
|
45
45
|
autocoder/common/text.py,sha256=KGRQq314GHBmY4MWG8ossRoQi1_DTotvhxchpn78c-k,1003
|
|
46
46
|
autocoder/common/types.py,sha256=_kl8q2oCAZe-HqU9LjQgSqVHAw4ojMojlF58-bp2xiE,354
|
|
47
47
|
autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -60,10 +60,10 @@ autocoder/index/symbols_utils.py,sha256=CjcjUVajmJZB75Ty3a7kMv1BZphrm-tIBAdOJv6u
|
|
|
60
60
|
autocoder/pyproject/__init__.py,sha256=RrCY_gyUHK7IFhjOvNRs_ckMsO6Mw7pRymWEjzpr2Rw,14354
|
|
61
61
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
62
62
|
autocoder/rag/api_server.py,sha256=dRbhAZVRAOlZ64Cnxf4_rKb4iJwHnrWS9Zr67IVORw0,7288
|
|
63
|
-
autocoder/rag/doc_filter.py,sha256=
|
|
63
|
+
autocoder/rag/doc_filter.py,sha256=H0g4s-Q8gJDUbYk9b1qkEyl7RgNzLbRF4UWELVKPDwk,9865
|
|
64
64
|
autocoder/rag/document_retriever.py,sha256=5oThtxukGuRFF96o3pHKsk306a8diXbhgSrbqyU2BvM,8894
|
|
65
65
|
autocoder/rag/llm_wrapper.py,sha256=sbDxCANiZyWb_ocqNgqu2oy3c2t8orPNRGleEs-Uwl8,2649
|
|
66
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
66
|
+
autocoder/rag/long_context_rag.py,sha256=nrARGBJkqA8S5aiEE3jDjVdB_M2n3FDix6hmCygGGBA,24626
|
|
67
67
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
68
68
|
autocoder/rag/rag_entry.py,sha256=V1RJ8RGqM30DNPmzymv64rZjNRGWn6kfc8sRy_LECg0,2451
|
|
69
69
|
autocoder/rag/raw_rag.py,sha256=yS2Ur6kG0IRjhCj2_VonwxjY_xls_E62jO5Gz5j2nqE,2952
|
|
@@ -72,7 +72,7 @@ autocoder/rag/simple_directory_reader.py,sha256=LkKreCkNdEOoL4fNhc3_hDoyyWTQUte4
|
|
|
72
72
|
autocoder/rag/simple_rag.py,sha256=I902EUqOK1WM0Y2WFd7RzDJYofElvTZNLVCBtX5A9rc,14885
|
|
73
73
|
autocoder/rag/token_checker.py,sha256=jc76x6KWmvVxds6W8juZfQGaoErudc2HenG3sNQfSLs,2819
|
|
74
74
|
autocoder/rag/token_counter.py,sha256=LReZEYXmWriDI3KYjUvK0E4Gn4MeDJX6RPCfJCmluGY,2110
|
|
75
|
-
autocoder/rag/token_limiter.py,sha256=
|
|
75
|
+
autocoder/rag/token_limiter.py,sha256=dtIxCtHswZ2ut-XKbx8_SiWyv-xqnR1WAIcmh6f8Ktw,11137
|
|
76
76
|
autocoder/rag/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
77
77
|
autocoder/rag/utils.py,sha256=MOMy0l2_YQ8foWnQQSvYmYAwghAWJ8_wVrdZh5DSaTg,4822
|
|
78
78
|
autocoder/rag/variable_holder.py,sha256=PFvBjFcR7-fNDD4Vcsc8CpH2Te057vcpwJMxtrfUgKI,75
|
|
@@ -93,7 +93,7 @@ autocoder/regex_project/__init__.py,sha256=EBZeCL5ORyD_9_5u_UuG4s7XtpXOu0y1sWDmx
|
|
|
93
93
|
autocoder/regexproject/__init__.py,sha256=lHTpHfYkguCMtczXoH4bMr-IMNZQtXIjmtSvjtfX0Ro,9674
|
|
94
94
|
autocoder/suffixproject/__init__.py,sha256=bEPW9AyGSQ8kNzrgKEXyRikrUCUEuJ6b6vCLzO8Ja6g,11017
|
|
95
95
|
autocoder/tsproject/__init__.py,sha256=avSnMA3uSdZmv5MxTilDPFLRFmtfzFr1NPhHaRMFhX4,11625
|
|
96
|
-
autocoder/utils/__init__.py,sha256=
|
|
96
|
+
autocoder/utils/__init__.py,sha256=KtcGElFNBgZPF7dEL8zF9JpXkCAjoyDrzaREJBhJrcs,994
|
|
97
97
|
autocoder/utils/_markitdown.py,sha256=RU88qn4eZfYIy0GDrPxlI8oYXIypbi63VRJjdlnE0VU,47431
|
|
98
98
|
autocoder/utils/coder.py,sha256=rK8e0svQBe0NOP26dIGToUXgha_hUDgxlWoC_p_r7oc,5698
|
|
99
99
|
autocoder/utils/conversation_store.py,sha256=sz-hhY7sttPAUOAQU6Pze-5zJc3j0_Emj22dM_0l5ro,1161
|
|
@@ -106,9 +106,9 @@ autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1
|
|
|
106
106
|
autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
|
|
107
107
|
autocoder/utils/rest.py,sha256=HawagAap3wMIDROGhY1730zSZrJR_EycODAA5qOj83c,8807
|
|
108
108
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
109
|
-
auto_coder-0.1.
|
|
110
|
-
auto_coder-0.1.
|
|
111
|
-
auto_coder-0.1.
|
|
112
|
-
auto_coder-0.1.
|
|
113
|
-
auto_coder-0.1.
|
|
114
|
-
auto_coder-0.1.
|
|
109
|
+
auto_coder-0.1.204.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
110
|
+
auto_coder-0.1.204.dist-info/METADATA,sha256=DDQpyvBKzzC3fplWR0n7JCSamGxTdad-0WFMUEnjbuw,2575
|
|
111
|
+
auto_coder-0.1.204.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
112
|
+
auto_coder-0.1.204.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
113
|
+
auto_coder-0.1.204.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
114
|
+
auto_coder-0.1.204.dist-info/RECORD,,
|
autocoder/agent/planner.py
CHANGED
|
@@ -102,18 +102,20 @@ def get_tools(args: AutoCoderArgs, llm: byzerllm.ByzerLLM):
|
|
|
102
102
|
return
|
|
103
103
|
|
|
104
104
|
action_files = [
|
|
105
|
-
f
|
|
106
|
-
for f in os.listdir(actions_dir)
|
|
107
|
-
if f[:3].isdigit() and f.endswith(".yml")
|
|
105
|
+
f for f in os.listdir(actions_dir) if f[:3].isdigit() and "_" in f and f.endswith(".yml")
|
|
108
106
|
]
|
|
107
|
+
|
|
108
|
+
def get_old_seq(name):
|
|
109
|
+
return name.split("_")[0]
|
|
110
|
+
|
|
109
111
|
if not action_files:
|
|
110
112
|
max_seq = 0
|
|
111
113
|
else:
|
|
112
|
-
seqs = [int(f
|
|
114
|
+
seqs = [int(get_old_seq(f)) for f in action_files]
|
|
113
115
|
max_seq = max(seqs)
|
|
114
116
|
|
|
115
|
-
new_seq = str(max_seq + 1).zfill(
|
|
116
|
-
prev_files = [f for f in action_files if int(f
|
|
117
|
+
new_seq = str(max_seq + 1).zfill(12)
|
|
118
|
+
prev_files = [f for f in action_files if int(get_old_seq(f)) < int(new_seq)]
|
|
117
119
|
|
|
118
120
|
if not prev_files:
|
|
119
121
|
new_file = os.path.join(actions_dir, f"{new_seq}_{yaml_file_name}.yml")
|
autocoder/auto_coder.py
CHANGED
|
@@ -194,16 +194,20 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
194
194
|
return
|
|
195
195
|
|
|
196
196
|
action_files = [
|
|
197
|
-
f for f in os.listdir(actions_dir) if f[:3].isdigit() and f.endswith(".yml")
|
|
197
|
+
f for f in os.listdir(actions_dir) if f[:3].isdigit() and "_" in f and f.endswith(".yml")
|
|
198
198
|
]
|
|
199
|
+
|
|
200
|
+
def get_old_seq(name):
|
|
201
|
+
return name.split("_")[0]
|
|
202
|
+
|
|
199
203
|
if not action_files:
|
|
200
204
|
max_seq = 0
|
|
201
205
|
else:
|
|
202
|
-
seqs = [int(f
|
|
206
|
+
seqs = [int(get_old_seq(f)) for f in action_files]
|
|
203
207
|
max_seq = max(seqs)
|
|
204
208
|
|
|
205
|
-
new_seq = str(max_seq + 1).zfill(
|
|
206
|
-
prev_files = [f for f in action_files if int(f
|
|
209
|
+
new_seq = str(max_seq + 1).zfill(12)
|
|
210
|
+
prev_files = [f for f in action_files if int(get_old_seq(f)) < int(new_seq)]
|
|
207
211
|
|
|
208
212
|
if raw_args.from_yaml:
|
|
209
213
|
# If --from_yaml is specified, copy content from the matching YAML file
|
|
@@ -489,7 +493,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
489
493
|
from autocoder.index.for_command import index_query_command
|
|
490
494
|
|
|
491
495
|
index_query_command(args, llm)
|
|
492
|
-
return
|
|
496
|
+
return
|
|
493
497
|
|
|
494
498
|
if raw_args.command == "agent":
|
|
495
499
|
if raw_args.agent_command == "planner":
|
|
@@ -763,7 +767,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
763
767
|
|
|
764
768
|
loaded_conversations = pre_conversations + \
|
|
765
769
|
chat_history["ask_conversation"]
|
|
766
|
-
|
|
770
|
+
|
|
767
771
|
if args.human_as_model:
|
|
768
772
|
console = Console()
|
|
769
773
|
|
|
@@ -821,8 +825,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
821
825
|
border_style="blue",
|
|
822
826
|
expand=False,
|
|
823
827
|
)
|
|
824
|
-
)
|
|
825
|
-
if args.request_id:
|
|
828
|
+
)
|
|
829
|
+
if args.request_id:
|
|
826
830
|
request_queue.add_request(
|
|
827
831
|
args.request_id,
|
|
828
832
|
RequestValue(
|
|
@@ -836,7 +840,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
836
840
|
),
|
|
837
841
|
)
|
|
838
842
|
return {}
|
|
839
|
-
|
|
843
|
+
|
|
840
844
|
lines = []
|
|
841
845
|
while True:
|
|
842
846
|
line = prompt(FormattedText(
|
|
@@ -875,12 +879,12 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
875
879
|
|
|
876
880
|
return {}
|
|
877
881
|
|
|
878
|
-
if args.enable_rag_search or args.enable_rag_context:
|
|
882
|
+
if args.enable_rag_search or args.enable_rag_context:
|
|
879
883
|
rag = RAGFactory.get_rag(llm=chat_llm, args=args, path="")
|
|
880
884
|
response = rag.stream_chat_oai(
|
|
881
885
|
conversations=loaded_conversations)[0]
|
|
882
886
|
v = ([item, None] for item in response)
|
|
883
|
-
else:
|
|
887
|
+
else:
|
|
884
888
|
v = chat_llm.stream_chat_oai(
|
|
885
889
|
conversations=loaded_conversations, delta_mode=True
|
|
886
890
|
)
|
|
@@ -896,7 +900,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
896
900
|
for res in v:
|
|
897
901
|
markdown_content += res[0]
|
|
898
902
|
assistant_response += res[0]
|
|
899
|
-
if args.request_id:
|
|
903
|
+
if args.request_id:
|
|
900
904
|
request_queue.add_request(
|
|
901
905
|
args.request_id,
|
|
902
906
|
RequestValue(
|
autocoder/auto_coder_rag.py
CHANGED
|
@@ -286,6 +286,24 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
286
286
|
help="Whether to return responses without contexts. only works when pro plugin is installed",
|
|
287
287
|
)
|
|
288
288
|
|
|
289
|
+
serve_parser.add_argument(
|
|
290
|
+
"--recall_model",
|
|
291
|
+
default="",
|
|
292
|
+
help="The model used for recall documents",
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
serve_parser.add_argument(
|
|
296
|
+
"--chunk_model",
|
|
297
|
+
default="",
|
|
298
|
+
help="The model used for chunk documents",
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
serve_parser.add_argument(
|
|
302
|
+
"--qa_model",
|
|
303
|
+
default="",
|
|
304
|
+
help="The model used for question answering",
|
|
305
|
+
)
|
|
306
|
+
|
|
289
307
|
# Tools command
|
|
290
308
|
tools_parser = subparsers.add_parser("tools", help="Various tools")
|
|
291
309
|
tools_subparsers = tools_parser.add_subparsers(dest="tool", help="Available tools")
|
|
@@ -334,6 +352,22 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
334
352
|
llm = byzerllm.ByzerLLM()
|
|
335
353
|
llm.setup_default_model_name(args.model)
|
|
336
354
|
|
|
355
|
+
# Setup sub models if specified
|
|
356
|
+
if args.recall_model:
|
|
357
|
+
recall_model = byzerllm.ByzerLLM()
|
|
358
|
+
recall_model.setup_default_model_name(args.recall_model)
|
|
359
|
+
llm.setup_sub_client("recall_model", recall_model)
|
|
360
|
+
|
|
361
|
+
if args.chunk_model:
|
|
362
|
+
chunk_model = byzerllm.ByzerLLM()
|
|
363
|
+
chunk_model.setup_default_model_name(args.chunk_model)
|
|
364
|
+
llm.setup_sub_client("chunk_model", chunk_model)
|
|
365
|
+
|
|
366
|
+
if args.qa_model:
|
|
367
|
+
qa_model = byzerllm.ByzerLLM()
|
|
368
|
+
qa_model.setup_default_model_name(args.qa_model)
|
|
369
|
+
llm.setup_sub_client("qa_model", qa_model)
|
|
370
|
+
|
|
337
371
|
# 当启用hybrid_index时,检查必要的组件
|
|
338
372
|
if auto_coder_args.enable_hybrid_index:
|
|
339
373
|
if not llm.is_model_exist("emb"):
|