Closed helloxz closed 1 year ago
This is my code:
package controller
import (
"fmt"
"github.com/gin-gonic/gin"
"github.com/yxw21/chatgpt"
)
func NewChat(c *gin.Context) {
chat := chatgpt.NewChat(chatgpt.NewSessionWithCredential("xxx", "xxx", "xxx").AutoRefresh())
res, err := chat.Send("hi")
if err != nil {
fmt.Println(err)
return
}
fmt.Println(res.Message.Content.Parts)
}
The readme was wrong, updated.
Based on the example you provided, the following error occurred: