1
0
mirror of synced 2026-08-06 07:46:54 +00:00

FIX: Fallback to whole LLM response when XML fail (#340)

This commit is contained in:
Rafael dos Santos Silva
2023-12-06 18:58:26 -03:00
committed by GitHub
parent 7ac1dbb6b6
commit c8352f21ce
+1 -1
View File
@@ -114,7 +114,7 @@ module DiscourseAi
SiteSetting.ai_embeddings_semantic_search_hyde_model,
).completion!(prompt, @guardian.user)
Nokogiri::HTML5.fragment(llm_response).at("ai").text
Nokogiri::HTML5.fragment(llm_response).at("ai").text.presence || llm_response
end
end
end