auto-coder 0.1.280__py3-none-any.whl → 0.1.282__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.280.dist-info → auto_coder-0.1.282.dist-info}/METADATA +2 -2
- {auto_coder-0.1.280.dist-info → auto_coder-0.1.282.dist-info}/RECORD +14 -13
- autocoder/auto_coder.py +2 -1
- autocoder/auto_coder_rag.py +93 -29
- autocoder/common/context_pruner.py +168 -206
- autocoder/index/entry.py +1 -1
- autocoder/rag/cache/local_byzer_storage_cache.py +457 -0
- autocoder/rag/document_retriever.py +22 -53
- autocoder/rag/long_context_rag.py +18 -1
- autocoder/version.py +1 -1
- {auto_coder-0.1.280.dist-info → auto_coder-0.1.282.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.280.dist-info → auto_coder-0.1.282.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.280.dist-info → auto_coder-0.1.282.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.280.dist-info → auto_coder-0.1.282.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.282
|
|
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.171
|
|
30
30
|
Requires-Dist: patch
|
|
31
31
|
Requires-Dist: diff-match-patch
|
|
32
32
|
Requires-Dist: GitPython
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
autocoder/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
autocoder/auto_coder.py,sha256=
|
|
2
|
+
autocoder/auto_coder.py,sha256=cxH77xjLPwCmE6R-o1KpONOZlVNOvbTYV4ilAjL8w8A,65592
|
|
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=cwsCpudP6d2CHOUTD-RXw7CCgx-c7sG7_cKqnjzphlk,32973
|
|
5
5
|
autocoder/auto_coder_rag_client_mcp.py,sha256=QRxUbjc6A8UmDMQ8lXgZkjgqtq3lgKYeatJbDY6rSo0,6270
|
|
6
6
|
autocoder/auto_coder_rag_mcp.py,sha256=-RrjNwFaS2e5v8XDIrKR-zlUNUE8UBaeOtojffBrvJo,8521
|
|
7
7
|
autocoder/auto_coder_runner.py,sha256=w-4MCKhOFaoABcDfVoZoonF59UyRso3kghimQYLz3NA,100851
|
|
@@ -12,7 +12,7 @@ autocoder/chat_auto_coder_lang.py,sha256=ShOQVOnMA-WlT-fB9OrOer-xQkbcWxJGl-WMPuZ
|
|
|
12
12
|
autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
|
|
13
13
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
14
14
|
autocoder/models.py,sha256=PlG1tKHSHwB57cKLOl5gTl5yTzFUDzCgeHPJU3N9F6Q,9106
|
|
15
|
-
autocoder/version.py,sha256=
|
|
15
|
+
autocoder/version.py,sha256=MuZdShxBktD9b-QDa1Sdv3QS_FjwPsAMhpVaUVk1n9A,23
|
|
16
16
|
autocoder/agent/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
autocoder/agent/auto_demand_organizer.py,sha256=NWSAEsEk94vT3lGjfo25kKLMwYdPcpy9e-i21txPasQ,6942
|
|
18
18
|
autocoder/agent/auto_filegroup.py,sha256=CW7bqp0FW1GIEMnl-blyAc2UGT7O9Mom0q66ITz1ckM,6635
|
|
@@ -55,7 +55,7 @@ autocoder/common/command_templates.py,sha256=WAixVjue5QmCFAD13K4ElfcOEjdeGr8tFb0
|
|
|
55
55
|
autocoder/common/conf_import_export.py,sha256=w__WsIobe6nmsGns2pV-laU7R5ZvtQNuIbXebxhbY7A,3967
|
|
56
56
|
autocoder/common/conf_validator.py,sha256=EzSmadpZ22D9e8iWmfeWodUeYJt0IgMoaAOmCleXliI,8795
|
|
57
57
|
autocoder/common/const.py,sha256=eTjhjh4Aj4CUzviJ81jaf3Y5cwqsLATySn2wJxaS6RQ,2911
|
|
58
|
-
autocoder/common/context_pruner.py,sha256=
|
|
58
|
+
autocoder/common/context_pruner.py,sha256=HlU5BmxpCX7uVTJUsTFLlXvkwcOQuidI9uCKZaFxh6s,19874
|
|
59
59
|
autocoder/common/conversation_pruner.py,sha256=pzmrQEa7pFzA66eYSS_h7VqP6ZwUABeooDQzm0PGu0A,5770
|
|
60
60
|
autocoder/common/files.py,sha256=nPiKcnUcYZbSUn3TskKeTVnAxCJRtuehPuB_5d2imX8,4618
|
|
61
61
|
autocoder/common/git_utils.py,sha256=EK8gekbXsG6BNDVrd1Nsan_7kJ71dd8_w9FiOFxjsVI,26276
|
|
@@ -95,7 +95,7 @@ autocoder/dispacher/actions/plugins/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
|
|
|
95
95
|
autocoder/dispacher/actions/plugins/action_regex_project.py,sha256=AqGIkjbqV1eOS3vBoZUTSOpyOlkv1p5h35mI2Kcvekw,6906
|
|
96
96
|
autocoder/dispacher/actions/plugins/action_translate.py,sha256=GEn7dZA22jy5WyzINomjmzzB795p2Olg-CJla97lRF8,7744
|
|
97
97
|
autocoder/index/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
98
|
-
autocoder/index/entry.py,sha256=
|
|
98
|
+
autocoder/index/entry.py,sha256=YwwKLxgre2xIbes7f_S0Dh7mAN7RoUSph9ORCmtTun8,14395
|
|
99
99
|
autocoder/index/for_command.py,sha256=BFvljE4t6VaMBGboZAuhUCzVK0EitCy_n5D_7FEnihw,3204
|
|
100
100
|
autocoder/index/index.py,sha256=3-SHlmeQMv6SFxNj7vVcNRDAYj9ZshuJJ1zXwBi0cDc,30873
|
|
101
101
|
autocoder/index/symbols_utils.py,sha256=_EP7E_qWXxluAxq3FGZLlLfdrfwx3FmxCdulI8VGuac,2244
|
|
@@ -109,10 +109,10 @@ autocoder/pyproject/__init__.py,sha256=ms-A_pocgGv0oZPEW8JAdXi7G-VSVhkQ6CnWFe535
|
|
|
109
109
|
autocoder/rag/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
110
110
|
autocoder/rag/api_server.py,sha256=xiypCkdbclY0Z3Cmq5FTvtKrfQUV7yKcDaFFUttA2n0,7242
|
|
111
111
|
autocoder/rag/doc_filter.py,sha256=UduVO2mlrngwJICrefjDJTYfdmQ4GcRXrfWDQ7xXksk,14206
|
|
112
|
-
autocoder/rag/document_retriever.py,sha256=
|
|
112
|
+
autocoder/rag/document_retriever.py,sha256=MGn6oIPo49BbRC99xmLMFkZrpHfcDfKoGYqWxXF554U,8051
|
|
113
113
|
autocoder/rag/lang.py,sha256=TVNx5m7OtBcdfahzI29tMj9m1yrEm32G1c1zc4ZNIPs,3130
|
|
114
114
|
autocoder/rag/llm_wrapper.py,sha256=Ht5GF5yJtrztoliujsZzx_ooWZmHkd5xLZKcGEiicZw,4303
|
|
115
|
-
autocoder/rag/long_context_rag.py,sha256=
|
|
115
|
+
autocoder/rag/long_context_rag.py,sha256=ZvTT3yO5FmJwWXHqqFrQgkb9YrVajrXrtB_tcFdDwAs,40172
|
|
116
116
|
autocoder/rag/rag_config.py,sha256=8LwFcTd8OJWWwi1_WY4IzjqgtT6RyE2j4PjxS5cCTDE,802
|
|
117
117
|
autocoder/rag/rag_entry.py,sha256=6TKtErZ0Us9XSV6HgRKXA6yR3SiZGPHpynOKSaR1wgE,2463
|
|
118
118
|
autocoder/rag/raw_rag.py,sha256=BOr0YGf3umjqXOIDVO1LXQ0bIHx8hzBdiubND2ezyxc,2946
|
|
@@ -130,6 +130,7 @@ autocoder/rag/cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
130
130
|
autocoder/rag/cache/base_cache.py,sha256=EaYYYbclMBvnlOUoM7qonnluwZX5oSvUjdvGvFun8_8,742
|
|
131
131
|
autocoder/rag/cache/byzer_storage_cache.py,sha256=gK90pf741CgccCzQ73urBorCqVyAfwU1FAqMtSorWVk,17232
|
|
132
132
|
autocoder/rag/cache/file_monitor_cache.py,sha256=2TnOW8Y81Zc0WA1upRrkmQH18IMdv40CeNccmnTvd3c,4981
|
|
133
|
+
autocoder/rag/cache/local_byzer_storage_cache.py,sha256=Uhmu5JK0tfZ8NvlcjJzcwtQRhZDpbGp_U6qLXZxVwss,17495
|
|
133
134
|
autocoder/rag/cache/simple_cache.py,sha256=8FMmBAfhAPcdSNUWC6Ga43LBFGXD-klwabVbzm_bciI,9347
|
|
134
135
|
autocoder/rag/loaders/__init__.py,sha256=EQHEZ5Cmz-mGP2SllUTvcIbYCnF7W149dNpNItfs0yE,304
|
|
135
136
|
autocoder/rag/loaders/docx_loader.py,sha256=ZswPqiiLngUEpzLhNNm1nmwEYV7ZHFEfIoXoG7c5GDU,614
|
|
@@ -167,9 +168,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
167
168
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
168
169
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=lkJ_A-sYU36JMzjFWkk3pR6uos8oZHYt9GPsPe_CPAo,11766
|
|
169
170
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
170
|
-
auto_coder-0.1.
|
|
171
|
-
auto_coder-0.1.
|
|
172
|
-
auto_coder-0.1.
|
|
173
|
-
auto_coder-0.1.
|
|
174
|
-
auto_coder-0.1.
|
|
175
|
-
auto_coder-0.1.
|
|
171
|
+
auto_coder-0.1.282.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
172
|
+
auto_coder-0.1.282.dist-info/METADATA,sha256=L2wd7XGt-KURDWFp-mn4HAo7K87iqwuPXKfepSBC3JA,2643
|
|
173
|
+
auto_coder-0.1.282.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
174
|
+
auto_coder-0.1.282.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
175
|
+
auto_coder-0.1.282.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
176
|
+
auto_coder-0.1.282.dist-info/RECORD,,
|
autocoder/auto_coder.py
CHANGED
|
@@ -1345,7 +1345,8 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
1345
1345
|
v = learner.learn_from_commit(query=args.query,conversations=loaded_conversations)
|
|
1346
1346
|
else:
|
|
1347
1347
|
# 预估token数量
|
|
1348
|
-
|
|
1348
|
+
dumped_conversations = json.dumps(loaded_conversations, ensure_ascii=False)
|
|
1349
|
+
estimated_input_tokens = count_tokens(dumped_conversations)
|
|
1349
1350
|
printer = Printer()
|
|
1350
1351
|
printer.print_in_terminal("estimated_chat_input_tokens", style="yellow",
|
|
1351
1352
|
estimated_input_tokens=estimated_input_tokens
|
autocoder/auto_coder_rag.py
CHANGED
|
@@ -22,7 +22,7 @@ from loguru import logger
|
|
|
22
22
|
import asyncio
|
|
23
23
|
from datetime import datetime
|
|
24
24
|
|
|
25
|
-
from autocoder.rag.
|
|
25
|
+
from autocoder.rag.utils import process_file_local
|
|
26
26
|
import pkg_resources
|
|
27
27
|
from autocoder.rag.token_counter import TokenCounter
|
|
28
28
|
from autocoder.rag.types import RAGServiceInfo
|
|
@@ -186,6 +186,11 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
186
186
|
build_index_parser.add_argument(
|
|
187
187
|
"--model", default="v3_chat", help=desc["model"]
|
|
188
188
|
)
|
|
189
|
+
|
|
190
|
+
build_index_parser.add_argument(
|
|
191
|
+
"--on_ray", action="store_true", help="Run on Ray"
|
|
192
|
+
)
|
|
193
|
+
|
|
189
194
|
build_index_parser.add_argument(
|
|
190
195
|
"--index_model", default="", help=desc["index_model"]
|
|
191
196
|
)
|
|
@@ -216,8 +221,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
216
221
|
)
|
|
217
222
|
serve_parser.add_argument("--file", default="", help=desc["file"])
|
|
218
223
|
serve_parser.add_argument("--model", default="v3_chat", help=desc["model"])
|
|
219
|
-
serve_parser.add_argument("--index_model", default="", help=desc["index_model"])
|
|
220
|
-
serve_parser.add_argument("--emb_model", default="", help=desc["emb_model"])
|
|
224
|
+
serve_parser.add_argument("--index_model", default="", help=desc["index_model"])
|
|
221
225
|
serve_parser.add_argument("--ray_address", default="auto", help=desc["ray_address"])
|
|
222
226
|
serve_parser.add_argument(
|
|
223
227
|
"--index_filter_workers",
|
|
@@ -377,6 +381,12 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
377
381
|
help="The model used for question answering",
|
|
378
382
|
)
|
|
379
383
|
|
|
384
|
+
serve_parser.add_argument(
|
|
385
|
+
"--emb_model",
|
|
386
|
+
default="",
|
|
387
|
+
help="The model used for embedding documents",
|
|
388
|
+
)
|
|
389
|
+
|
|
380
390
|
# Benchmark command
|
|
381
391
|
benchmark_parser = subparsers.add_parser(
|
|
382
392
|
"benchmark", help="Benchmark LLM client performance"
|
|
@@ -510,10 +520,7 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
510
520
|
# Generate unique name for RAG build if doc_dir exists
|
|
511
521
|
if server_args.doc_dir:
|
|
512
522
|
auto_coder_args.rag_build_name = generate_unique_name_from_path(server_args.doc_dir)
|
|
513
|
-
logger.info(f"Generated RAG build name: {auto_coder_args.rag_build_name}")
|
|
514
|
-
|
|
515
|
-
if auto_coder_args.enable_hybrid_index and args.product_mode == "lite":
|
|
516
|
-
raise Exception("Hybrid index is not supported in lite mode")
|
|
523
|
+
logger.info(f"Generated RAG build name: {auto_coder_args.rag_build_name}")
|
|
517
524
|
|
|
518
525
|
if auto_coder_args.enable_hybrid_index and args.product_mode == "pro":
|
|
519
526
|
# 尝试连接storage
|
|
@@ -555,16 +562,22 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
555
562
|
qa_model.skip_nontext_check = True
|
|
556
563
|
llm.setup_sub_client("qa_model", qa_model)
|
|
557
564
|
|
|
565
|
+
if args.emb_model:
|
|
566
|
+
emb_model = byzerllm.ByzerLLM()
|
|
567
|
+
emb_model.setup_default_model_name(args.emb_model)
|
|
568
|
+
emb_model.skip_nontext_check = True
|
|
569
|
+
llm.setup_sub_client("emb_model", emb_model)
|
|
570
|
+
|
|
558
571
|
# 当启用hybrid_index时,检查必要的组件
|
|
559
572
|
if auto_coder_args.enable_hybrid_index:
|
|
560
|
-
if not llm.is_model_exist("emb"):
|
|
573
|
+
if not args.emb_model and not llm.is_model_exist("emb"):
|
|
561
574
|
logger.error(
|
|
562
575
|
"When enable_hybrid_index is true, an 'emb' model must be deployed"
|
|
563
576
|
)
|
|
564
577
|
return
|
|
565
|
-
llm.setup_default_emb_model_name("emb")
|
|
578
|
+
llm.setup_default_emb_model_name(args.emb_model or "emb")
|
|
566
579
|
|
|
567
|
-
|
|
580
|
+
if args.product_mode == "lite":
|
|
568
581
|
from autocoder import models as models_module
|
|
569
582
|
model_info = models_module.get_model_by_name(args.model)
|
|
570
583
|
llm = byzerllm.SimpleByzerLLM(default_model_name=args.model)
|
|
@@ -629,6 +642,26 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
629
642
|
)
|
|
630
643
|
llm.setup_sub_client("qa_model", qa_model)
|
|
631
644
|
|
|
645
|
+
if args.emb_model:
|
|
646
|
+
model_info = models_module.get_model_by_name(args.emb_model)
|
|
647
|
+
emb_model = byzerllm.SimpleByzerLLM(default_model_name=args.emb_model)
|
|
648
|
+
emb_model.deploy(
|
|
649
|
+
model_path="",
|
|
650
|
+
pretrained_model_type=model_info["model_type"],
|
|
651
|
+
udf_name=args.emb_model,
|
|
652
|
+
infer_params={
|
|
653
|
+
"saas.base_url": model_info["base_url"],
|
|
654
|
+
"saas.api_key": model_info["api_key"],
|
|
655
|
+
"saas.model": model_info["model_name"],
|
|
656
|
+
"saas.is_reasoning": False
|
|
657
|
+
}
|
|
658
|
+
)
|
|
659
|
+
llm.setup_sub_client("emb_model", emb_model)
|
|
660
|
+
|
|
661
|
+
if args.enable_hybrid_index:
|
|
662
|
+
if not args.emb_model:
|
|
663
|
+
raise Exception("When enable_hybrid_index is true, an 'emb' model must be specified")
|
|
664
|
+
|
|
632
665
|
if server_args.doc_dir:
|
|
633
666
|
auto_coder_args.rag_type = "simple"
|
|
634
667
|
auto_coder_args.rag_build_name = generate_unique_name_from_path(server_args.doc_dir)
|
|
@@ -675,31 +708,62 @@ def main(input_args: Optional[List[str]] = None):
|
|
|
675
708
|
auto_coder_args.enable_hybrid_index = True
|
|
676
709
|
auto_coder_args.rag_type = "simple"
|
|
677
710
|
|
|
678
|
-
|
|
679
|
-
from byzerllm.apps.byzer_storage.simple_api import ByzerStorage
|
|
680
|
-
|
|
681
|
-
storage = ByzerStorage("byzerai_store", "rag", "files")
|
|
682
|
-
storage.retrieval.cluster_info("byzerai_store")
|
|
683
|
-
except Exception as e:
|
|
684
|
-
logger.error(
|
|
685
|
-
"When enable_hybrid_index is true, ByzerStorage must be started"
|
|
686
|
-
)
|
|
687
|
-
logger.error("Please run 'byzerllm storage start' first")
|
|
688
|
-
return
|
|
711
|
+
if args.on_ray:
|
|
689
712
|
|
|
690
|
-
|
|
691
|
-
|
|
713
|
+
try:
|
|
714
|
+
from byzerllm.apps.byzer_storage.simple_api import ByzerStorage
|
|
692
715
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
716
|
+
storage = ByzerStorage("byzerai_store", "rag", "files")
|
|
717
|
+
storage.retrieval.cluster_info("byzerai_store")
|
|
718
|
+
except Exception as e:
|
|
696
719
|
logger.error(
|
|
697
|
-
"When enable_hybrid_index is true,
|
|
720
|
+
"When enable_hybrid_index is true, ByzerStorage must be started"
|
|
698
721
|
)
|
|
722
|
+
logger.error("Please run 'byzerllm storage start' first")
|
|
699
723
|
return
|
|
700
|
-
llm.setup_default_emb_model_name("emb")
|
|
701
724
|
|
|
702
|
-
|
|
725
|
+
llm = byzerllm.ByzerLLM()
|
|
726
|
+
llm.setup_default_model_name(args.model)
|
|
727
|
+
|
|
728
|
+
# 当启用hybrid_index时,检查必要的组件
|
|
729
|
+
if auto_coder_args.enable_hybrid_index:
|
|
730
|
+
if not llm.is_model_exist("emb"):
|
|
731
|
+
logger.error(
|
|
732
|
+
"When enable_hybrid_index is true, an 'emb' model must be deployed"
|
|
733
|
+
)
|
|
734
|
+
return
|
|
735
|
+
llm.setup_default_emb_model_name("emb")
|
|
736
|
+
else:
|
|
737
|
+
from autocoder import models as models_module
|
|
738
|
+
model_info = models_module.get_model_by_name(args.model)
|
|
739
|
+
llm = byzerllm.SimpleByzerLLM(default_model_name=args.model)
|
|
740
|
+
llm.deploy(
|
|
741
|
+
model_path="",
|
|
742
|
+
pretrained_model_type=model_info["model_type"],
|
|
743
|
+
udf_name=args.model,
|
|
744
|
+
infer_params={
|
|
745
|
+
"saas.base_url": model_info["base_url"],
|
|
746
|
+
"saas.api_key": model_info["api_key"],
|
|
747
|
+
"saas.model": model_info["model_name"],
|
|
748
|
+
"saas.is_reasoning": model_info["is_reasoning"]
|
|
749
|
+
}
|
|
750
|
+
)
|
|
751
|
+
|
|
752
|
+
model_info = models_module.get_model_by_name(args.emb_model)
|
|
753
|
+
emb_model = byzerllm.SimpleByzerLLM(default_model_name=args.emb_model)
|
|
754
|
+
emb_model.deploy(
|
|
755
|
+
model_path="",
|
|
756
|
+
pretrained_model_type=model_info["model_type"],
|
|
757
|
+
udf_name=args.emb_model,
|
|
758
|
+
infer_params={
|
|
759
|
+
"saas.base_url": model_info["base_url"],
|
|
760
|
+
"saas.api_key": model_info["api_key"],
|
|
761
|
+
"saas.model": model_info["model_name"],
|
|
762
|
+
"saas.is_reasoning": False
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
llm.setup_sub_client("emb_model", emb_model)
|
|
766
|
+
|
|
703
767
|
rag = RAGFactory.get_rag(
|
|
704
768
|
llm=llm,
|
|
705
769
|
args=auto_coder_args,
|