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
23ebbaa4
You need to sign in or sign up before continuing.
Commit
23ebbaa4
authored
Jul 12, 2024
by
Patrick Devine
Browse files
Revert "remove template from tests"
This reverts commit
9ac0a7a5
.
parent
9ac0a7a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
cmd/interactive_test.go
cmd/interactive_test.go
+3
-0
No files found.
cmd/interactive_test.go
View file @
23ebbaa4
...
@@ -59,6 +59,7 @@ func TestModelfileBuilder(t *testing.T) {
...
@@ -59,6 +59,7 @@ func TestModelfileBuilder(t *testing.T) {
opts
:=
runOptions
{
opts
:=
runOptions
{
Model
:
"hork"
,
Model
:
"hork"
,
System
:
"You are part horse and part shark, but all hork. Do horklike things"
,
System
:
"You are part horse and part shark, but all hork. Do horklike things"
,
Template
:
"This is a template."
,
Messages
:
[]
api
.
Message
{
Messages
:
[]
api
.
Message
{
{
Role
:
"user"
,
Content
:
"Hey there hork!"
},
{
Role
:
"user"
,
Content
:
"Hey there hork!"
},
{
Role
:
"assistant"
,
Content
:
"Yes it is true, I am half horse, half shark."
},
{
Role
:
"assistant"
,
Content
:
"Yes it is true, I am half horse, half shark."
},
...
@@ -74,6 +75,7 @@ func TestModelfileBuilder(t *testing.T) {
...
@@ -74,6 +75,7 @@ func TestModelfileBuilder(t *testing.T) {
mf
:=
buildModelfile
(
opts
)
mf
:=
buildModelfile
(
opts
)
expectedModelfile
:=
`FROM {{.Model}}
expectedModelfile
:=
`FROM {{.Model}}
SYSTEM """{{.System}}"""
SYSTEM """{{.System}}"""
TEMPLATE """{{.Template}}"""
PARAMETER penalize_newline false
PARAMETER penalize_newline false
PARAMETER seed 42
PARAMETER seed 42
PARAMETER stop [hi there]
PARAMETER stop [hi there]
...
@@ -95,6 +97,7 @@ MESSAGE assistant """Yes it is true, I am half horse, half shark."""
...
@@ -95,6 +97,7 @@ MESSAGE assistant """Yes it is true, I am half horse, half shark."""
mf
=
buildModelfile
(
opts
)
mf
=
buildModelfile
(
opts
)
expectedModelfile
=
`FROM {{.ParentModel}}
expectedModelfile
=
`FROM {{.ParentModel}}
SYSTEM """{{.System}}"""
SYSTEM """{{.System}}"""
TEMPLATE """{{.Template}}"""
PARAMETER penalize_newline false
PARAMETER penalize_newline false
PARAMETER seed 42
PARAMETER seed 42
PARAMETER stop [hi there]
PARAMETER stop [hi there]
...
...
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