Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 5b253a8

Browse files
committed
Fix run test for new embedding
1 parent 5a58e48 commit 5b253a8

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

assets/javascripts/discourse/components/ai-embedding-editor.gjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default class AiEmbeddingEditor extends Component {
150150
this.testRunning = true;
151151

152152
try {
153-
const configTestResult = await this.args.model.testConfig();
153+
const configTestResult = await this.editingModel.testConfig();
154154
this.testResult = configTestResult.success;
155155

156156
if (this.testResult) {

db/migrate/20250110114305_embedding_config_data_migration.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ def model_attrs(model_name)
173173
def persist_config(attrs)
174174
DB.exec(
175175
<<~SQL,
176-
INSERT INTO embedding_definitions (id, display_name, dimensions, max_sequence_length, version, pg_function, provider, tokenizer_class, url, api_key, provider_params, created_at, updated_at)
177-
VALUES (:id, :display_name, :dimensions, :max_sequence_length, 1, :pg_function, :provider, :tokenizer_class, :url, :api_key, :provider_params, :now, :now)
176+
INSERT INTO embedding_definitions (id, display_name, dimensions, max_sequence_length, version, pg_function, provider, tokenizer_class, url, api_key, provider_params, seeded, created_at, updated_at)
177+
VALUES (:id, :display_name, :dimensions, :max_sequence_length, 1, :pg_function, :provider, :tokenizer_class, :url, :api_key, :provider_params, :seeded, :now, :now)
178178
SQL
179179
id: attrs[:id],
180180
display_name: attrs[:display_name],
@@ -186,6 +186,7 @@ def persist_config(attrs)
186186
url: attrs[:url],
187187
api_key: attrs[:api_key],
188188
provider_params: attrs[:provider_params],
189+
seeded: !!attrs[:seeded],
189190
now: Time.zone.now,
190191
)
191192

0 commit comments

Comments
 (0)