fix: Xinference add
--bug=1062934 --user=张展玮 【github#4242】添加xinference平台的语音识别模型失败 https://www.tapd.cn/62980211/s/1789683v3.2
parent
08418b98f1
commit
8fda8196f2
|
|
@ -27,7 +27,7 @@ class XInferenceSTTModelCredential(BaseForm, BaseModelCredential):
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
try:
|
try:
|
||||||
model = provider.get_model(model_type, model_name, model_credential)
|
model = provider.get_model(model_type, model_name, model_credential, **model_params)
|
||||||
model.check_auth()
|
model.check_auth()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if isinstance(e, AppApiException):
|
if isinstance(e, AppApiException):
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ class XInferenceSpeechToText(MaxKBBaseModel, BaseSpeechToText):
|
||||||
api_base: str
|
api_base: str
|
||||||
api_key: str
|
api_key: str
|
||||||
model: str
|
model: str
|
||||||
|
params: dict
|
||||||
|
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
super().__init__(**kwargs)
|
super().__init__(**kwargs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue