Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
d73f8aa8
Unverified
Commit
d73f8aa8
authored
Jul 16, 2025
by
Parth Sareen
Committed by
GitHub
Jul 16, 2025
Browse files
cmd: add default assistant role to message construction (#11431)
parent
92c2e8a5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
cmd/cmd.go
cmd/cmd.go
+2
-1
No files found.
cmd/cmd.go
View file @
d73f8aa8
...
@@ -1080,10 +1080,11 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) {
...
@@ -1080,10 +1080,11 @@ func chat(cmd *cobra.Command, opts runOptions) (*api.Message, error) {
var
state
*
displayResponseState
=
&
displayResponseState
{}
var
state
*
displayResponseState
=
&
displayResponseState
{}
var
latest
api
.
ChatResponse
var
latest
api
.
ChatResponse
var
fullResponse
strings
.
Builder
var
fullResponse
strings
.
Builder
var
role
string
var
thinkTagOpened
bool
=
false
var
thinkTagOpened
bool
=
false
var
thinkTagClosed
bool
=
false
var
thinkTagClosed
bool
=
false
role
:=
"assistant"
fn
:=
func
(
response
api
.
ChatResponse
)
error
{
fn
:=
func
(
response
api
.
ChatResponse
)
error
{
if
response
.
Message
.
Content
!=
""
||
!
opts
.
HideThinking
{
if
response
.
Message
.
Content
!=
""
||
!
opts
.
HideThinking
{
p
.
StopAndClear
()
p
.
StopAndClear
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment