Merge pull request #4231 from ollama/mxyng/parser
types/model: fix parser for empty values
This commit is contained in:
commit
adeb40eaf2
2 changed files with 4 additions and 4 deletions
|
@ -249,10 +249,6 @@ func quote(s string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func unquote(s string) (string, bool) {
|
func unquote(s string) (string, bool) {
|
||||||
if len(s) == 0 {
|
|
||||||
return "", false
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: single quotes
|
// TODO: single quotes
|
||||||
if len(s) >= 3 && s[:3] == `"""` {
|
if len(s) >= 3 && s[:3] == `"""` {
|
||||||
if len(s) >= 6 && s[len(s)-3:] == `"""` {
|
if len(s) >= 6 && s[len(s)-3:] == `"""` {
|
||||||
|
|
|
@ -489,6 +489,10 @@ You are a store greeter. Always responsed with "Hello!".
|
||||||
"""
|
"""
|
||||||
MESSAGE user Hey there!
|
MESSAGE user Hey there!
|
||||||
MESSAGE assistant Hello, I want to parse all the things!
|
MESSAGE assistant Hello, I want to parse all the things!
|
||||||
|
`,
|
||||||
|
`
|
||||||
|
FROM foo
|
||||||
|
SYSTEM ""
|
||||||
`,
|
`,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue