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
|
if suggestions.length > 1
|
||||||
suggestions
|
suggestions
|
||||||
else
|
else
|
||||||
suggestions.split("\n").map(&:strip)
|
suggestions.first.split("\n").map(&:strip)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
[Nokogiri::HTML5.fragment(content).at("ai").text]
|
[Nokogiri::HTML5.fragment(content).at("ai").text]
|
||||||
|
|
Loading…
Reference in New Issue