File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
apps/models_provider/impl/aliyun_bai_lian_model_provider/credential Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ class BaiLianLLMModelParams(BaseForm):
4040
4141
4242class BaiLianLLMModelCredential (BaseForm , BaseModelCredential ):
43-
4443 api_base = forms .TextInputField (_ ('API URL' ), required = True )
4544 api_key = forms .PasswordInputField (_ ('API Key' ), required = True )
4645
@@ -71,7 +70,11 @@ def is_valid(
7170
7271 try :
7372 model = provider .get_model (model_type , model_name , model_credential , ** model_params )
74- model .invoke ([HumanMessage (content = gettext ('Hello' ))])
73+ if model_params .get ('stream' ):
74+ for res in model .stream ([HumanMessage (content = gettext ('Hello' ))]):
75+ pass
76+ else :
77+ model .invoke ([HumanMessage (content = gettext ('Hello' ))])
7578 except Exception as e :
7679 traceback .print_exc ()
7780 if isinstance (e , AppApiException ):
You can’t perform that action at this time.
0 commit comments