Tencent AI SDK in golang


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


package main

import (

    "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
    js, _ := json.Marshal(val)


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.