auto-coder 0.1.233__py3-none-any.whl → 0.1.237__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.233.dist-info → auto_coder-0.1.237.dist-info}/METADATA +2 -3
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/RECORD +24 -21
- autocoder/auto_coder.py +68 -35
- autocoder/chat_auto_coder.py +107 -84
- autocoder/chat_auto_coder_lang.py +69 -17
- autocoder/common/__init__.py +3 -0
- autocoder/common/auto_coder_lang.py +141 -0
- autocoder/common/code_auto_merge.py +12 -9
- autocoder/common/code_auto_merge_diff.py +5 -4
- autocoder/common/code_auto_merge_editblock.py +35 -33
- autocoder/common/code_auto_merge_strict_diff.py +5 -4
- autocoder/common/code_modification_ranker.py +74 -44
- autocoder/common/printer.py +49 -0
- autocoder/dispacher/actions/action.py +68 -19
- autocoder/dispacher/actions/plugins/action_regex_project.py +5 -0
- autocoder/index/entry.py +57 -14
- autocoder/index/filter/quick_filter.py +7 -6
- autocoder/index/index.py +54 -16
- autocoder/utils/types.py +0 -0
- autocoder/version.py +1 -1
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.233.dist-info → auto_coder-0.1.237.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.237
|
|
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.153
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff-match-patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -39,7 +39,6 @@ Requires-Dist: real-agent
|
|
|
39
39
|
Requires-Dist: python-docx
|
|
40
40
|
Requires-Dist: docx2txt
|
|
41
41
|
Requires-Dist: pdf2image
|
|
42
|
-
Requires-Dist: Spire.Doc
|
|
43
42
|
Requires-Dist: docx2pdf
|
|
44
43
|
Requires-Dist: pyperclip
|
|
45
44
|
Requires-Dist: colorama
|
|
@@ -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=u2SzAIpYXwhFfcyZyI-td6M3-JFWC9fCS2wyrytNE8s,61172
|
|
3
3
|
autocoder/auto_coder_lang.py,sha256=Rtupq6N3_HT7JRhDKdgCBcwRaiAnyCOR_Gsp4jUomrI,3229
|
|
4
4
|
autocoder/auto_coder_rag.py,sha256=illKgzP2bv-Tq50ujsofJnOHdI4pzr0ALtfR8NHHWdQ,22351
|
|
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=DrTJcp0VeGFhNqepMZ26aWbOdiqWnaKEqIs5cA3Uk1s,103175
|
|
10
|
+
autocoder/chat_auto_coder_lang.py,sha256=rS6hD5ZiNLaQZx36WO4LohRBEN8uZfsgv3QEM7ax03A,14540
|
|
11
11
|
autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
|
|
12
12
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
13
13
|
autocoder/models.py,sha256=FlBrF6HhGao_RiCSgYhCmP7vs0KlG4hI_BI6dyZiL9s,5292
|
|
14
|
-
autocoder/version.py,sha256=
|
|
14
|
+
autocoder/version.py,sha256=wmhLaqzrzkDSM5sEXBMgkNybjluYD_F5D7T5b5AEQR0,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
|
|
@@ -24,10 +24,11 @@ autocoder/agent/project_reader.py,sha256=tWLaPoLw1gI6kO_NzivQj28KbobU2ceOLuppHMb
|
|
|
24
24
|
autocoder/chat/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
25
25
|
autocoder/common/JupyterClient.py,sha256=O-wi6pXeAEYhAY24kDa0BINrLYvKS6rKyWe98pDClS0,2816
|
|
26
26
|
autocoder/common/ShellClient.py,sha256=fM1q8t_XMSbLBl2zkCNC2J9xuyKN3eXzGm6hHhqL2WY,2286
|
|
27
|
-
autocoder/common/__init__.py,sha256=
|
|
27
|
+
autocoder/common/__init__.py,sha256=vpfo3RctksezDoraVSpHtfnxpspVNiYh8OmQhqQvcfE,11729
|
|
28
28
|
autocoder/common/anything2images.py,sha256=0ILBbWzY02M-CiWB-vzuomb_J1hVdxRcenAfIrAXq9M,25283
|
|
29
29
|
autocoder/common/anything2img.py,sha256=4TREa-sOA-iargieUy7MpyCYVUE-9Mmq0wJtwomPqnE,7662
|
|
30
30
|
autocoder/common/audio.py,sha256=Kn9nWKQddWnUrAz0a_ZUgjcu4VUU_IcZBigT7n3N3qc,7439
|
|
31
|
+
autocoder/common/auto_coder_lang.py,sha256=TzS9SXzq3n-cwCKvDgic7RJe0_cyiKMeL5yzxbqvM5s,10868
|
|
31
32
|
autocoder/common/buildin_tokenizer.py,sha256=L7d5t39ZFvUd6EoMPXUhYK1toD0FHlRH1jtjKRGokWU,1236
|
|
32
33
|
autocoder/common/chunk_validation.py,sha256=BrR_ZWavW8IANuueEE7hS8NFAwEvm8TX34WnPx_1hs8,3030
|
|
33
34
|
autocoder/common/cleaner.py,sha256=NU72i8C6o9m0vXExab7nao5bstBUsfJFcj11cXa9l4U,1089
|
|
@@ -36,11 +37,11 @@ autocoder/common/code_auto_generate.py,sha256=5lEW9iudGYQIcd_QjrGyGaEmrWuyZ625PN
|
|
|
36
37
|
autocoder/common/code_auto_generate_diff.py,sha256=o5yeqpc3WXSRWlcLzhlwJNosKo7dcj0CeIsFh6Aibus,16248
|
|
37
38
|
autocoder/common/code_auto_generate_editblock.py,sha256=QdUHUkGaervvQNCY8T2vQ_tfnQX_2kxxu4qq_QW_Nn8,17828
|
|
38
39
|
autocoder/common/code_auto_generate_strict_diff.py,sha256=uteWDEHfIbrnVgwKgqC7qwrIeW0enJCXcHzZGa48yY8,14774
|
|
39
|
-
autocoder/common/code_auto_merge.py,sha256=
|
|
40
|
-
autocoder/common/code_auto_merge_diff.py,sha256=
|
|
41
|
-
autocoder/common/code_auto_merge_editblock.py,sha256=
|
|
42
|
-
autocoder/common/code_auto_merge_strict_diff.py,sha256=
|
|
43
|
-
autocoder/common/code_modification_ranker.py,sha256=
|
|
40
|
+
autocoder/common/code_auto_merge.py,sha256=8dtnz61l0B5gNbQmx26TZ4_jD825dsnnWtAFD_zs6es,7335
|
|
41
|
+
autocoder/common/code_auto_merge_diff.py,sha256=yocfe8s3Pz6hTGDUl9wRIewY3NcTize_gEla64lsGT0,15331
|
|
42
|
+
autocoder/common/code_auto_merge_editblock.py,sha256=B-zDKGEJ7uRFPLIasnX7w2I2DXe5UAj1T-rDSjL4xes,17477
|
|
43
|
+
autocoder/common/code_auto_merge_strict_diff.py,sha256=9rm0NJ_n6M3LohEX7xl1Jym0xmm8UEYqj_ZTSO3oSlM,9519
|
|
44
|
+
autocoder/common/code_modification_ranker.py,sha256=E3TuI2_KuX3PiR-V3atB2wmXkZUzhNFhuWz3ztg2QDc,6198
|
|
44
45
|
autocoder/common/command_completer.py,sha256=SSeb8MDH0JPvfdyW-S2uaHnui4VBDfSQvQPLbv3ORPA,9314
|
|
45
46
|
autocoder/common/command_generator.py,sha256=v4LmU7sO-P7jEZIXCWHUC6P-vT7AvBi_x_PTwCqBAE8,1323
|
|
46
47
|
autocoder/common/command_templates.py,sha256=mnB3n8i0yjH1mqzyClEg8Wpr9VbZV44kxky66Zu6OJY,8557
|
|
@@ -54,6 +55,7 @@ autocoder/common/mcp_hub.py,sha256=2ZyJv3Aiv4Y97UHut49oYhIFcu7ICR-mptDEBSgT3uE,1
|
|
|
54
55
|
autocoder/common/mcp_server.py,sha256=QCFa-15kx7rbNsinwdGFFX2y47pww0fVdI-ldKFSSWI,12267
|
|
55
56
|
autocoder/common/mcp_tools.py,sha256=KsLvRrB6pvmebqd-lDaSH6IBJR0AIxWRE-dtCEG_w9k,12485
|
|
56
57
|
autocoder/common/memory_manager.py,sha256=2ZjYG7BPyvbYalZBF6AM_G5e10Qkw_zrqtD4Zd7GSsQ,3663
|
|
58
|
+
autocoder/common/printer.py,sha256=heFhcI_Qdc3lfHquL-9ys66N7drGBxRDF6QXbBmh76o,1905
|
|
57
59
|
autocoder/common/recall_validation.py,sha256=Avt9Q9dX3kG6Pf2zsdlOHmsjd-OeSj7U1PFBDp_Cve0,1700
|
|
58
60
|
autocoder/common/screenshots.py,sha256=_gA-z1HxGjPShBrtgkdideq58MG6rqFB2qMUJKjrycs,3769
|
|
59
61
|
autocoder/common/search.py,sha256=245iPFgWhMldoUK3CqCP89ltaxZiNPK73evoG6Fp1h8,16518
|
|
@@ -69,20 +71,20 @@ autocoder/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
69
71
|
autocoder/db/store.py,sha256=tFT66bP2ZKIqZip-uhLkHRSLaaOAUUDZfozJwcqix3c,1908
|
|
70
72
|
autocoder/dispacher/__init__.py,sha256=YoA64dIxnx4jcE1pwSfg81sjkQtjDkhddkfac1-cMWo,1230
|
|
71
73
|
autocoder/dispacher/actions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
|
-
autocoder/dispacher/actions/action.py,sha256=
|
|
74
|
+
autocoder/dispacher/actions/action.py,sha256=2i9xPgbw6Jn0g3TFIa0JW6FJ21HoOV13J_dYNi9nCEc,20732
|
|
73
75
|
autocoder/dispacher/actions/copilot.py,sha256=iMh4ckj9hO5Q-iemF3CStXd7DatWai7Eci5zOlKxK9c,13072
|
|
74
76
|
autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256
|
|
77
|
+
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=ht_HWzZt84IEogoFMggnXI6aFFerrsuksVflAkcodfU,5545
|
|
76
78
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=nVAtRSQpdGNmZxg1R_9zXG3AuTv3CHf2v7ODgj8u65c,7727
|
|
77
79
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
78
|
-
autocoder/index/entry.py,sha256=
|
|
80
|
+
autocoder/index/entry.py,sha256=KJaxqtaKgL27w8-j7OiAqI0anPpmrJSl7PkfeVF2ipE,11713
|
|
79
81
|
autocoder/index/for_command.py,sha256=LGnz-OWogT8rd24m4Zcan7doLaijxqorAuiMk7WuRq0,3125
|
|
80
|
-
autocoder/index/index.py,sha256=
|
|
82
|
+
autocoder/index/index.py,sha256=HfWN0Mbk22S81-fnm9wrYNJO9Bcnws4G_PxJ8IQuH5A,20175
|
|
81
83
|
autocoder/index/symbols_utils.py,sha256=CjcjUVajmJZB75Ty3a7kMv1BZphrm-tIBAdOJv6uo-0,2037
|
|
82
84
|
autocoder/index/types.py,sha256=a2s_KV5FJlq7jqA2ELSo9E1sjuLwDB-JJYMhSpzBAhU,596
|
|
83
85
|
autocoder/index/filter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
84
86
|
autocoder/index/filter/normal_filter.py,sha256=pE5QwcBq6NYHFtYhwhfMJmYQYJwErNs-Q7iZmVBAh-k,7964
|
|
85
|
-
autocoder/index/filter/quick_filter.py,sha256=
|
|
87
|
+
autocoder/index/filter/quick_filter.py,sha256=Po32nJFAbAwb7kMaNkCrL5-ZjVE-Pobm5wzXyw9Y8iE,3882
|
|
86
88
|
autocoder/pyproject/__init__.py,sha256=dQ2_7YZ7guybT9BhfxSGn43eLQJGQN2zgeKa6--JlaQ,14403
|
|
87
89
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
90
|
autocoder/rag/api_server.py,sha256=dRbhAZVRAOlZ64Cnxf4_rKb4iJwHnrWS9Zr67IVORw0,7288
|
|
@@ -134,12 +136,13 @@ autocoder/utils/request_event_queue.py,sha256=r3lo5qGsB1dIjzVQ05dnr0z_9Z3zOkBdP1
|
|
|
134
136
|
autocoder/utils/request_queue.py,sha256=nwp6PMtgTCiuwJI24p8OLNZjUiprC-TsefQrhMI-yPE,3889
|
|
135
137
|
autocoder/utils/rest.py,sha256=opE_kBEdNQdxh350M5lUTMk5TViRfpuKP_qWc0B1lks,8861
|
|
136
138
|
autocoder/utils/tests.py,sha256=BqphrwyycGAvs-5mhH8pKtMZdObwhFtJ5MC_ZAOiLq8,1340
|
|
139
|
+
autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
137
140
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
138
141
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=6D_SIa5hHSwIHC1poO_ztK7IVugAqNHu-jQySd7EnfQ,4181
|
|
139
142
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
140
|
-
auto_coder-0.1.
|
|
141
|
-
auto_coder-0.1.
|
|
142
|
-
auto_coder-0.1.
|
|
143
|
-
auto_coder-0.1.
|
|
144
|
-
auto_coder-0.1.
|
|
145
|
-
auto_coder-0.1.
|
|
143
|
+
auto_coder-0.1.237.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
144
|
+
auto_coder-0.1.237.dist-info/METADATA,sha256=iwXDoHyiKp014_5DEJ8XHf6pl6d6JdejBxaKbNOtEIA,2616
|
|
145
|
+
auto_coder-0.1.237.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
146
|
+
auto_coder-0.1.237.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
147
|
+
auto_coder-0.1.237.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
148
|
+
auto_coder-0.1.237.dist-info/RECORD,,
|
autocoder/auto_coder.py
CHANGED
|
@@ -39,12 +39,12 @@ from rich.console import Console
|
|
|
39
39
|
from rich.panel import Panel
|
|
40
40
|
from rich.markdown import Markdown
|
|
41
41
|
from rich.live import Live
|
|
42
|
-
from autocoder.auto_coder_lang import get_message
|
|
42
|
+
from autocoder.common.auto_coder_lang import get_message
|
|
43
43
|
from autocoder.common.memory_manager import save_to_memory_file
|
|
44
44
|
from autocoder import models as models_module
|
|
45
45
|
from autocoder.common.utils_code_auto_generate import stream_chat_with_continue
|
|
46
46
|
from autocoder.utils.auto_coder_utils.chat_stream_out import stream_out
|
|
47
|
-
|
|
47
|
+
from autocoder.common.printer import Printer
|
|
48
48
|
console = Console()
|
|
49
49
|
|
|
50
50
|
|
|
@@ -69,8 +69,7 @@ def load_include_files(config, base_path, max_depth=10, current_depth=0):
|
|
|
69
69
|
include_files = [include_files]
|
|
70
70
|
|
|
71
71
|
for include_file in include_files:
|
|
72
|
-
abs_include_path = resolve_include_path(base_path, include_file)
|
|
73
|
-
logger.info(f"Loading include file: {abs_include_path}")
|
|
72
|
+
abs_include_path = resolve_include_path(base_path, include_file)
|
|
74
73
|
with open(abs_include_path, "r") as f:
|
|
75
74
|
include_config = yaml.safe_load(f)
|
|
76
75
|
if not include_config:
|
|
@@ -131,15 +130,15 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
131
130
|
if not os.path.isabs(args.source_dir):
|
|
132
131
|
args.source_dir = os.path.abspath(args.source_dir)
|
|
133
132
|
|
|
134
|
-
if not args.silence:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
# if not args.silence:
|
|
134
|
+
# print("Command Line Arguments:")
|
|
135
|
+
# print("-" * 50)
|
|
136
|
+
# for arg, value in vars(args).items():
|
|
137
|
+
# if arg == "context" and value:
|
|
138
|
+
# print(f"{arg:20}: {value[:30]}...")
|
|
139
|
+
# else:
|
|
140
|
+
# print(f"{arg:20}: {value}")
|
|
141
|
+
# print("-" * 50)
|
|
143
142
|
|
|
144
143
|
# init store
|
|
145
144
|
store = Store(os.path.join(args.source_dir, ".auto-coder", "metadata.db"))
|
|
@@ -244,10 +243,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
244
243
|
new_file = os.path.join(
|
|
245
244
|
actions_dir, f"{new_seq}_{raw_args.name}.yml")
|
|
246
245
|
with open(new_file, "w") as f:
|
|
247
|
-
f.write(content)
|
|
248
|
-
|
|
249
|
-
print(f"Successfully created new action file: {new_file}")
|
|
250
|
-
|
|
246
|
+
f.write(content)
|
|
251
247
|
# open_yaml_file_in_editor(new_file)
|
|
252
248
|
return
|
|
253
249
|
|
|
@@ -281,6 +277,22 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
281
277
|
byzerllm.connect_cluster(address=args.ray_address)
|
|
282
278
|
|
|
283
279
|
llm = byzerllm.ByzerLLM(verbose=args.print_request)
|
|
280
|
+
|
|
281
|
+
code_model = byzerllm.ByzerLLM()
|
|
282
|
+
code_model.setup_default_model_name("deepseek_chat")
|
|
283
|
+
llm.setup_sub_client("code_model", code_model)
|
|
284
|
+
|
|
285
|
+
index_filter_model = byzerllm.ByzerLLM()
|
|
286
|
+
index_filter_model.setup_default_model_name("deepseek_r1_chat")
|
|
287
|
+
llm.setup_sub_client("index_filter_model", index_filter_model)
|
|
288
|
+
|
|
289
|
+
generate_rerank_model = byzerllm.ByzerLLM()
|
|
290
|
+
generate_rerank_model.setup_default_model_name("deepseek_r1_chat")
|
|
291
|
+
llm.setup_sub_client("generate_rerank_model", generate_rerank_model)
|
|
292
|
+
|
|
293
|
+
chat_model = byzerllm.ByzerLLM()
|
|
294
|
+
chat_model.setup_default_model_name("deepseek_r1_chat")
|
|
295
|
+
llm.setup_sub_client("chat_model", chat_model)
|
|
284
296
|
|
|
285
297
|
if args.product_mode == "lite":
|
|
286
298
|
llm = byzerllm.SimpleByzerLLM(default_model_name="deepseek_chat")
|
|
@@ -344,9 +356,23 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
344
356
|
}
|
|
345
357
|
)
|
|
346
358
|
|
|
359
|
+
index_filter_llm = byzerllm.SimpleByzerLLM(default_model_name="deepseek_r1_chat")
|
|
360
|
+
index_filter_llm.deploy(
|
|
361
|
+
model_path="",
|
|
362
|
+
pretrained_model_type="saas/openai",
|
|
363
|
+
udf_name="deepseek_r1_chat",
|
|
364
|
+
infer_params={
|
|
365
|
+
"saas.base_url": "https://api.deepseek.com/v1",
|
|
366
|
+
"saas.api_key": api_key,
|
|
367
|
+
"saas.model": "deepseek-reasoner",
|
|
368
|
+
"saas.is_reasoning": True
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
|
|
347
372
|
llm.setup_sub_client("code_model", code_llm)
|
|
348
373
|
llm.setup_sub_client("chat_model", chat_llm)
|
|
349
374
|
llm.setup_sub_client("generate_rerank_model", generate_rerank_llm)
|
|
375
|
+
llm.setup_sub_client("index_filter_model", index_filter_llm)
|
|
350
376
|
|
|
351
377
|
if args.product_mode == "lite":
|
|
352
378
|
# Set up default models based on configuration
|
|
@@ -444,7 +470,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
444
470
|
"saas.is_reasoning": model_info["is_reasoning"]
|
|
445
471
|
}
|
|
446
472
|
)
|
|
447
|
-
llm.setup_sub_client("inference_model", inference_model)
|
|
473
|
+
llm.setup_sub_client("inference_model", inference_model)
|
|
448
474
|
|
|
449
475
|
if args.index_filter_model:
|
|
450
476
|
model_info = models_module.get_model_by_name(args.index_filter_model)
|
|
@@ -1114,20 +1140,25 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1114
1140
|
chat_llm = llm
|
|
1115
1141
|
|
|
1116
1142
|
source_count = 0
|
|
1117
|
-
pre_conversations = []
|
|
1118
|
-
if args.context
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1143
|
+
pre_conversations = []
|
|
1144
|
+
context_content = args.context if args.context else ""
|
|
1145
|
+
if args.context:
|
|
1146
|
+
try:
|
|
1147
|
+
context = json.loads(args.context)
|
|
1148
|
+
if "file_content" in context:
|
|
1149
|
+
context_content = context["file_content"]
|
|
1150
|
+
except:
|
|
1151
|
+
pass
|
|
1152
|
+
|
|
1153
|
+
pre_conversations.append(
|
|
1154
|
+
{
|
|
1155
|
+
"role": "user",
|
|
1156
|
+
"content": f"请阅读下面的代码和文档:\n\n <files>\n{context_content}\n</files>",
|
|
1157
|
+
},
|
|
1158
|
+
)
|
|
1159
|
+
pre_conversations.append(
|
|
1160
|
+
{"role": "assistant", "content": "read"})
|
|
1161
|
+
source_count += 1
|
|
1131
1162
|
|
|
1132
1163
|
from autocoder.index.index import IndexManager
|
|
1133
1164
|
from autocoder.index.entry import build_index_and_filter_files
|
|
@@ -1142,10 +1173,11 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1142
1173
|
else:
|
|
1143
1174
|
pp = SuffixProject(args=args, llm=llm, file_filter=None)
|
|
1144
1175
|
pp.run()
|
|
1145
|
-
sources = pp.sources
|
|
1176
|
+
sources = pp.sources
|
|
1146
1177
|
|
|
1147
1178
|
s = build_index_and_filter_files(
|
|
1148
|
-
llm=llm, args=args, sources=sources)
|
|
1179
|
+
llm=llm, args=args, sources=sources)
|
|
1180
|
+
|
|
1149
1181
|
if s:
|
|
1150
1182
|
pre_conversations.append(
|
|
1151
1183
|
{
|
|
@@ -1275,7 +1307,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1275
1307
|
save_to_memory_file(ask_conversation=chat_history["ask_conversation"],
|
|
1276
1308
|
query=args.query,
|
|
1277
1309
|
response=result)
|
|
1278
|
-
|
|
1310
|
+
printer = Printer()
|
|
1311
|
+
printer.print_in_terminal("memory_save_success")
|
|
1279
1312
|
return {}
|
|
1280
1313
|
|
|
1281
1314
|
if "rag" in args.action:
|