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
5b82960d
Unverified
Commit
5b82960d
authored
Jul 17, 2024
by
Michael Yang
Committed by
GitHub
Jul 17, 2024
Browse files
stub response (#5750)
parent
cc9a252d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
template/template.go
template/template.go
+4
-2
No files found.
template/template.go
View file @
5b82960d
...
...
@@ -217,6 +217,7 @@ func (t *Template) Execute(w io.Writer, v Values) error {
"System"
:
system
,
"Messages"
:
messages
,
"Tools"
:
v
.
Tools
,
"Response"
:
""
,
})
}
...
...
@@ -270,8 +271,9 @@ func (t *Template) Execute(w io.Writer, v Values) error {
tree
:=
parse
.
Tree
{
Root
:
nodes
.
(
*
parse
.
ListNode
)}
if
err
:=
template
.
Must
(
template
.
New
(
""
)
.
AddParseTree
(
""
,
&
tree
))
.
Execute
(
&
b
,
map
[
string
]
any
{
"System"
:
system
,
"Prompt"
:
prompt
,
"System"
:
system
,
"Prompt"
:
prompt
,
"Response"
:
""
,
});
err
!=
nil
{
return
err
}
...
...
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