mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: bailian
This commit is contained in:
parent
e22fc95ee9
commit
2faabbe392
|
|
@ -5,6 +5,7 @@ from typing import Dict
|
|||
from setting.models_provider.base_model_provider import MaxKBBaseModel
|
||||
from setting.models_provider.impl.base_chat_open_ai import BaseChatOpenAI
|
||||
|
||||
|
||||
class BaiLianChatModel(MaxKBBaseModel, BaseChatOpenAI):
|
||||
@staticmethod
|
||||
def is_cache_model():
|
||||
|
|
@ -13,7 +14,7 @@ class BaiLianChatModel(MaxKBBaseModel, BaseChatOpenAI):
|
|||
@staticmethod
|
||||
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
|
||||
optional_params = MaxKBBaseModel.filter_optional_params(model_kwargs)
|
||||
if model_name == 'qwen-omni-turbo':
|
||||
if 'qwen-omni-turbo' in model_name:
|
||||
optional_params['streaming'] = True
|
||||
return BaiLianChatModel(
|
||||
model=model_name,
|
||||
|
|
|
|||
Loading…
Reference in New Issue