mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-06-26 09:32:40 +00:00
FIX: Sometimes Claude sends all titles suggestions in a single ai tag (#40)
This commit is contained in:
parent
bb0b829634
commit
4368ef29d8
@ -100,7 +100,7 @@ module DiscourseAi
|
||||
if suggestions.length > 1
|
||||
suggestions
|
||||
else
|
||||
suggestions.split("\n").map(&:strip)
|
||||
suggestions.first.split("\n").map(&:strip)
|
||||
end
|
||||
else
|
||||
[Nokogiri::HTML5.fragment(content).at("ai").text]
|
||||
|
Loading…
x
Reference in New Issue
Block a user