Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
adeb40ea
Unverified
Commit
adeb40ea
authored
May 07, 2024
by
Michael Yang
Committed by
GitHub
May 07, 2024
Browse files
Merge pull request #4231 from ollama/mxyng/parser
types/model: fix parser for empty values
parents
d7d33e52
63bc884e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
types/model/file.go
types/model/file.go
+0
-4
types/model/file_test.go
types/model/file_test.go
+4
-0
No files found.
types/model/file.go
View file @
adeb40ea
...
@@ -249,10 +249,6 @@ func quote(s string) string {
...
@@ -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
:
]
==
`"""`
{
...
...
types/model/file_test.go
View file @
adeb40ea
...
@@ -489,6 +489,10 @@ You are a store greeter. Always responsed with "Hello!".
...
@@ -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 ""
`
,
`
,
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment