Skip to content

Commit c9f88b3

Browse files
committed
fix: VLLM Supplier Dialogue Verification
1 parent 50dd8fa commit c9f88b3

File tree

1 file changed

+4
-2
lines changed
  • apps/setting/models_provider/impl/vllm_model_provider/credential

1 file changed

+4
-2
lines changed

apps/setting/models_provider/impl/vllm_model_provider/credential/llm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,11 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
4848
model = provider.get_model(model_type, model_name, model_credential, **model_params)
4949
try:
5050
res = model.invoke([HumanMessage(content=gettext('Hello'))])
51-
print(res)
5251
except Exception as e:
53-
print(e)
52+
raise AppApiException(ValidCode.valid_error.value,
53+
gettext(
54+
'Verification failed, please check whether the parameters are correct: {error}').format(
55+
error=str(e)))
5456
return True
5557

5658
def encryption_dict(self, model_info: Dict[str, object]):

0 commit comments

Comments
 (0)