mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-07 06:52:36 +00:00
* FEATURE: add inferred concepts system This commit adds a new inferred concepts system that: - Creates a model for storing concept labels that can be applied to topics - Provides AI personas for finding new concepts and matching existing ones - Adds jobs for generating concepts from popular topics - Includes a scheduled job that automatically processes engaging topics * FEATURE: Extend inferred concepts to include posts * Adds support for concepts to be inferred from and applied to posts * Replaces daily task with one that handles both topics and posts * Adds database migration for posts_inferred_concepts join table * Updates PersonaContext to include inferred concepts Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com> Co-authored-by: Keegan George <kgeorge13@gmail.com>
19 lines
502 B
Ruby
19 lines
502 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreateInferredConceptPosts < ActiveRecord::Migration[7.0]
|
|
def change
|
|
create_table :inferred_concept_posts, id: false do |t|
|
|
t.bigint :inferred_concept_id
|
|
t.bigint :post_id
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :inferred_concept_posts,
|
|
%i[post_id inferred_concept_id],
|
|
unique: true,
|
|
name: "index_inferred_concept_posts_uniqueness"
|
|
|
|
add_index :inferred_concept_posts, :inferred_concept_id
|
|
end
|
|
end
|