Spaces:
Sleeping
Sleeping
Tuchuanhuhuhu
commited on
Commit
•
461db8d
1
Parent(s):
3bb973b
用语改动
Browse files- modules/base_model.py +1 -2
- modules/models.py +0 -10
- modules/presets.py +1 -1
modules/base_model.py
CHANGED
@@ -259,8 +259,7 @@ class BaseLLMModel:
|
|
259 |
display_reference = ""
|
260 |
|
261 |
if (
|
262 |
-
self.api_key is
|
263 |
-
and len(self.api_key) == 0
|
264 |
and not shared.state.multi_api_key
|
265 |
):
|
266 |
status_text = STANDARD_ERROR_MSG + NO_APIKEY_MSG
|
|
|
259 |
display_reference = ""
|
260 |
|
261 |
if (
|
262 |
+
self.api_key is None
|
|
|
263 |
and not shared.state.multi_api_key
|
264 |
):
|
265 |
status_text = STANDARD_ERROR_MSG + NO_APIKEY_MSG
|
modules/models.py
CHANGED
@@ -441,16 +441,6 @@ class ModelManager:
|
|
441 |
def set_token_upper_limit(self, *args):
|
442 |
return self.model.set_token_upper_limit(*args)
|
443 |
|
444 |
-
# temperature_slider.change(current_model.value.set_temperature, [temperature_slider], None)
|
445 |
-
# top_p_slider.change(current_model.value.set_top_p, [top_p_slider], None)
|
446 |
-
# n_choices_slider.change(current_model.value.set_n_choices, [n_choices_slider], None)
|
447 |
-
# stop_sequence_txt.change(current_model.value.set_stop_sequence, [stop_sequence_txt], None)
|
448 |
-
# max_tokens_slider.change(current_model.value.set_max_tokens, [max_tokens_slider], None)
|
449 |
-
# presence_penalty_slider.change(current_model.value.set_presence_penalty, [presence_penalty_slider], None)
|
450 |
-
# frequency_penalty_slider.change(current_model.value.set_frequency_penalty, [frequency_penalty_slider], None)
|
451 |
-
# logit_bias_txt.change(current_model.value.set_logit_bias, [logit_bias_txt], None)
|
452 |
-
# user_identifier_txt.change(current_model.value.set_user_identifier, [user_identifier_txt], None)
|
453 |
-
|
454 |
def set_temperature(self, *args):
|
455 |
self.model.set_temperature(*args)
|
456 |
|
|
|
441 |
def set_token_upper_limit(self, *args):
|
442 |
return self.model.set_token_upper_limit(*args)
|
443 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
def set_temperature(self, *args):
|
445 |
self.model.set_temperature(*args)
|
446 |
|
modules/presets.py
CHANGED
@@ -20,7 +20,7 @@ CONNECTION_TIMEOUT_MSG = "连接超时,无法获取对话。" # 连接超时
|
|
20 |
READ_TIMEOUT_MSG = "读取超时,无法获取对话。" # 读取超时
|
21 |
PROXY_ERROR_MSG = "代理错误,无法获取对话。" # 代理错误
|
22 |
SSL_ERROR_PROMPT = "SSL错误,无法获取对话。" # SSL 错误
|
23 |
-
NO_APIKEY_MSG = "API key
|
24 |
NO_INPUT_MSG = "请输入对话内容。" # 未输入对话内容
|
25 |
BILLING_NOT_APPLICABLE_MSG = "模型本地运行中" # 本地运行的模型返回的账单信息
|
26 |
|
|
|
20 |
READ_TIMEOUT_MSG = "读取超时,无法获取对话。" # 读取超时
|
21 |
PROXY_ERROR_MSG = "代理错误,无法获取对话。" # 代理错误
|
22 |
SSL_ERROR_PROMPT = "SSL错误,无法获取对话。" # SSL 错误
|
23 |
+
NO_APIKEY_MSG = "API key为空,请检查是否输入正确。" # API key 长度不足 51 位
|
24 |
NO_INPUT_MSG = "请输入对话内容。" # 未输入对话内容
|
25 |
BILLING_NOT_APPLICABLE_MSG = "模型本地运行中" # 本地运行的模型返回的账单信息
|
26 |
|