MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / insertgkey

Method insertgkey

plugin/chatgpt/model.go:173–186  ·  view source on GitHub ↗
(qquid, guid int64)

Source from the content-addressed store, hash-verified

171}
172
173func (db *model) insertgkey(qquid, guid int64) (err error) {
174 db.Lock()
175 defer db.Unlock()
176 var n key
177 err = db.Find("key", &n, "where qquid = "+strconv.FormatInt(qquid, 10))
178 if err != nil || n.Content == "" {
179 return errors.New("授权账号未绑定OpenAI-apikey,请私聊设置key以后使用")
180 }
181 m := gtoqq{
182 GroupID: guid,
183 QQuid: qquid,
184 }
185 return db.Insert("gtoqq", &m)
186}
187
188func (db *model) delgkey(gid int64) (err error) {
189 db.Lock()

Callers 1

initFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected