Skip to content

Conversation

@neerajkrbansal1996
Copy link
Contributor

Issue:
#222

Results
image

@CLAassistant
Copy link

CLAassistant commented May 30, 2023

CLA assistant check
All committers have signed the CLA.

@neerajkrbansal1996 neerajkrbansal1996 changed the title Add Confluence Cocument Loader Feature/Add Confluence Cocument Loader May 30, 2023
@neerajkrbansal1996 neerajkrbansal1996 changed the title Feature/Add Confluence Cocument Loader Feature/Add Confluence Document Loader May 30, 2023
Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks @neerajkrbansal1996 !

@HenryHengZJ HenryHengZJ merged commit 641d453 into FlowiseAI:main May 30, 2023
@mrkhachaturov
Copy link
Contributor

mrkhachaturov commented Mar 16, 2024

There is no support for data center/server version where personal token is used.

Personal Access Token (Server/On-Prem only)
This method is valid for the Data Center/Server on-prem edition only. For more information on how to generate a Personal Access Token (PAT) check the official Confluence documentation at: https://confluence.atlassian.com/enterprise/using-personal-access-tokens-1026032365.html. When using a PAT you provide only the token value, you cannot provide a username. Please note that ConfluenceLoader will run under the permissions of the user that generated the PAT and will only be able to load documents for which said user has access to.

`import { ConfluencePagesLoader } from "langchain/document_loaders/web/confluence";

const username = process.env.CONFLUENCE_USERNAME;
const accessToken = process.env.CONFLUENCE_ACCESS_TOKEN;
const personalAccessToken = process.env.CONFLUENCE_PAT;

if (username && accessToken) {
  const loader = new ConfluencePagesLoader({
    baseUrl: "https://example.atlassian.net/wiki",
    spaceKey: "~EXAMPLE362906de5d343d49dcdbae5dEXAMPLE",
    username,
    accessToken,
  });

  const documents = await loader.load();
  console.log(documents);
} else if (personalAccessToken) {
  const loader = new ConfluencePagesLoader({
    baseUrl: "https://example.atlassian.net/wiki",
    spaceKey: "~EXAMPLE362906de5d343d49dcdbae5dEXAMPLE",
    personalAccessToken,
  });
  const documents = await loader.load();
  console.log(documents);
} else {
  console.log(
    "You need either a username and access token, or a personal access token (PAT), to use this example."
  );
}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants