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
60b4db63
Commit
60b4db63
authored
Jul 19, 2023
by
Michael Yang
Browse files
add .First
parent
7c6ea2a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
server/images.go
server/images.go
+3
-0
No files found.
server/images.go
View file @
60b4db63
...
...
@@ -37,6 +37,7 @@ func (m *Model) Prompt(request api.GenerateRequest) (string, error) {
}
var
vars
struct
{
First
bool
System
string
Prompt
string
...
...
@@ -44,8 +45,10 @@ func (m *Model) Prompt(request api.GenerateRequest) (string, error) {
Context
[]
int
}
vars
.
First
=
len
(
vars
.
Context
)
==
0
vars
.
System
=
m
.
System
vars
.
Prompt
=
request
.
Prompt
vars
.
Context
=
request
.
Context
var
sb
strings
.
Builder
if
err
:=
tmpl
.
Execute
(
&
sb
,
vars
);
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