add .First
This commit is contained in:
parent
7c6ea2a966
commit
60b4db6389
1 changed files with 3 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue