re-add system context (#4435)
This commit is contained in:
parent
798b107f19
commit
a4b8d1f89a
1 changed files with 4 additions and 0 deletions
|
@ -292,6 +292,10 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
|
||||||
continue
|
continue
|
||||||
case strings.HasPrefix(line, "/clear"):
|
case strings.HasPrefix(line, "/clear"):
|
||||||
opts.Messages = []api.Message{}
|
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")
|
fmt.Println("Cleared session context")
|
||||||
continue
|
continue
|
||||||
case strings.HasPrefix(line, "/set"):
|
case strings.HasPrefix(line, "/set"):
|
||||||
|
|
Loading…
Reference in a new issue