enhance embedding model support and update database schema for multi-model compatibility
This commit is contained in:
@@ -28,6 +28,13 @@ async function statusRoutes(fastify) {
|
||||
{ total: 0, usable: 0 }
|
||||
);
|
||||
|
||||
const embeddingModelRows = db.prepare(`
|
||||
SELECT model, COUNT(*) AS article_count
|
||||
FROM article_embedding_store
|
||||
GROUP BY model
|
||||
ORDER BY article_count DESC
|
||||
`).all();
|
||||
|
||||
return {
|
||||
total: totals.total,
|
||||
usable: totals.usable,
|
||||
@@ -35,6 +42,10 @@ async function statusRoutes(fastify) {
|
||||
bySource: Object.fromEntries(
|
||||
bySourceRows.map((row) => [row.source, { total: row.total, usable: row.usable }])
|
||||
),
|
||||
embeddingModels: embeddingModelRows.map((row) => ({
|
||||
model: row.model,
|
||||
articles: row.article_count,
|
||||
})),
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user