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

This commit is contained in:
Jeffrey Morgan 2024-07-18 11:44:57 -07:00 committed by GitHub
parent 84e5721f3a
commit 70b1010fa5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)
}