Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-10 10:19:18 +00:00
parent 3b138131a9
commit d31537fab5
24 changed files with 1111 additions and 995 deletions

View File

@@ -0,0 +1,21 @@
package main
import (
"fmt"
"os"
"go.m3o.com/translate"
)
// TextRequest is the basic edition request
func main() {
translateService := translate.NewTranslateService(os.Getenv("M3O_API_TOKEN"))
rsp, err := translateService.Text(&translate.TextRequest{
Contents: []string{"pen", "pencil"},
Format: "text",
Model: "nmt",
Source: "en",
Target: "zh",
})
fmt.Println(rsp, err)
}