We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2735ba4 commit 4856397Copy full SHA for 4856397
kimoi/chat.go
@@ -1,3 +1,4 @@
1
+// Package kimoi AI 匹配 kimoi 词库
2
package kimoi
3
4
import (
@@ -13,11 +14,15 @@ const key = "暻撈莬穔僿貶稙棯悟澸滰蓱咜唕母屬石褤汴儱榅璕
13
14
15
const api = "https://ninex.azurewebsites.net/api/chat?code="
16
17
+// Response 回复结构
18
type Response struct {
- Reply string `json:"reply"`
19
+ // Reply 文本
20
+ Reply string `json:"reply"`
21
+ // Confidence 置信度, 建议不要使用 < 0.5 或 > 0.95 的结果
22
Confidence float64 `json:"confidence"`
23
}
24
25
+// Chat 用户对 AI 说一句话
26
func Chat(msg string) (r Response, err error) {
27
resp, err := http.Post(
28
api+base64.URLEncoding.EncodeToString(base14.DecodeFromString(key)),
0 commit comments