mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-06-26 22:19:57 +00:00
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:
parent
dd13a5d05c
commit
8feb4c1a99
@ -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))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user