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
65a5040e
Commit
65a5040e
authored
Jul 02, 2024
by
Michael Yang
Browse files
fix generate template
parent
d626b99b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
5 deletions
+1
-5
server/routes.go
server/routes.go
+1
-5
No files found.
server/routes.go
View file @
65a5040e
...
@@ -176,11 +176,7 @@ func (s *Server) GenerateHandler(c *gin.Context) {
...
@@ -176,11 +176,7 @@ func (s *Server) GenerateHandler(c *gin.Context) {
prompt
=
req
.
Prompt
prompt
=
req
.
Prompt
case
req
.
Prompt
!=
""
:
case
req
.
Prompt
!=
""
:
if
req
.
Template
==
""
{
if
req
.
Template
==
""
{
model
.
Template
,
err
=
template
.
Parse
(
req
.
Template
)
tmpl
=
model
.
Template
if
err
!=
nil
{
c
.
JSON
(
http
.
StatusInternalServerError
,
gin
.
H
{
"error"
:
err
.
Error
()})
return
}
}
}
if
req
.
System
==
""
{
if
req
.
System
==
""
{
...
...
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