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

Method findkey

plugin/chatgpt/model.go:162–171  ·  view source on GitHub ↗
(gid int64)

Source from the content-addressed store, hash-verified

160}
161
162func (db *model) findkey(gid int64) (content string, err error) {
163 db.Lock()
164 defer db.Unlock()
165 var m key
166 err = db.Find("key", &m, "where qquid = "+strconv.FormatInt(gid, 10))
167 if err != nil {
168 return "", errors.New("账号未绑定OpenAI-apikey,请私聊设置key后使用")
169 }
170 return m.Content, nil
171}
172
173func (db *model) insertgkey(qquid, guid int64) (err error) {
174 db.Lock()

Callers 1

getkeyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected