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

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