1
0
mirror of synced 2026-08-05 15:26:55 +00:00

FIX: need to create model when testing new embedding (#1192)

This commit is contained in:
Kris
2025-03-14 13:11:44 -04:00
committed by GitHub
parent 3533cd1acc
commit bd40076dc1
@@ -240,7 +240,20 @@ export default class AiEmbeddingEditor extends Component {
this.testRunning = true;
try {
const configTestResult = await this.args.model.testConfig(data);
let testModel;
// new embeddings
if (this.args.model.isNew || this.selectedPreset) {
testModel = this.store.createRecord("ai-embedding", {
...this.selectedPreset,
...data,
});
} else {
// existing embeddings
testModel = this.args.model;
}
const configTestResult = await testModel.testConfig(data);
this.testResult = configTestResult.success;
if (this.testResult) {