Skip to content

Commit 12d54af

Browse files
committed
chore: 去掉代码中的警告
1 parent 7985a3f commit 12d54af

File tree

3 files changed

+9
-6
lines changed
  • apps/setting/models_provider/impl

3 files changed

+9
-6
lines changed

apps/setting/models_provider/impl/openai_model_provider/model/image.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ class OpenAIImage(MaxKBBaseModel, ChatOpenAI):
1717
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
1818
optional_params = MaxKBBaseModel.filter_optional_params(model_kwargs)
1919
return OpenAIImage(
20-
model=model_name,
20+
model_name=model_name,
2121
openai_api_base=model_credential.get('api_base'),
2222
openai_api_key=model_credential.get('api_key'),
23-
stream_options={"include_usage": True},
23+
# stream_options={"include_usage": True},
24+
streaming=True,
2425
**optional_params,
2526
)

apps/setting/models_provider/impl/qwen_model_provider/model/image.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ class QwenVLChatModel(MaxKBBaseModel, ChatOpenAI):
1313
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
1414
optional_params = MaxKBBaseModel.filter_optional_params(model_kwargs)
1515
chat_tong_yi = QwenVLChatModel(
16-
model=model_name,
16+
model_name=model_name,
1717
openai_api_key=model_credential.get('api_key'),
1818
openai_api_base='https://dashscope.aliyuncs.com/compatible-mode/v1',
19-
stream_options={"include_usage": True},
19+
# stream_options={"include_usage": True},
20+
streaming=True,
2021
model_kwargs=optional_params,
2122
)
2223
return chat_tong_yi

apps/setting/models_provider/impl/tencent_model_provider/model/image.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ class TencentVision(MaxKBBaseModel, ChatOpenAI):
1717
def new_instance(model_type, model_name, model_credential: Dict[str, object], **model_kwargs):
1818
optional_params = MaxKBBaseModel.filter_optional_params(model_kwargs)
1919
return TencentVision(
20-
model=model_name,
20+
model_name=model_name,
2121
openai_api_base='https://api.hunyuan.cloud.tencent.com/v1',
2222
openai_api_key=model_credential.get('api_key'),
23-
stream_options={"include_usage": True},
23+
# stream_options={"include_usage": True},
24+
streaming=True,
2425
**optional_params,
2526
)

0 commit comments

Comments
 (0)