How can I load Onedrive's files using Langchain and which loader can be used?

Phuu Pwint Thinzar Kyaing 0 Reputation points
2024-05-10T09:06:36.8066667+00:00

I want to integrate Onedrive into my chat bot web application. I got access token to use Microsoft graph API and used "OnedriveLoader" from langchain community for document loading as file support to train the chatbot.

I did according to the way that Langchain's official documentation of using onedrive loader. When I load the files from Onedrive, there is no files that can be read from it. How can I fix this issue?

The python code I run is:

from langchain_community.document_loaders.onedrive import OneDriveLoader

loader = OneDriveLoader(drive_id="b!V8lIbShhPEm3AV2rOFHlVHEWqaTSANJIj8b_UrzPPUn8lR74qsU5QotmAKLIGpJE", auth_with_token=True, object_ids=["01QCFNCV56Y2GOVW7725BZO354PWSELRRZ"])


docs= loader.load()
docs
Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,845 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
863 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jiajing Hua-MFST 5,795 Reputation points Microsoft Vendor
    2024-05-13T01:54:15.4833333+00:00

    Hi @Phuu Pwint Thinzar Kyaing

    It's recommended to post this issue in OneDrive Developer community: https://techcommunity.microsoft.com/t5/onedrive-developer/bd-p/OneDriveDeveloper

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments