Skip to content

Commit

Permalink
wrap after image
Browse files Browse the repository at this point in the history
  • Loading branch information
xqdoo00o committed Apr 15, 2024
1 parent de846f4 commit 84217ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/chatgpt/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ func Handler(c *gin.Context, response *http.Response, secret *tokens.Secret, uui
go GetImageSource(&wg, url, dalle_content.Metadata.Dalle.Prompt, secret, index, imgSource)
}
wg.Wait()
translated_response := official_types.NewChatCompletionChunk(strings.Join(imgSource, ""))
translated_response := official_types.NewChatCompletionChunk(strings.Join(imgSource, "") + "\n")
if isRole {
translated_response.Choices[0].Delta.Role = original_response.Message.Author.Role
}
Expand Down Expand Up @@ -622,9 +622,9 @@ func Handler(c *gin.Context, response *http.Response, secret *tokens.Secret, uui
}
}
if !max_tokens {
return strings.Join(imgSource, "") + previous_text.Text, nil
return strings.Join(imgSource, "") + "\n" + previous_text.Text, nil
}
return strings.Join(imgSource, "") + previous_text.Text, &ContinueInfo{
return strings.Join(imgSource, "") + "\n" + previous_text.Text, &ContinueInfo{
ConversationID: original_response.ConversationID,
ParentID: original_response.Message.ID,
}
Expand Down

0 comments on commit 84217ee

Please sign in to comment.