From 3be35acb8a91b6cba1941f3da40f9db7d516ca7c Mon Sep 17 00:00:00 2001 From: Yixuan Qiu Date: Sat, 1 Nov 2025 15:52:18 +0800 Subject: [PATCH 1/2] call zai.core.* for error classes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8e1675c..e218f3f 100644 --- a/README.md +++ b/README.md @@ -345,9 +345,9 @@ try: ) print(response.choices[0].message.content) -except zai.APIStatusError as err: +except zai.core.APIStatusError as err: print(f"API Status Error: {err}") -except zai.APITimeoutError as err: +except zai.core.APITimeoutError as err: print(f"Request Timeout: {err}") except Exception as err: print(f"Unexpected Error: {err}") From ec6c936e231a2418b378107f058f80476b8e99a5 Mon Sep 17 00:00:00 2001 From: Yixuan Qiu Date: Sat, 1 Nov 2025 15:52:57 +0800 Subject: [PATCH 2/2] also fix Chinese README --- README_CN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_CN.md b/README_CN.md index 0d7a8a6..e8970dd 100644 --- a/README_CN.md +++ b/README_CN.md @@ -351,9 +351,9 @@ try: ) print(response.choices[0].message.content) -except zai.APIStatusError as err: +except zai.core.APIStatusError as err: print(f"API状态错误: {err}") -except zai.APITimeoutError as err: +except zai.core.APITimeoutError as err: print(f"请求超时: {err}") except Exception as err: print(f"其他错误: {err}")