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
7e9405fd
Unverified
Commit
7e9405fd
authored
Dec 08, 2023
by
Bruce MacDonald
Committed by
GitHub
Dec 08, 2023
Browse files
fix: encode full previous prompt in context (#1424)
parent
3b0b8930
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
server/routes.go
server/routes.go
+1
-1
No files found.
server/routes.go
View file @
7e9405fd
...
@@ -277,7 +277,7 @@ func GenerateHandler(c *gin.Context) {
...
@@ -277,7 +277,7 @@ func GenerateHandler(c *gin.Context) {
}
}
if
r
.
Done
&&
!
req
.
Raw
{
if
r
.
Done
&&
!
req
.
Raw
{
embd
,
err
:=
loaded
.
runner
.
Encode
(
c
.
Request
.
Context
(),
req
.
P
rompt
+
generated
.
String
())
embd
,
err
:=
loaded
.
runner
.
Encode
(
c
.
Request
.
Context
(),
p
rompt
+
generated
.
String
())
if
err
!=
nil
{
if
err
!=
nil
{
ch
<-
gin
.
H
{
"error"
:
err
.
Error
()}
ch
<-
gin
.
H
{
"error"
:
err
.
Error
()}
return
return
...
...
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