Skip to content

Commit a174138

Browse files
committed
fix: Xinference add
--bug=1062934 --user=张展玮 【github#4242】添加xinference平台的语音识别模型失败 https://www.tapd.cn/62980211/s/1789683
1 parent 08418b9 commit a174138

File tree

2 files changed

+3
-2
lines changed
  • apps/models_provider/impl/xinference_model_provider

2 files changed

+3
-2
lines changed

apps/models_provider/impl/xinference_model_provider/credential/stt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
2727
else:
2828
return False
2929
try:
30-
model = provider.get_model(model_type, model_name, model_credential)
30+
model = provider.get_model(model_type, model_name, model_credential, **model_params)
3131
model.check_auth()
3232
except Exception as e:
3333
if isinstance(e, AppApiException):
@@ -44,4 +44,4 @@ def encryption_dict(self, model: Dict[str, object]):
4444
return {**model, 'api_key': super().encryption(model.get('api_key', ''))}
4545

4646
def get_model_params_setting_form(self, model_name):
47-
pass
47+
return

apps/models_provider/impl/xinference_model_provider/model/stt.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class XInferenceSpeechToText(MaxKBBaseModel, BaseSpeechToText):
1717
api_base: str
1818
api_key: str
1919
model: str
20+
params: dict
2021

2122
def __init__(self, **kwargs):
2223
super().__init__(**kwargs)

0 commit comments

Comments
 (0)