cli: don't exit for invalid model during /load. (#9576)

Co-authored-by: Richard Lyons <frob@cloudstaff.com>
This commit is contained in:
frob 2025-03-12 07:42:53 +01:00 committed by GitHub
parent ad4e0bf3be
commit b3af953a55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -195,6 +195,10 @@ func generateInteractive(cmd *cobra.Command, opts runOptions) error {
opts.Messages = []api.Message{}
fmt.Printf("Loading model '%s'\n", opts.Model)
if err := loadOrUnloadModel(cmd, &opts); err != nil {
if strings.Contains(err.Error(), "not found") {
fmt.Printf("error: %v\n", err)
continue
}
return err
}
continue