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() {
6262 // 把JWT放到这里
6363 jwt := " xxx"
6464
65- chat := chatgpt.NewChat (jwt)
65+ chat := chatgpt.NewChatGPT (jwt)
6666 talk , err := chat.Talk (" 你好,我的名字叫陈二!" )
6767 if err != nil {
6868 fmt.Println (err.Error ())
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ type ChatGPT struct {
9494 parentMessageID string
9595}
9696
97- func NewChat (jwt string ) * ChatGPT {
97+ func NewChatGPT (jwt string ) * ChatGPT {
9898 return & ChatGPT {
9999 jwt : jwt ,
100100 authorization : "Bearer " + jwt ,
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ func TestFoo(t *testing.T) {
1010 // 把JWT Token放到这里
1111 jwt := "xxxx"
1212
13- chat := NewChat (jwt )
13+ chat := NewChatGPT (jwt )
1414 talk , err := chat .Talk ("你好,我的名字叫陈二!" )
1515 assert .Nil (t , err )
1616 t .Log (talk .Message .Content )
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ func main() {
1010 // 把JWT放到这里
1111 jwt := "xxx"
1212
13- chat := chatgpt .NewChat (jwt )
13+ chat := chatgpt .NewChatGPT (jwt )
1414 talk , err := chat .Talk ("你好,我的名字叫陈二!" )
1515 if err != nil {
1616 fmt .Println (err .Error ())
You can’t perform that action at this time.
0 commit comments