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
8299bf76
Commit
8299bf76
authored
Oct 17, 2023
by
Michael Yang
Browse files
model: native gotemplate adapter template
parent
ee4979e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
server/images.go
server/images.go
+4
-3
No files found.
server/images.go
View file @
8299bf76
...
@@ -955,11 +955,12 @@ TEMPLATE """{{ .Template }}"""
...
@@ -955,11 +955,12 @@ TEMPLATE """{{ .Template }}"""
{{- if .System }}
{{- if .System }}
SYSTEM """{{ .System }}"""
SYSTEM """{{ .System }}"""
{{- end }}
{{- end }}
{{- range $adapter := .AdapterPaths }}
ADAPTER {{ $adapter }}
{{- end }}
{{ .Params }}
{{ .Params }}
`
`
for
_
,
l
:=
range
mt
.
Model
.
AdapterPaths
{
modelFile
+=
fmt
.
Sprintf
(
"ADAPTER %s
\n
"
,
l
)
}
tmpl
,
err
:=
template
.
New
(
""
)
.
Parse
(
modelFile
)
tmpl
,
err
:=
template
.
New
(
""
)
.
Parse
(
modelFile
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
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