mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-09 23:53:29 +00:00
* Use AR model for embeddings features * endpoints * Embeddings CRUD UI * Add presets. Hide a couple more settings * system specs * Seed embedding definition from old settings * Generate search bit index on the fly. cleanup orphaned data * support for seeded models * Fix run test for new embedding * fix selected model not set correctly
20 lines
639 B
Ruby
20 lines
639 B
Ruby
# frozen_string_literal: true
|
|
class CreateEmbeddingDefinitions < ActiveRecord::Migration[7.2]
|
|
def change
|
|
create_table :embedding_definitions do |t|
|
|
t.string :display_name, null: false
|
|
t.integer :dimensions, null: false
|
|
t.integer :max_sequence_length, null: false
|
|
t.integer :version, null: false, default: 1
|
|
t.string :pg_function, null: false
|
|
t.string :provider, null: false
|
|
t.string :tokenizer_class, null: false
|
|
t.string :url, null: false
|
|
t.string :api_key
|
|
t.boolean :seeded, null: false, default: false
|
|
t.jsonb :provider_params
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|