Skip to content

Commit 4856397

Browse files
committed
chore: make lint happy
1 parent 2735ba4 commit 4856397

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

kimoi/chat.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package kimoi AI 匹配 kimoi 词库
12
package kimoi
23

34
import (
@@ -13,11 +14,15 @@ const key = "暻撈莬穔僿貶稙棯悟澸滰蓱咜唕母屬石褤汴儱榅璕
1314

1415
const api = "https://ninex.azurewebsites.net/api/chat?code="
1516

17+
// Response 回复结构
1618
type Response struct {
17-
Reply string `json:"reply"`
19+
// Reply 文本
20+
Reply string `json:"reply"`
21+
// Confidence 置信度, 建议不要使用 < 0.5 或 > 0.95 的结果
1822
Confidence float64 `json:"confidence"`
1923
}
2024

25+
// Chat 用户对 AI 说一句话
2126
func Chat(msg string) (r Response, err error) {
2227
resp, err := http.Post(
2328
api+base64.URLEncoding.EncodeToString(base14.DecodeFromString(key)),

0 commit comments

Comments
 (0)