langchain-ai / langchainjs

🦜🔗 Build context-aware reasoning applications 🦜🔗
https://js.langchain.com/docs/
MIT License
12.5k stars 2.12k forks source link

Outlook integration toolkit #3005

Closed hahahafafa closed 7 months ago

hahahafafa commented 12 months ago

Feature Request Introduce a comprehensive Outlook Integration Toolkit to Langchain. This toolkit should enable more streamlined and direct interactions with the Outlook API through an Agent interface. The toolkit should provide capabilities such as email dispatch, folder navigation, contact management, and calendar administration.

Motivation Currently, Langchain has a restricted range of functionalities for interfacing with the Outlook API. The existing method, presumably OutlookMailLoader, requires manual data downloading and uploading in a certain format, which is not only tedious but also lacks flexibility. Additionally, there is a lack of functions that would allow an LLM Agent to perform tasks like sending emails, searching through folders, managing contacts, and handling calendar events on Outlook.

Your Contribution There are no current plans to address this feature request. However, efforts are being made towards similar issues in the Python repository.

hahahafafa commented 12 months ago

@dosu-beta can you give me some instructions about what file should i change and some ideas on how to implement this feature?

dosubot[bot] commented 12 months ago

🤖

To implement the Outlook Integration Toolkit in the Langchainjs repository, you would need to create a new file in the langchain/src/tools/ directory. This file would contain the code for interacting with the Outlook API.

Here's a basic idea of how you might structure this file:

// langchain/src/tools/outlookIntegration.js

import { Tool, type ToolParams } from "./base.js";

export class OutlookIntegration extends Tool {
  constructor(params: ToolParams) {
    super(params);
  }

  // Implement methods for interacting with the Outlook API here
}

After creating this file, you would need to export it in langchain/src/tools/index.ts so that it can be used elsewhere in the project:

// langchain/src/tools/index.ts

export { OutlookIntegration } from "./outlookIntegration.js";
// Other exports...

Please note that this is a very basic example and you would need to implement the methods for interacting with the Outlook API based on your specific requirements. You might also need to install and import any necessary libraries for interacting with the Outlook API.

The current structure of the langchain/src/tools/ directory in the langchainjs repository includes the following files:

This is inferred from the import statements in the provided index.ts file. Each import statement corresponds to a file in the tools directory.

I hope this helps! If you have any other questions, feel free to ask.

Sources


This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

If you want to continue the conversation, start your reply with @dosu-bot.

JTCorrin commented 11 months ago

I'd be interested in helping out on this feature. @hahahafafa have you started anything yet? If not, I'd be interested in integrating with the Microsoft Graph outlook endpoints, perhaps starting with read mail and send mail.

https://learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0

hahahafafa commented 11 months ago

I'd be interested in helping out on this feature. @hahahafafa have you started anything yet? If not, I'd be interested in integrating with the Microsoft Graph outlook endpoints, perhaps starting with read mail and send mail.

https://learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0

Ah thank you! I would like to try and tackle this myself in the meantime

JTCorrin commented 11 months ago

I'd be interested in helping out on this feature. @hahahafafa have you started anything yet? If not, I'd be interested in integrating with the Microsoft Graph outlook endpoints, perhaps starting with read mail and send mail. https://learn.microsoft.com/en-us/graph/api/resources/mail-api-overview?view=graph-rest-1.0

Ah thank you! I would like to try and tackle this myself in the meantime

No problem. Let me know if I can help - perhaps link to your branch when ready to share! Good luck

hahahafafa commented 11 months ago

@jacoblee93 Hi, i have my first draft done, I'm wondering if you would like to open a branch for me so that I can submit the pr to the branch for you to review

JTCorrin commented 11 months ago

@jacoblee93 Hi, i have my first draft done, I'm wondering if you would like to open a branch for me so that I can submit the pr to the branch for you to review

Hey @hahahafafa - while you wait for a reply I might suggest you simply fork this repo -> clone your forked repo to your local/dev environment -> create a branch called something like "feat/outlook-int" or "hahahafafa/outlook-int" -> put your code changes into this branch.

Then nav back to this repo (langchainjs) and simply click the "create pull request" button that should automatically appear at the top.

This might be the quickest and easiest - and it'll give other interested parties (like me 😄)a chance to review while we wait for @jacoblee93

Nice work getting a draft together btw!

dosubot[bot] commented 7 months ago

🤖

Hi, @hahahafafa,

I'm helping the langchainjs team manage their backlog and am marking this issue as stale. It looks like you've made progress on implementing the Outlook Integration Toolkit and are seeking to submit a pull request for review. JTCorrin has also provided guidance on creating a branch and submitting the code changes for review.

Could you please confirm if this issue is still relevant to the latest version of the langchainjs repository? If it is, please let the langchainjs team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and contributions to langchainjs!