fix: encode full previous prompt in context (#1424)

This commit is contained in:
Bruce MacDonald 2023-12-08 16:53:51 -05:00 committed by GitHub
parent 3b0b8930d4
commit 7e9405fd07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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