From f703df40fdcf25451b3c411572fbd86d4542fcaa Mon Sep 17 00:00:00 2001 From: jimmylin_solomon Date: Thu, 2 Jan 2025 11:54:37 +0800 Subject: [PATCH] add: zhipuai method translate --- README.zh-TW.md | 2 +- translation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.zh-TW.md b/README.zh-TW.md index 177e7ff..4fb663e 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -12,7 +12,7 @@ # Introduction - + > [!NOTE] > `v1`版本的翻譯器是透過 `Linux` 第三方套件實現;`v2`版本是透過生成式AI實現翻譯 diff --git a/translation.py b/translation.py index 196fa4f..d9c71f0 100644 --- a/translation.py +++ b/translation.py @@ -55,7 +55,7 @@ async def chat_completion(query: str) -> str: ) else: print('Using zhipuai.') - response = async_zhipuai(query) + response = await async_zhipuai(query) if response == '' or response is None: raise Exception return response