From 8feb4c1a999eb71aa538ec8a4e3f782ae43f7a9e Mon Sep 17 00:00:00 2001 From: WANGRUI-ZB <50860994+WANGRUI-ZB@users.noreply.github.com> Date: Mon, 30 Dec 2024 10:34:57 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20BaiduFanyi=20TestRun=20parameter=20valida?= =?UTF-8?q?tion=20and=20debug=20method=20missing=20=E2=80=A6=20(#4275)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What problem does this PR solve? Fix BaiduFanyi TestRun parameter validation and debug method missing errors ![Uploading Snipaste_2024-12-27_19-56-31.png…]() ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --------- Co-authored-by: wangrui Co-authored-by: Kevin Hu --- agent/component/baidufanyi.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/agent/component/baidufanyi.py b/agent/component/baidufanyi.py index c1c526bd8..f6eada605 100644 --- a/agent/component/baidufanyi.py +++ b/agent/component/baidufanyi.py @@ -39,9 +39,6 @@ class BaiduFanyiParam(ComponentParamBase): self.check_empty(self.appid, "BaiduFanyi APPID") self.check_empty(self.secret_key, "BaiduFanyi Secret Key") self.check_valid_value(self.trans_type, "Translate type", ['translate', 'fieldtranslate']) - self.check_valid_value(self.trans_type, "Translate domain", - ['it', 'finance', 'machinery', 'senimed', 'novel', 'academic', 'aerospace', 'wiki', - 'news', 'law', 'contract']) self.check_valid_value(self.source_lang, "Source language", ['auto', 'zh', 'en', 'yue', 'wyw', 'jp', 'kor', 'fra', 'spa', 'th', 'ara', 'ru', 'pt', 'de', 'it', 'el', 'nl', 'pl', 'bul', 'est', 'dan', 'fin', 'cs', 'rom', 'slo', 'swe', @@ -96,3 +93,4 @@ class BaiduFanyi(ComponentBase, ABC): except Exception as e: BaiduFanyi.be_output("**Error**:" + str(e)) +