Closed Heming9 closed 2 months ago
感谢反馈,可以使用以下方式调用平台功能API,例如系统记忆API的创建接口:
需要 gosdk >=
v0.0.10
package main
import (
"context"
"fmt"
"github.com/baidubce/bce-qianfan-sdk/go/qianfan"
)
func main() {
qianfan.GetConfig().AccessKey = "your_access_key"
qianfan.GetConfig().SecretKey = "your_secret_key"
ca := qianfan.NewConsoleAction()
res, err := ca.Call(context.TODO(), "/v2/memory", "CreateSystemMemory", map[string]interface{}{
"appId": "26xxxxx42",
"description": "test da系统人设描述",
})
if err != nil {
panic(err)
}
fmt.Println(string(res.Body))
}
对应的examples我们也会同步更新
Feature request
如标题, 目前只有python的, 或者有什么办法能通过SDK发送带鉴权的请求也行, 减少重复工作
contribution or solutions
No response
Feature request
如标题, 目前只有python的, 或者有什么办法能通过SDK发送带鉴权的请求也行, 减少重复工作
contribution or solutions
No response