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
orangecat
ollama
Commits
63bc884e
Commit
63bc884e
authored
May 07, 2024
by
Michael Yang
Browse files
types/model: fix parser for empty values
parent
3f71ba40
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 @
63bc884e
...
@@ -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 @
63bc884e
...
@@ -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