Merge pull request #5732 from ollama/mxyng/cleanup

remove ToolCall from GenerateResponse
This commit is contained in:
Michael Yang 2024-07-17 10:26:54 -07:00 committed by GitHub
commit cc9a252d8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 0 additions and 8 deletions

View file

@ -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"`

View file

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