Переглянути джерело

remove ToolCall from GenerateResponse

Michael Yang 9 місяців тому
батько
коміт
c279f96371
2 змінених файлів з 0 додано та 8 видалено
  1. 0 3
      api/types.go
  2. 0 5
      server/routes.go

+ 0 - 3
api/types.go

@@ -405,9 +405,6 @@ type GenerateResponse struct {
 	// Response is the textual response itself.
 	// Response is the textual response itself.
 	Response string `json:"response"`
 	Response string `json:"response"`
 
 
-	// ToolCalls is the list of tools the model wants to call
-	ToolCalls []ToolCall `json:"tool_calls,omitempty"`
-
 	// Done specifies if the response is complete.
 	// Done specifies if the response is complete.
 	Done bool `json:"done"`
 	Done bool `json:"done"`
 
 

+ 0 - 5
server/routes.go

@@ -275,11 +275,6 @@ func (s *Server) GenerateHandler(c *gin.Context) {
 		}
 		}
 
 
 		r.Response = sb.String()
 		r.Response = sb.String()
-		if toolCalls, ok := m.parseToolCalls(sb.String()); ok {
-			r.ToolCalls = toolCalls
-			r.Response = ""
-		}
-
 		c.JSON(http.StatusOK, r)
 		c.JSON(http.StatusOK, r)
 		return
 		return
 	}
 	}