Fix BaiduFanyi TestRun parameter validation and debug method missing … (#4275)

### 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 <wangrui@haima.me>
Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
WANGRUI-ZB 2024-12-30 10:34:57 +08:00 committed by GitHub
parent dd13a5d05c
commit 8feb4c1a99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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))