Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function getKbModelStatus({
if (!isInferenceEndpointMissingOrUnavailable(error)) {
throw error;
}
logger.error(`Inference endpoint "${inferenceId}" not found or unavailable: ${error.message}`);
logger.warn(`Inference endpoint "${inferenceId}" not found or unavailable: ${error.message}`);

return {
enabled,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,23 @@ async function populateMissingSemanticTextField({
}) {
logger.debug('Initalizing semantic text migration for knowledge base entries...');

const { count } = await esClient.asInternalUser.count({
index: resourceNames.writeIndexAlias.kb,
query: {
bool: {
must_not: {
exists: { field: 'semantic_text' },
},
},
},
});
logger.info(`Documents missing 'semantic_text' before migration: ${count}`);

if (count === 0) {
logger.debug('No documents missing semantic_text field, skipping migration.');
return;
}

await pRetry(
async () => {
const inferenceId = await getInferenceIdFromWriteIndex(esClient);
Expand Down