diff --git a/cmd/cmd.go b/cmd/cmd.go index b569ddddcb..c661df4e76 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -1080,10 +1080,11 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) { var state *displayResponseState = &displayResponseState{} var latest api.ChatResponse var fullResponse strings.Builder - var role string var thinkTagOpened bool = false var thinkTagClosed bool = false + role := "assistant" + fn := func(response api.ChatResponse) error { if response.Message.Content != "" || !opts.HideThinking { p.StopAndClear()