feat(server): improve rerank performance (#12775)

fix AI-183
This commit is contained in:
DarkSky
2025-06-12 13:31:01 +08:00
committed by GitHub
parent 2d17c265ca
commit ed56f076ed
5 changed files with 75 additions and 36 deletions

View File

@@ -140,10 +140,9 @@ export class CopilotContextDocJob {
if (enableDocEmbedding) {
const toBeEmbedDocIds =
await this.models.copilotWorkspace.findDocsToEmbed(workspaceId);
this.logger.debug('Trigger embedding for docs', {
workspaceId,
toBeEmbedDocs: toBeEmbedDocIds.length,
});
this.logger.debug(
`Trigger embedding for ${toBeEmbedDocIds.length} docs in workspace ${workspaceId}`
);
for (const docId of toBeEmbedDocIds) {
await this.queue.add(
'copilot.embedding.docs',