mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 02:16:36 +02:00
tests
This commit is contained in:
parent
238715037d
commit
abe614c705
2 changed files with 118 additions and 58 deletions
|
@ -26,7 +26,10 @@ const (
|
|||
stateComment
|
||||
)
|
||||
|
||||
var errInvalidRole = errors.New("role must be one of \"system\", \"user\", or \"assistant\"")
|
||||
var (
|
||||
errMissingFrom = errors.New("no FROM line")
|
||||
errInvalidRole = errors.New("role must be one of \"system\", \"user\", or \"assistant\"")
|
||||
)
|
||||
|
||||
func Parse(r io.Reader) (cmds []Command, err error) {
|
||||
var cmd Command
|
||||
|
@ -123,7 +126,7 @@ func Parse(r io.Reader) (cmds []Command, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
return nil, errors.New("no FROM line")
|
||||
return nil, errMissingFrom
|
||||
}
|
||||
|
||||
func parseRuneForState(r rune, cs state) (state, rune, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue