Browse Source

server: check for empty tools array too (#5779)

Jeffrey Morgan 9 months ago
parent
commit
70b1010fa5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      server/routes.go

+ 1 - 1
server/routes.go

@@ -1290,7 +1290,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
 	}
 
 	caps := []Capability{CapabilityCompletion}
-	if req.Tools != nil {
+	if len(req.Tools) > 0 {
 		caps = append(caps, CapabilityTools)
 	}