auto-coder 0.1.257__py3-none-any.whl → 0.1.258__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.257.dist-info → auto_coder-0.1.258.dist-info}/METADATA +1 -1
- {auto_coder-0.1.257.dist-info → auto_coder-0.1.258.dist-info}/RECORD +9 -9
- autocoder/common/auto_coder_lang.py +4 -4
- autocoder/utils/model_provider_selector.py +28 -6
- autocoder/version.py +1 -1
- {auto_coder-0.1.257.dist-info → auto_coder-0.1.258.dist-info}/LICENSE +0 -0
- {auto_coder-0.1.257.dist-info → auto_coder-0.1.258.dist-info}/WHEEL +0 -0
- {auto_coder-0.1.257.dist-info → auto_coder-0.1.258.dist-info}/entry_points.txt +0 -0
- {auto_coder-0.1.257.dist-info → auto_coder-0.1.258.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,7 @@ autocoder/chat_auto_coder_lang.py,sha256=WxylHYFHqBxM_6YvoqIrPdNQFlobYT1t07xlCIS
|
|
|
11
11
|
autocoder/command_args.py,sha256=9aYJ-AmPxP1sQh6ciw04FWHjSn31f2W9afXFwo8wgx4,30441
|
|
12
12
|
autocoder/lang.py,sha256=U6AjVV8Rs1uLyjFCZ8sT6WWuNUxMBqkXXIOs4S120uk,14511
|
|
13
13
|
autocoder/models.py,sha256=rG7ckiKlers-XoO1gWxNK-Y-IbqD82WS3qFMPHqvFsc,9072
|
|
14
|
-
autocoder/version.py,sha256=
|
|
14
|
+
autocoder/version.py,sha256=ZqpPzT_HdggyvazgM4cfgBLNgZaYhDcBMd4HUgyfqGc,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
|
|
@@ -29,7 +29,7 @@ autocoder/common/__init__.py,sha256=wJIAB6EOeCmo9UXCGC7E9u_GGWO5DjXW78wUi3hz1lI,
|
|
|
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=xxmO4Htil4S2KvWa3RRi9rMgrod_io1MbctJkRXBfDg,20760
|
|
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
|
|
@@ -135,7 +135,7 @@ autocoder/utils/conversation_store.py,sha256=sz-hhY7sttPAUOAQU6Pze-5zJc3j0_Emj22
|
|
|
135
135
|
autocoder/utils/llm_client_interceptors.py,sha256=FEHNXoFZlCjAHQcjPRyX8FOMjo6rPXpO2AJ2zn2KTTo,901
|
|
136
136
|
autocoder/utils/llms.py,sha256=HM5K_v4AcuWo65lgcp66DEqaU9-fjoT7mcI1iv2Fopg,3839
|
|
137
137
|
autocoder/utils/log_capture.py,sha256=I-bsJFLWoGUiX-GKoZsH9kWJCKSV7ZlUnRt7jh-fOL0,1548
|
|
138
|
-
autocoder/utils/model_provider_selector.py,sha256=
|
|
138
|
+
autocoder/utils/model_provider_selector.py,sha256=g5O9frBWkXR7iqjYDdTvhoxzTQx0NaPVPu9M2ItqhpE,7602
|
|
139
139
|
autocoder/utils/multi_turn.py,sha256=unK9OpqVRbK6uIcTKXgggX2wNmyj7s5eyEAQ2xUwHoM,88
|
|
140
140
|
autocoder/utils/operate_config_api.py,sha256=99YAKsuUFLPwrRvj0CJal_bAPgyiXWMma6ZKMU56thw,5790
|
|
141
141
|
autocoder/utils/print_table.py,sha256=ZMRhCA9DD0FUfKyJBWd5bDdj1RrtPtgOMWSJwtvZcLs,403
|
|
@@ -149,9 +149,9 @@ autocoder/utils/types.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
149
149
|
autocoder/utils/auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
150
150
|
autocoder/utils/auto_coder_utils/chat_stream_out.py,sha256=xWXqICANbDOovH4wcFW1eSI7lB7TjXbk1mSU4bTKEW4,11434
|
|
151
151
|
autocoder/utils/chat_auto_coder_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
152
|
-
auto_coder-0.1.
|
|
153
|
-
auto_coder-0.1.
|
|
154
|
-
auto_coder-0.1.
|
|
155
|
-
auto_coder-0.1.
|
|
156
|
-
auto_coder-0.1.
|
|
157
|
-
auto_coder-0.1.
|
|
152
|
+
auto_coder-0.1.258.dist-info/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
|
|
153
|
+
auto_coder-0.1.258.dist-info/METADATA,sha256=t48Rt7ffsIuQKceJzcS7igvP4sDu_40I3DkSG2vYhBE,2616
|
|
154
|
+
auto_coder-0.1.258.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
155
|
+
auto_coder-0.1.258.dist-info/entry_points.txt,sha256=0nzHtHH4pNcM7xq4EBA2toS28Qelrvcbrr59GqD_0Ak,350
|
|
156
|
+
auto_coder-0.1.258.dist-info/top_level.txt,sha256=Jqc0_uJSw2GwoFQAa9iJxYns-2mWla-9ok_Y3Gcznjk,10
|
|
157
|
+
auto_coder-0.1.258.dist-info/RECORD,,
|
|
@@ -6,13 +6,13 @@ MESSAGES = {
|
|
|
6
6
|
"model_provider_select_title": "Select Model Provider",
|
|
7
7
|
"model_provider_select_text": "Please select your model provider:",
|
|
8
8
|
"model_provider_volcano": "Volcano Engine",
|
|
9
|
-
"
|
|
9
|
+
"model_provider_siliconflow": "SiliconFlow AI",
|
|
10
10
|
"model_provider_deepseek": "DeepSeek Official",
|
|
11
11
|
"model_provider_api_key_title": "API Key",
|
|
12
12
|
"model_provider_volcano_api_key_text": "Please enter your Volcano Engine API key:",
|
|
13
13
|
"model_provider_volcano_r1_text": "Please enter your Volcano Engine R1 endpoint (format: ep-20250204215011-vzbsg):",
|
|
14
14
|
"model_provider_volcano_v3_text": "Please enter your Volcano Engine V3 endpoint (format: ep-20250204215011-vzbsg):",
|
|
15
|
-
"
|
|
15
|
+
"model_provider_siliconflow_api_key_text": "Please enter your SiliconFlow AI API key:",
|
|
16
16
|
"model_provider_deepseek_api_key_text": "Please enter your DeepSeek API key:",
|
|
17
17
|
"model_provider_selected": "Provider configuration completed successfully! You can use /models command to view, add and modify all models later.",
|
|
18
18
|
"model_provider_success_title": "Success",
|
|
@@ -115,13 +115,13 @@ MESSAGES = {
|
|
|
115
115
|
"model_provider_select_title": "选择模型供应商",
|
|
116
116
|
"model_provider_select_text": "请选择您的模型供应商:",
|
|
117
117
|
"model_provider_volcano": "火山方舟",
|
|
118
|
-
"
|
|
118
|
+
"model_provider_siliconflow": "硅基流动",
|
|
119
119
|
"model_provider_deepseek": "DeepSeek官方",
|
|
120
120
|
"model_provider_api_key_title": "API密钥",
|
|
121
121
|
"model_provider_volcano_api_key_text": "请输入您的火山方舟API密钥:",
|
|
122
122
|
"model_provider_volcano_r1_text": "请输入您的火山方舟 R1 推理点(格式如: ep-20250204215011-vzbsg):",
|
|
123
123
|
"model_provider_volcano_v3_text": "请输入您的火山方舟 V3 推理点(格式如: ep-20250204215011-vzbsg):",
|
|
124
|
-
"
|
|
124
|
+
"model_provider_siliconflow_api_key_text": "请输入您的硅基流动API密钥:",
|
|
125
125
|
"model_provider_deepseek_api_key_text": "请输入您的DeepSeek API密钥:",
|
|
126
126
|
"model_provider_selected": "供应商配置已成功完成!后续你可以使用 /models 命令,查看,新增和修改所有模型",
|
|
127
127
|
"model_provider_success_title": "成功",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from prompt_toolkit.shortcuts import radiolist_dialog, input_dialog
|
|
2
2
|
from prompt_toolkit.validation import Validator, ValidationError
|
|
3
|
+
from prompt_toolkit.styles import Style
|
|
3
4
|
from rich.console import Console
|
|
4
5
|
from typing import Optional, Dict, Any, List
|
|
5
6
|
from autocoder.common.printer import Printer
|
|
@@ -33,7 +34,7 @@ PROVIDER_INFO_LIST = [
|
|
|
33
34
|
v3_output_price=4.0,
|
|
34
35
|
),
|
|
35
36
|
ProviderInfo(
|
|
36
|
-
name="
|
|
37
|
+
name="siliconflow",
|
|
37
38
|
endpoint="https://api.siliconflow.cn/v1",
|
|
38
39
|
r1_model="Pro/deepseek-ai/DeepSeek-R1",
|
|
39
40
|
v3_model="Pro/deepseek-ai/DeepSeek-V3",
|
|
@@ -56,6 +57,21 @@ PROVIDER_INFO_LIST = [
|
|
|
56
57
|
),
|
|
57
58
|
]
|
|
58
59
|
|
|
60
|
+
dialog_style = Style.from_dict({
|
|
61
|
+
'dialog': 'bg:#2b2b2b',
|
|
62
|
+
'dialog frame.label': 'bg:#2b2b2b #ffffff',
|
|
63
|
+
'dialog.body': 'bg:#2b2b2b #ffffff',
|
|
64
|
+
'dialog shadow': 'bg:#1f1f1f',
|
|
65
|
+
'button': 'bg:#2b2b2b #808080',
|
|
66
|
+
'button.focused': 'bg:#1e1e1e #ffd700 bold',
|
|
67
|
+
'checkbox': '#e6e6e6',
|
|
68
|
+
'checkbox-selected': '#0078d4',
|
|
69
|
+
'radio-selected': 'bg:#0078d4 #ffffff',
|
|
70
|
+
'dialog frame.border': '#0078d4',
|
|
71
|
+
'radio': 'bg:#2b2b2b #808080',
|
|
72
|
+
'radio.focused': 'bg:#1e1e1e #ffd700 bold'
|
|
73
|
+
})
|
|
74
|
+
|
|
59
75
|
class VolcanoEndpointValidator(Validator):
|
|
60
76
|
def validate(self, document):
|
|
61
77
|
text = document.text
|
|
@@ -123,14 +139,17 @@ class ModelProviderSelector:
|
|
|
123
139
|
Let user select a model provider and input necessary credentials.
|
|
124
140
|
Returns a dictionary with provider info or None if cancelled.
|
|
125
141
|
"""
|
|
142
|
+
|
|
143
|
+
|
|
126
144
|
result = radiolist_dialog(
|
|
127
145
|
title=self.printer.get_message_from_key("model_provider_select_title"),
|
|
128
146
|
text=self.printer.get_message_from_key("model_provider_select_text"),
|
|
129
147
|
values=[
|
|
130
148
|
("volcano", self.printer.get_message_from_key("model_provider_volcano")),
|
|
131
|
-
("siliconflow", self.printer.get_message_from_key("
|
|
149
|
+
("siliconflow", self.printer.get_message_from_key("model_provider_siliconflow")),
|
|
132
150
|
("deepseek", self.printer.get_message_from_key("model_provider_deepseek"))
|
|
133
|
-
]
|
|
151
|
+
],
|
|
152
|
+
style=dialog_style
|
|
134
153
|
).run()
|
|
135
154
|
|
|
136
155
|
if result is None:
|
|
@@ -148,7 +167,8 @@ class ModelProviderSelector:
|
|
|
148
167
|
r1_endpoint = input_dialog(
|
|
149
168
|
title=self.printer.get_message_from_key("model_provider_api_key_title"),
|
|
150
169
|
text=self.printer.get_message_from_key("model_provider_volcano_r1_text"),
|
|
151
|
-
validator=VolcanoEndpointValidator()
|
|
170
|
+
validator=VolcanoEndpointValidator(),
|
|
171
|
+
style=dialog_style
|
|
152
172
|
).run()
|
|
153
173
|
|
|
154
174
|
if r1_endpoint is None:
|
|
@@ -160,7 +180,8 @@ class ModelProviderSelector:
|
|
|
160
180
|
v3_endpoint = input_dialog(
|
|
161
181
|
title=self.printer.get_message_from_key("model_provider_api_key_title"),
|
|
162
182
|
text=self.printer.get_message_from_key("model_provider_volcano_v3_text"),
|
|
163
|
-
validator=VolcanoEndpointValidator()
|
|
183
|
+
validator=VolcanoEndpointValidator(),
|
|
184
|
+
style=dialog_style
|
|
164
185
|
).run()
|
|
165
186
|
|
|
166
187
|
if v3_endpoint is None:
|
|
@@ -172,7 +193,8 @@ class ModelProviderSelector:
|
|
|
172
193
|
api_key = input_dialog(
|
|
173
194
|
title=self.printer.get_message_from_key("model_provider_api_key_title"),
|
|
174
195
|
text=self.printer.get_message_from_key(f"model_provider_{result}_api_key_text"),
|
|
175
|
-
password=True
|
|
196
|
+
password=True,
|
|
197
|
+
style=dialog_style
|
|
176
198
|
).run()
|
|
177
199
|
|
|
178
200
|
if api_key is None:
|
autocoder/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.258"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|