server: collect nested tool call objects when parsing (#5824)

This commit is contained in:
Jeffrey Morgan
2024-07-22 12:38:03 -04:00
committed by GitHub
parent 80ee9b5e47
commit b3e5491e41
5 changed files with 120 additions and 13 deletions

View File

@@ -611,10 +611,10 @@ func (s *Server) CreateModelHandler(c *gin.Context) {
quantization := cmp.Or(r.Quantize, r.Quantization)
if err := CreateModel(ctx, name, filepath.Dir(r.Path), strings.ToUpper(quantization), f, fn); err != nil {
if errors.Is(err, errBadTemplate) {
ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest}
ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest}
}
ch <- gin.H{"error": err.Error()}
}
}
}()
if r.Stream != nil && !*r.Stream {