mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
@@ -224,7 +224,8 @@ export class CopilotContextDocJob {
|
|||||||
try {
|
try {
|
||||||
const content = await this.doc.getFullDocContent(workspaceId, docId);
|
const content = await this.doc.getFullDocContent(workspaceId, docId);
|
||||||
if (content) {
|
if (content) {
|
||||||
// no need to check if embeddings is empty, will throw internally
|
// fast fall for empty doc, journal is easily to create a empty doc
|
||||||
|
if (!content.summary) return;
|
||||||
const embeddings = await this.embeddingClient.getFileEmbeddings(
|
const embeddings = await this.embeddingClient.getFileEmbeddings(
|
||||||
new File([content.summary], `${content.title || 'Untitled'}.md`)
|
new File([content.summary], `${content.title || 'Untitled'}.md`)
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user