We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://www.volcengine.com/docs/4640/65067
The text was updated successfully, but these errors were encountered:
刚跑通了, node 的例子,供参考,里面的魔法字符串挺多,如果可以,建议研发把这些常量改为枚举,比如 servicename region version 等
import { Service } from "@volcengine/openapi"; const accessKeyId = env.VOLC_ACCESSKEY; const secretKey = env.VOLC_SECRETKEY; const postBody = { SourceLanguage: "en", TargetLanguage: "zh", TextList: ["hello world"], }; const service = new Service({ host: "open.volcengineapi.com", serviceName: "translate", region: "cn-north-1", accessKeyId, secretKey, }); const fetchApi = service.createAPI("TranslateText", { Version: "2020-06-01", method: "POST", contentType: "json", }); const rr = await fetchApi(postBody, {}); // [ { Translation: '你好世界', DetectedSourceLanguage: '', Extra: null } ] console.log(rr.TranslationList);
Sorry, something went wrong.
@Otto-J 非常感谢!
No branches or pull requests
https://www.volcengine.com/docs/4640/65067
The text was updated successfully, but these errors were encountered: