FIX: Fallback to whole LLM response when XML fail (#340)
This commit is contained in:
parent
7ac1dbb6b6
commit
c8352f21ce
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue