Skip to content

Commit d73f8aa

Browse files
authored
cmd: add default assistant role to message construction (ollama#11431)
1 parent 92c2e8a commit d73f8aa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/cmd.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,10 +1080,11 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) {
10801080
var state *displayResponseState = &displayResponseState{}
10811081
var latest api.ChatResponse
10821082
var fullResponse strings.Builder
1083-
var role string
10841083
var thinkTagOpened bool = false
10851084
var thinkTagClosed bool = false
10861085

1086+
role := "assistant"
1087+
10871088
fn := func(response api.ChatResponse) error {
10881089
if response.Message.Content != "" || !opts.HideThinking {
10891090
p.StopAndClear()

0 commit comments

Comments
 (0)