Skip to content

Commit

Permalink
fix: encode full previous prompt in context (ollama#1424)
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceMacD authored Dec 8, 2023
1 parent 3b0b893 commit 7e9405f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func GenerateHandler(c *gin.Context) {
}

if r.Done && !req.Raw {
embd, err := loaded.runner.Encode(c.Request.Context(), req.Prompt+generated.String())
embd, err := loaded.runner.Encode(c.Request.Context(), prompt+generated.String())
if err != nil {
ch <- gin.H{"error": err.Error()}
return
Expand Down

0 comments on commit 7e9405f

Please sign in to comment.