Skip to content

Commit

Permalink
Merge pull request #4231 from ollama/mxyng/parser
Browse files Browse the repository at this point in the history
types/model: fix parser for empty values
  • Loading branch information
mxyng committed May 7, 2024
2 parents d7d33e5 + 63bc884 commit adeb40e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions types/model/file.go
Expand Up @@ -249,10 +249,6 @@ func quote(s string) string {
}

func unquote(s string) (string, bool) {
if len(s) == 0 {
return "", false
}

// TODO: single quotes
if len(s) >= 3 && s[:3] == `"""` {
if len(s) >= 6 && s[len(s)-3:] == `"""` {
Expand Down
4 changes: 4 additions & 0 deletions types/model/file_test.go
Expand Up @@ -489,6 +489,10 @@ You are a store greeter. Always responsed with "Hello!".
"""
MESSAGE user Hey there!
MESSAGE assistant Hello, I want to parse all the things!
`,
`
FROM foo
SYSTEM ""
`,
}

Expand Down

0 comments on commit adeb40e

Please sign in to comment.