Spaces:
Runtime error
Runtime error
更新提醒
Browse files- request_llm/bridge_chatgpt.py +1 -1
- toolbox.py +1 -1
request_llm/bridge_chatgpt.py
CHANGED
@@ -141,7 +141,7 @@ def predict(inputs, llm_kwargs, plugin_kwargs, chatbot, history=[], system_promp
|
|
141 |
try:
|
142 |
headers, payload = generate_payload(inputs, llm_kwargs, history, system_prompt, stream)
|
143 |
except RuntimeError as e:
|
144 |
-
chatbot[-1] = (inputs, f"您提供的api-key不满足要求,不包含任何可用于{llm_kwargs['llm_model']}的api-key
|
145 |
yield from update_ui(chatbot=chatbot, history=history, msg="api-key不满足要求") # 刷新界面
|
146 |
return
|
147 |
|
|
|
141 |
try:
|
142 |
headers, payload = generate_payload(inputs, llm_kwargs, history, system_prompt, stream)
|
143 |
except RuntimeError as e:
|
144 |
+
chatbot[-1] = (inputs, f"您提供的api-key不满足要求,不包含任何可用于{llm_kwargs['llm_model']}的api-key。您可能选择了错误的模型或请求源。")
|
145 |
yield from update_ui(chatbot=chatbot, history=history, msg="api-key不满足要求") # 刷新界面
|
146 |
return
|
147 |
|
toolbox.py
CHANGED
@@ -447,7 +447,7 @@ def select_api_key(keys, llm_model):
|
|
447 |
if is_api2d_key(k): avail_key_list.append(k)
|
448 |
|
449 |
if len(avail_key_list) == 0:
|
450 |
-
raise RuntimeError(f"您提供的api-key不满足要求,不包含任何可用于{llm_model}的api-key
|
451 |
|
452 |
api_key = random.choice(avail_key_list) # 随机负载均衡
|
453 |
return api_key
|
|
|
447 |
if is_api2d_key(k): avail_key_list.append(k)
|
448 |
|
449 |
if len(avail_key_list) == 0:
|
450 |
+
raise RuntimeError(f"您提供的api-key不满足要求,不包含任何可用于{llm_model}的api-key。您可能选择了错误的模型或请求源。")
|
451 |
|
452 |
api_key = random.choice(avail_key_list) # 随机负载均衡
|
453 |
return api_key
|