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
87201163
Commit
87201163
authored
Jul 31, 2023
by
Michael Yang
Browse files
fix license
parent
203fdbc4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
server/images.go
server/images.go
+13
-1
No files found.
server/images.go
View file @
87201163
...
...
@@ -271,7 +271,19 @@ func CreateModel(name string, path string, fn func(resp api.ProgressResponse)) e
layers
=
append
(
layers
,
newLayer
)
}
}
case
"license"
,
"template"
,
"system"
,
"prompt"
:
case
"license"
:
fn
(
api
.
ProgressResponse
{
Status
:
fmt
.
Sprintf
(
"creating model %s layer"
,
c
.
Name
)})
// remove the prompt layer if one exists
mediaType
:=
fmt
.
Sprintf
(
"application/vnd.ollama.image.%s"
,
c
.
Name
)
layer
,
err
:=
CreateLayer
(
strings
.
NewReader
(
c
.
Args
))
if
err
!=
nil
{
return
err
}
layer
.
MediaType
=
mediaType
layers
=
append
(
layers
,
layer
)
case
"template"
,
"system"
,
"prompt"
:
fn
(
api
.
ProgressResponse
{
Status
:
fmt
.
Sprintf
(
"creating model %s layer"
,
c
.
Name
)})
// remove the prompt layer if one exists
mediaType
:=
fmt
.
Sprintf
(
"application/vnd.ollama.image.%s"
,
c
.
Name
)
...
...
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