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
24580df9
"vscode:/vscode.git/clone" did not exist on "49c8179548b641e8edc61bb949925e49a08ffb7f"
Unverified
Commit
24580df9
authored
Sep 18, 2023
by
Patrick Devine
Committed by
GitHub
Sep 18, 2023
Browse files
only add a layer if there is actual data (#535)
parent
80dd44e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
server/images.go
server/images.go
+9
-5
No files found.
server/images.go
View file @
24580df9
...
...
@@ -391,7 +391,7 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
return
err
}
// cop
ie
the model metadata
// cop
y
the model metadata
config
.
ModelFamily
=
source
.
ModelFamily
config
.
ModelType
=
source
.
ModelType
config
.
ModelFormat
=
source
.
ModelFormat
...
...
@@ -461,8 +461,10 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
return
err
}
layer
.
MediaType
=
mediaType
layers
=
append
(
layers
,
layer
)
if
layer
.
Size
>
0
{
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 layer if one exists
...
...
@@ -474,8 +476,10 @@ func CreateModel(ctx context.Context, name string, path string, fn func(resp api
return
err
}
layer
.
MediaType
=
mediaType
layers
=
append
(
layers
,
layer
)
if
layer
.
Size
>
0
{
layer
.
MediaType
=
mediaType
layers
=
append
(
layers
,
layer
)
}
default
:
// runtime parameters, build a list of args for each parameter to allow multiple values to be specified (ex: multiple stop sequences)
params
[
c
.
Name
]
=
append
(
params
[
c
.
Name
],
c
.
Args
)
...
...
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