server: check for empty tools array too (#5779)
This commit is contained in:
parent
84e5721f3a
commit
70b1010fa5
1 changed files with 1 additions and 1 deletions
|
@ -1290,7 +1290,7 @@ func (s *Server) ChatHandler(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
caps := []Capability{CapabilityCompletion}
|
caps := []Capability{CapabilityCompletion}
|
||||||
if req.Tools != nil {
|
if len(req.Tools) > 0 {
|
||||||
caps = append(caps, CapabilityTools)
|
caps = append(caps, CapabilityTools)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue