From c279f96371575484d212ab069db96ee38dddceb1 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Tue, 16 Jul 2024 14:51:19 -0700 Subject: [PATCH] remove ToolCall from GenerateResponse --- api/types.go | 3 --- server/routes.go | 5 ----- 2 files changed, 8 deletions(-) diff --git a/api/types.go b/api/types.go index c3f0bae0..e687b8a4 100644 --- a/api/types.go +++ b/api/types.go @@ -405,9 +405,6 @@ type GenerateResponse struct { // Response is the textual response itself. 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 bool `json:"done"` diff --git a/server/routes.go b/server/routes.go index c7f74fa4..b4a8b4ac 100644 --- a/server/routes.go +++ b/server/routes.go @@ -275,11 +275,6 @@ func (s *Server) GenerateHandler(c *gin.Context) { } r.Response = sb.String() - if toolCalls, ok := m.parseToolCalls(sb.String()); ok { - r.ToolCalls = toolCalls - r.Response = "" - } - c.JSON(http.StatusOK, r) return }