mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-05 19:18:11 +00:00
a838116cd5
This change adds two new reviewable types: ReviewableAIPost and ReviewableAIChatMessage. They have the same actions as their existing counterparts: ReviewableFlaggedPost and ReviewableChatMessage. We'll display the model used and their accuracy when showing these flags in the review queue and adjust the latter after staff performs an action, tracking a global accuracy per existing model in a separate table. * FEATURE: Dedicated reviewables for AI flags * Store and adjust model accuracy * Display accuracy in reviewable templates
17 lines
442 B
Ruby
17 lines
442 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CreatedModelAccuracyTable < ActiveRecord::Migration[7.0]
|
|
def change
|
|
create_table :model_accuracies do |t|
|
|
t.string :model, null: false
|
|
t.string :classification_type, null: false
|
|
t.integer :flags_agreed, null: false, default: 0
|
|
t.integer :flags_disagreed, null: false, default: 0
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :model_accuracies, %i[model], unique: true
|
|
end
|
|
end
|