Explorar el Código

fix: request time out (#212)

二丫讲梵 hace 2 años
padre
commit
55558e04f1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      pkg/chatgpt/chatgpt.go

+ 1 - 1
pkg/chatgpt/chatgpt.go

@@ -28,7 +28,7 @@ func New(userId string) *ChatGPT {
 	var ctx context.Context
 	var cancel func()
 
-	ctx, cancel = context.WithTimeout(context.Background(), 600)
+	ctx, cancel = context.WithTimeout(context.Background(), 600*time.Second)
 	timeOutChan := make(chan struct{}, 1)
 	go func() {
 		<-ctx.Done()