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.base_model_provider import MaxKBBaseModel
|
||||||
from setting.models_provider.impl.base_chat_open_ai import BaseChatOpenAI
|
from setting.models_provider.impl.base_chat_open_ai import BaseChatOpenAI
|
||||||
|
|
||||||
|
|
||||||
class BaiLianChatModel(MaxKBBaseModel, BaseChatOpenAI):
|
class BaiLianChatModel(MaxKBBaseModel, BaseChatOpenAI):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def is_cache_model():
|
def is_cache_model():
|
||||||
@ -13,7 +14,7 @@ class BaiLianChatModel(MaxKBBaseModel, BaseChatOpenAI):
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
|
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
|
||||||
optional_params = MaxKBBaseModel.filter_optional_params(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
|
optional_params['streaming'] = True
|
||||||
return BaiLianChatModel(
|
return BaiLianChatModel(
|
||||||
model=model_name,
|
model=model_name,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user