From 094eccafcd389f78ec56d04976aac637b1e5f8a0 Mon Sep 17 00:00:00 2001 From: Adhityan K V Date: Tue, 15 Oct 2024 15:16:18 +0200 Subject: [PATCH 1/2] docs: add documentation for confluence loader --- docs/components/data-sources/confluence.mdx | 28 ++++++++++++++++++++ docs/components/data-sources/overview.mdx | 29 +++++++++++---------- docs/mint.json | 1 + 3 files changed, 44 insertions(+), 14 deletions(-) create mode 100644 docs/components/data-sources/confluence.mdx diff --git a/docs/components/data-sources/confluence.mdx b/docs/components/data-sources/confluence.mdx new file mode 100644 index 00000000..c037a702 --- /dev/null +++ b/docs/components/data-sources/confluence.mdx @@ -0,0 +1,28 @@ +--- +title: '📄 Confluence Spaces' +--- + +You can load all pages from a Confluence space using the `ConfluenceLoader`. + +## Install Confluence addon + +```bash +npm install @llm-tools/embedjs-loader-confluence +``` + +## Usage + +```ts +import { RAGApplicationBuilder } from '@llm-tools/embedjs'; +import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai'; +import { HNSWDb } from '@llm-tools/embedjs-hnswlib'; +import { ConfluenceLoader } from '@llm-tools/embedjs-loader-confluence'; + +const app = await new RAGApplicationBuilder() +.setModel(SIMPLE_MODELS.OPENAI_GPT4_O) +.setEmbeddingModel(new OpenAiEmbeddings()) +.setVectorDb(new HNSWDb()) +.build(); + +app.addLoader(new ConfluenceLoader({ spaceNames: ['...', '...'], confluenceToken: '...' })) +``` diff --git a/docs/components/data-sources/overview.mdx b/docs/components/data-sources/overview.mdx index 699a8297..b0b28be2 100644 --- a/docs/components/data-sources/overview.mdx +++ b/docs/components/data-sources/overview.mdx @@ -6,20 +6,21 @@ EmbedJs comes with built-in support for various data sources. We handle the complexity of loading unstructured data from these data sources, allowing you to easily customize your app through a user-friendly interface. - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
diff --git a/docs/mint.json b/docs/mint.json index ac398812..42c48af3 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -73,6 +73,7 @@ "components/data-sources/json", "components/data-sources/text", "components/data-sources/web-page", + "components/data-sources/confluence", "components/data-sources/youtube-video", "components/data-sources/youtube-channel", "components/data-sources/youtube-search", From 9570daaafa797f8a04e54f3c3739ec39c74935fe Mon Sep 17 00:00:00 2001 From: Adhityan K V Date: Tue, 15 Oct 2024 15:18:18 +0200 Subject: [PATCH 2/2] docs: update confluence documentation --- docs/components/data-sources/confluence.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/components/data-sources/confluence.mdx b/docs/components/data-sources/confluence.mdx index c037a702..cf405d50 100644 --- a/docs/components/data-sources/confluence.mdx +++ b/docs/components/data-sources/confluence.mdx @@ -1,5 +1,5 @@ --- -title: '📄 Confluence Spaces' +title: '📄 Confluence' --- You can load all pages from a Confluence space using the `ConfluenceLoader`.