mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-10 15:57:04 +00:00
fix crash bug with /save when quotes are used (#8208)
This commit is contained in:
@@ -485,6 +485,9 @@ func buildModelfile(opts runOptions) string {
|
||||
}
|
||||
|
||||
for _, msg := range opts.Messages {
|
||||
if strings.Contains(msg.Content, "\"") {
|
||||
msg.Content = `"""` + msg.Content + `"""`
|
||||
}
|
||||
f.Commands = append(f.Commands, parser.Command{Name: "message", Args: fmt.Sprintf("%s: %s", msg.Role, msg.Content)})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user