Parcourir la source

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>
tags/nightly
WANGRUI-ZB il y a 10 mois
Parent
révision
8feb4c1a99
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 1 ajouts et 3 suppressions
  1. 1
    3
      agent/component/baidufanyi.py

+ 1
- 3
agent/component/baidufanyi.py Voir le fichier

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

Chargement…
Annuler
Enregistrer