mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-04 21:42:14 +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
|
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…
x
Reference in New Issue
Block a user