discourse/plugins/discourse-ai/spec/lib/modules/embeddings
Rafael dos Santos Silva b81e80a6e2
FIX: Optimize shortcomings from topic truncation from a27e20c (#33983)
On a27e20c we made an emergency perf fix to speedup generating text from
a topic for embeddings generation.

This introduced some issues, like missing separators between posts,
including to line breaks per included post all at the top of the
generated text, and resulted in using a lot less content per topics,
as we count the cooked size before stripping all the HTML tags.

This commit helps alleviate by:

  - removing the "\n\n" * quantity of posts at the top
  - adding a space between posts
  - generating text 3 times longer than the max allowed lenght, since
    it's getting shrinked after it's built by the Nokogiri.text call.
2025-07-30 17:09:05 -03:00
..
jobs
strategies FIX: Optimize shortcomings from topic truncation from a27e20c (#33983) 2025-07-30 17:09:05 -03:00
entry_point_spec.rb
schema_spec.rb
semantic_related_spec.rb
semantic_search_spec.rb FEATURE: configure a default LLM model for all features (#33752) 2025-07-28 16:08:00 -03:00
semantic_topic_query_spec.rb
vector_spec.rb