Tencent AI SDK
Tencent AI Development Platform SDK
Open source address: https://github.com/shiguanghu
Tencent AI interface call is relatively simple, the call process can be simplified through this library, and the return value is the structure for easy use.
Developers can call interfaces like local functions without considering signature and data request
Example
package main
import (
"encoding/json"
"log"
"GitHub. COM / shiguanghuxian / txai" // introduction of SDK
)
func main() {
//System log display file and line number
log.SetFlags(log.Lshortfile | log.LstdFlags)
//Create SDK operation object
txAi := txai.New("appid", "appkey", true)
//Call the corresponding function of Tencent AI interface
val, err := txAi.ImageFoodForPath("../../img/image_terrorism.jpg")
//Print results
log.Println(err)
js, _ := json.Marshal(val)
log.Println(string(js))
}
Remarks
Because some interfaces of Tencent AI use GBK format, this SDK has automatically converted the format, so it is unnecessary to consider the coding problem when using it.