Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加腾讯机器翻译接口 #127

Merged
merged 4 commits into from
Nov 26, 2024
Merged

添加腾讯机器翻译接口 #127

merged 4 commits into from
Nov 26, 2024

Conversation

hellofinch
Copy link
Contributor

添加腾讯机器翻译接口,读取环境变量中的Tencent_SECRET_ID和Tencent_SECRET_KEY。
添加对应中英文文档说明,修改converter.py添加对应方法入口。
修复了deeplx地址拼接错误以及对于free endpoint的地址判断。
暂未解决的问题:
机器翻译接口对于请求的频率有限制,没对高频请求的情况进行解决。

@reycn
Copy link
Collaborator

reycn commented Nov 26, 2024

  • DeepLX 这里的判断逻辑应该没有生效,见 176 行
  • 格式化一下代码,不然 CI 通不过

感谢~

@Byaidu
Copy link
Owner

Byaidu commented Nov 26, 2024

顺便可以把环境变量改成全大写,入口tmt改成tencent,保持统一性

@hellofinch
Copy link
Contributor Author

格式化代码的话,有工具或者格式吗?

@Byaidu
Copy link
Owner

Byaidu commented Nov 26, 2024

用的black,不过刚给format check下了,所以也可以提交之后我们来格式化
现在把其他问题解决一下就可以了

@hellofinch
Copy link
Contributor Author

hellofinch commented Nov 26, 2024

顺便可以把环境变量改成全大写

这里没太明白 ,具体指的是什么位置?
:)

@Byaidu
Copy link
Owner

Byaidu commented Nov 26, 2024

Tencent_SECRET_ID

@hellofinch
Copy link
Contributor Author

OK 修改了。

@hellofinch
Copy link
Contributor Author

怪呀,black格式化代码的时候,为啥pdf2zh/converter.py过不去呢?

@Byaidu
Copy link
Owner

Byaidu commented Nov 26, 2024

感谢支持,格式化我来解决就可以了

@Byaidu Byaidu merged commit 98cd503 into Byaidu:main Nov 26, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants