fix: VLLM Supplier Dialogue Verification (#2412)

This commit is contained in:
shaohuzhang1 2025-02-26 12:04:25 +08:00 committed by GitHub
parent 50dd8fae41
commit eb6f4e8cb8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,9 +48,11 @@ class VLLMModelCredential(BaseForm, BaseModelCredential):
model = provider.get_model(model_type, model_name, model_credential, **model_params)
try:
res = model.invoke([HumanMessage(content=gettext('Hello'))])
print(res)
except Exception as e:
print(e)
raise AppApiException(ValidCode.valid_error.value,
gettext(
'Verification failed, please check whether the parameters are correct: {error}').format(
error=str(e)))
return True
def encryption_dict(self, model_info: Dict[str, object]):