append image tags to user content

This commit is contained in:
Michael Yang
2024-01-31 16:31:29 -08:00
parent a896079705
commit b4e11be8ef
2 changed files with 10 additions and 1 deletions

View File

@@ -244,6 +244,10 @@ func GenerateHandler(c *gin.Context) {
promptVars.System = model.System
}
for i := range req.Images {
promptVars.Prompt += fmt.Sprintf(" [img-%d]", i)
}
p, err := model.PreResponsePrompt(promptVars)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})