discourse-ai/db/migrate/20230307125342_created_model_accuracy_table.rb
Roman Rizzi a838116cd5
FEATURE: Use dedicated reviewables for AI flags. (#4)
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
2023-03-07 15:39:28 -03:00

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