go get -u github.com/bianjieai/avata-sdk-go/v3
import (
"time"
"github.com/sirupsen/logrus"
sdk "github.com/bianjieai/avata-sdk-go/v3"
"github.com/bianjieai/avata-sdk-go/v3/configs"
)
// 非必填参数(不填写将使用默认值)
log := logrus.New()
log.SetLevel(logrus.DebugLevel)
options := []configs.Options{
configs.Logger(log), // 日志
configs.HttpTimeout(15 * time.Second), // 响应超时时间,默认: 10s
}
client = sdk.NewClient("域名,不同环境对应不同的域名,如测试环境: https://stage.apis.avata.bianjie.ai", "项目参数 API KEY", "项目参数 API SECRET", options...)