re-add system context (#4435)

This commit is contained in:
Patrick Devine 2024-05-14 11:38:20 -07:00 committed by GitHub
parent 798b107f19
commit a4b8d1f89a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"):