Skip to content

Commit

Permalink
Fix DABBLE-ME-72
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Dec 14, 2024
1 parent dfe90a9 commit 5607a48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ def split_for_ai
end

def text_bodies_for_ai
return [] unless split_for_ai.present?

split_for_ai.map do |formatted_split_body|
clean_chunk = formatted_split_body.gsub("👤 You:", "").gsub("🤖 DabbleMeGPT:", "||DabbleMeGPT||")
Nokogiri::HTML.parse(ReverseMarkdown.convert(clean_chunk, unknown_tags: :bypass)).text
Expand Down

0 comments on commit 5607a48

Please sign in to comment.