File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ func main() {
62
62
// 把JWT放到这里
63
63
jwt := " xxx"
64
64
65
- chat := chatgpt.NewChat (jwt)
65
+ chat := chatgpt.NewChatGPT (jwt)
66
66
talk , err := chat.Talk (" 你好,我的名字叫陈二!" )
67
67
if err != nil {
68
68
fmt.Println (err.Error ())
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ type ChatGPT struct {
94
94
parentMessageID string
95
95
}
96
96
97
- func NewChat (jwt string ) * ChatGPT {
97
+ func NewChatGPT (jwt string ) * ChatGPT {
98
98
return & ChatGPT {
99
99
jwt : jwt ,
100
100
authorization : "Bearer " + jwt ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ func TestFoo(t *testing.T) {
10
10
// 把JWT Token放到这里
11
11
jwt := "xxxx"
12
12
13
- chat := NewChat (jwt )
13
+ chat := NewChatGPT (jwt )
14
14
talk , err := chat .Talk ("你好,我的名字叫陈二!" )
15
15
assert .Nil (t , err )
16
16
t .Log (talk .Message .Content )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ func main() {
10
10
// 把JWT放到这里
11
11
jwt := "xxx"
12
12
13
- chat := chatgpt .NewChat (jwt )
13
+ chat := chatgpt .NewChatGPT (jwt )
14
14
talk , err := chat .Talk ("你好,我的名字叫陈二!" )
15
15
if err != nil {
16
16
fmt .Println (err .Error ())
You can’t perform that action at this time.
0 commit comments