Skip to content

Commit 6f6e823

Browse files
committed
fix: model params
1 parent cabd6fb commit 6f6e823

File tree

6 files changed

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

6 files changed

+6
-6
lines changed

apps/setting/models_provider/impl/aliyun_bai_lian_model_provider/credential/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
5252
return False
5353
try:
5454
model = provider.get_model(model_type, model_name, model_credential, **model_params)
55-
res = model.stream([HumanMessage(content=[{"type": "text", "text": _('Hello')}])])
55+
res = model.stream([HumanMessage(content=[{"type": "text", "text": gettext('Hello')}])])
5656
for chunk in res:
5757
print(chunk)
5858
except Exception as e:

apps/setting/models_provider/impl/aliyun_bai_lian_model_provider/model/tti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def is_cache_model(self):
4040

4141
def check_auth(self):
4242
chat = ChatTongyi(api_key=self.api_key, model_name='qwen-max')
43-
chat.invoke([HumanMessage([{"type": "text", "text": _('Hello')}])])
43+
chat.invoke([HumanMessage([{"type": "text", "text": gettext('Hello')}])])
4444

4545
def generate_image(self, prompt: str, negative_prompt: str = None):
4646
# api_base='https://dashscope.aliyuncs.com/compatible-mode/v1',

apps/setting/models_provider/impl/azure_model_provider/credential/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
5151
return False
5252
try:
5353
model = provider.get_model(model_type, model_name, model_credential, **model_params)
54-
res = model.stream([HumanMessage(content=[{"type": "text", "text": _('Hello')}])])
54+
res = model.stream([HumanMessage(content=[{"type": "text", "text": gettext('Hello')}])])
5555
for chunk in res:
5656
print(chunk)
5757
except Exception as e:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def is_valid(self, model_type: str, model_name, model_credential: Dict[str, obje
5050
return False
5151
try:
5252
model = provider.get_model(model_type, model_name, model_credential, **model_params)
53-
res = model.stream([HumanMessage(content=[{"type": "text", "text": _('Hello')}])])
53+
res = model.stream([HumanMessage(content=[{"type": "text", "text": gettext('Hello')}])])
5454
for chunk in res:
5555
print(chunk)
5656
except Exception as e:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def is_cache_model(self):
4040

4141
def check_auth(self):
4242
chat = ChatTongyi(api_key=self.api_key, model_name='qwen-max')
43-
chat.invoke([HumanMessage([{"type": "text", "text": _('Hello')}])])
43+
chat.invoke([HumanMessage([{"type": "text", "text": gettext('Hello')}])])
4444

4545
def generate_image(self, prompt: str, negative_prompt: str = None):
4646
# api_base='https://dashscope.aliyuncs.com/compatible-mode/v1',

apps/setting/models_provider/impl/zhipu_model_provider/model/tti.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def check_auth(self):
4646
zhipuai_api_key=self.api_key,
4747
model_name=self.model,
4848
)
49-
chat.invoke([HumanMessage([{"type": "text", "text": _('Hello')}])])
49+
chat.invoke([HumanMessage([{"type": "text", "text": gettext('Hello')}])])
5050

5151
# self.generate_image('生成一个小猫图片')
5252

0 commit comments

Comments
 (0)