Skip to content

Commit cdd5ce3

Browse files
author
liuhuiqi.7
committed
feat(vlm_for_e2e): error msg
Change-Id: I5fd203617ab4dd204364012a4b14f2c9a3dc6950
1 parent 1ba9087 commit cdd5ce3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

volcenginesdkarkruntime/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def _load_cert_by_ak_sk(self, ep: str) -> str:
325325
resp: volcenginesdkark.GetEndpointCertificateResponse = self.api_instance.get_endpoint_certificate(
326326
get_endpoint_certificate_request)
327327
except ApiException as e:
328-
raise ArkAPIError("Getting end-to-end encryption certificate failed: %s\n" % e)
328+
raise ArkAPIError("Getting model vendor encryption certificate failed: %s\n" % e)
329329

330330
return resp.pca_instance_certificate
331331

volcenginesdkarkruntime/resources/chat/completions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ def _process_messages(self, messages: Iterable[ChatCompletionMessageParam],
5959
if part["image_url"]["url"].startswith('data:'):
6060
part["image_url"]["url"] = f(part["image_url"]["url"])
6161
else:
62-
log.warning("end-to-end encryption is not supported for image url")
62+
log.warning("end-to-end encryption is not supported for image url, "
63+
"please use base64 image if you want encryption")
6364
else:
6465
raise TypeError("end-to-end encryption is not supported for content type {}".
6566
format(type(part)))
@@ -196,7 +197,8 @@ def _process_messages(self, messages: Iterable[ChatCompletionMessageParam],
196197
if part["image_url"]["url"].startswith('data:'):
197198
part["image_url"]["url"] = f(part["image_url"]["url"])
198199
else:
199-
log.warning("end-to-end encryption is not supported for image url")
200+
log.warning("end-to-end encryption is not supported for image url, "
201+
"please use base64 image if you want encryption")
200202
else:
201203
raise TypeError("end-to-end encryption is not supported for content type {}".
202204
format(type(part)))

0 commit comments

Comments
 (0)