From 1bc416dc15ee28ede6e2d692be1e0c47bcd8ac30 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Wed, 31 Jul 2024 12:19:13 -0400 Subject: [PATCH] fix: stop timing out SDK runs after 15 minutes Signed-off-by: Donnie Adams --- pkg/sdkserver/routes.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkg/sdkserver/routes.go b/pkg/sdkserver/routes.go index 4bed2b37..2e709e3f 100644 --- a/pkg/sdkserver/routes.go +++ b/pkg/sdkserver/routes.go @@ -1,7 +1,6 @@ package sdkserver import ( - "context" "encoding/json" "fmt" "io" @@ -10,7 +9,6 @@ import ( "sort" "strings" "sync" - "time" "github.com/gptscript-ai/broadcaster" "github.com/gptscript-ai/gptscript/pkg/cache" @@ -26,8 +24,6 @@ import ( "github.com/gptscript-ai/gptscript/pkg/version" ) -const toolRunTimeout = 15 * time.Minute - type server struct { gptscriptOpts gptscript.Options address, token string @@ -158,8 +154,6 @@ func (s *server) execHandler(w http.ResponseWriter, r *http.Request) { ctx := gserver.ContextWithNewRunID(r.Context()) runID := gserver.RunIDFromContext(ctx) - ctx, cancel := context.WithTimeout(ctx, toolRunTimeout) - defer cancel() // Ensure chat state is not empty. if reqObject.ChatState == "" {