diff --git a/lib/account.js b/lib/account.js index c0e0fae7..7fcc4f9d 100644 --- a/lib/account.js +++ b/lib/account.js @@ -1741,7 +1741,7 @@ class Account { } }; - for (let indexName of [index, `${index}.threads`]) { + for (let indexName of [index, `${index}.threads`, `${index}.embeddings`]) { try { deleteResult[indexName] = await client.deleteByQuery({ index: indexName, diff --git a/views/config/ai.hbs b/views/config/ai.hbs index c2f741a6..01e8c099 100644 --- a/views/config/ai.hbs +++ b/views/config/ai.hbs @@ -78,15 +78,15 @@ id="openAiGenerateEmbeddings" name="openAiGenerateEmbeddings" {{#if values.openAiGenerateEmbeddings}}checked{{/if}} /> + the email using OpenAI API. {{#if errors.openAiGenerateEmbeddings}} {{errors.openAiGenerateEmbeddings}} {{/if}} EmailEngine uses OpenAI API to generate text embeddings for new emails. To decrease vector size, EmailEngine splits email text into chunks of up to 600 tokens and generates embeddings for each chunk separately. Embeddings are only available in - messageNew webhooks, and these are not stored in the Document Store. + messageNew webhooks, and these are not stored in the Document Store by + default.
diff --git a/views/config/document-store/index.hbs b/views/config/document-store/index.hbs index 37b46e3e..28d46d26 100644 --- a/views/config/document-store/index.hbs +++ b/views/config/document-store/index.hbs @@ -49,21 +49,70 @@
-
-
- +
+ + + {{#if + values.documentStoreEnabled}} + enabled + {{else}} + disabled + {{/if}} +
+ + +
  • + +
    + + + {{#if errors.documentStoreGenerateEmbeddings}} + {{errors.documentStoreGenerateEmbeddings}} + {{/if}} + If enabled, then EmailEngine uses OpenAI API to generate text + embeddings for emails stored in the document store. This option requires document store syncing + to be enabled and the OpenAI API key to be set here. Enabling + this option does not apply to already processed emails. +
    + +
    + + + {{#if + values.documentStoreGenerateEmbeddings}} + enabled + {{else}} + disabled + {{/if}} +
    +
  • + + +