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
a4b8d1f8
Unverified
Commit
a4b8d1f8
authored
May 14, 2024
by
Patrick Devine
Committed by
GitHub
May 14, 2024
Browse files
re-add system context (#4435)
parent
798b107f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
cmd/interactive.go
cmd/interactive.go
+4
-0
No files found.
cmd/interactive.go
View file @
a4b8d1f8
...
...
@@ -292,6 +292,10 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
continue
case
strings
.
HasPrefix
(
line
,
"/clear"
)
:
opts
.
Messages
=
[]
api
.
Message
{}
if
opts
.
System
!=
""
{
newMessage
:=
api
.
Message
{
Role
:
"system"
,
Content
:
opts
.
System
}
opts
.
Messages
=
append
(
opts
.
Messages
,
newMessage
)
}
fmt
.
Println
(
"Cleared session context"
)
continue
case
strings
.
HasPrefix
(
line
,
"/set"
)
:
...
...
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