Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Google Calendar Tool (wip) #652

Closed
wants to merge 9 commits into from

Conversation

nickscamara
Copy link
Contributor

Functionality:

  • Create event
  • View event
  • View events
  • Delete event
  • Reschedule event

Docs:

  • Google calendar, create event example
  • Google calendar ecosystem (not using load_tools yet)

Tests:

  • Simple test for creating event

I removed from load_tools for now, cause not sure if belongs there yet.
Instructions:

@nickscamara nickscamara changed the title feat: Google calendar Tool (wip) feat: Google Calendar Tool (wip) Jan 18, 2023
Copy link
Contributor

@hwchase17 hwchase17 left a comment

Choose a reason for hiding this comment

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

high level the functionality looks good, but i create a distinction between (1) the wrapper around google cal, and (2) the chain that goes LLM -> google cal API (eg run and run_create_event). i would keep (1) where it is, and move (2) into langchain.chains module

@nickscamara
Copy link
Contributor Author

nickscamara commented Jan 21, 2023

Got it. I also agree that separating it more would be better. Although I have some doubts about how this could look like.

1 - Would the run method of the Calendar tools look something like this? Where the wrapper doesn't handle the call to google API and where LLMGoogleCalendarChain handles classification and run_events.

    def run(self, query: str) -> str:     
        google_calendar_chain = LLMGoogleCalendarChain(
            ...,
            query=query,
        )
        return google_calendar_chain.run(query)
  • If so, wouldn't the wrapper tool lose its purpose of being a wrapper as most of the google API logic will be in the chain itself?

or

The other option I see is that the wrapper is the one that should be calling the google API.
That way it uses the chain to get the output in the right format then it uses the wrapper again to make the call to google API. Which I think makes more sense. Although, the chain wouldn't have access to the google API.

or

Maybe there should be better separation between wrappers and tools? But not sure about this one.

Let me know your thoughts :)

@hwchase17
Copy link
Contributor

@nickscamara the way i was thinking about it was that nothing that required an LLM should be in the Gcal Utility Wrapper. Eg it would just be create_event, list_events, etc - eg all the methods that interact with Gcal in a deterministic manner

everything that required an LLM would go in the chain class

@dgde
Copy link

dgde commented Feb 14, 2023

This looks very promising, any new progress here at all? @nickscamara

@libratiger
Copy link
Contributor

just want to know is there any progress ? @nickscamara

or is there any type to support the common Calendar type ? @hwchase17

@dev2049
Copy link
Contributor

dev2049 commented May 9, 2023

@vowelparrot we don't have anything for gcal yet right?

@vowelparrot
Copy link
Contributor

vowelparrot commented May 9, 2023

@vowelparrot we don't have anything for gcal yet right?

Not yet in core :) this would be a good one to add. I likely won't get around to it until at least this weekend though

@vowelparrot vowelparrot self-requested a review May 9, 2023 23:14
@rwhiten1
Copy link

Hi I have actually been working on a GCal client to so I could make a custom tool for a proof of concept. Then I decided to look and see if anything GCal related was in-flight and found this. Is there any way I could help get this one across the line?

@prodineeritecht
Copy link

I am the same person as @rwhiten1 , that is an older github account and wanted a fresh start in a new account so I created @prodineeritecht a while ago, but am just now getting around to using it. I'll gladly help get this across the line but had a question for @nickscamara , @vowelparrot , and @hwchase17. When I was looking through the langchain repository, I noticed that gmail was actually created as separate tools for each of the gmail functions, and that pattern seems to make the most sense to me. Do any of you have a problem if I were to refactor this PR or create a new PR to follow that pattern? Also, while I've been an SE for a good long while, I'm still something of a Python noob (scala, java, C# were my main languages) so if I push up anything that goes against Python best practices, let me know and I will gladly change it. I'm also currently between jobs so I have plenty of time to get this all working. I feel like I could have it ready to go either at the end of the week or early next week. Thanks!

@sdelgadoc sdelgadoc mentioned this pull request Jun 16, 2023
dev2049 added a commit that referenced this pull request Jun 26, 2023
#### Background
With the development of [structured
tools](https://blog.langchain.dev/structured-tools/), the LangChain team
expanded the platform's functionality to meet the needs of new
applications. The GMail tool, empowered by structured tools, now
supports multiple arguments and powerful search capabilities,
demonstrating LangChain's ability to interact with dynamic data sources
like email servers.

#### Challenge
The current GMail tool only supports GMail, while users often utilize
other email services like Outlook in Office365. Additionally, the
proposed calendar tool in PR
#652 only works with Google
Calendar, not Outlook.

#### Changes
This PR implements an Office365 integration for LangChain, enabling
seamless email and calendar functionality with a single authentication
process.

#### Future Work
With the core Office365 integration complete, future work could include
integrating other Office365 tools such as Tasks and Address Book.

#### Who can review?
@hwchase17 or @vowelparrot can review this PR

#### Appendix
@janscas, I utilized your [O365](https://github.com/O365/python-o365)
library extensively. Given the rising popularity of LangChain and
similar AI frameworks, the convergence of libraries like O365 and tools
like this one is likely. So, I wanted to keep you updated on our
progress.

---------

Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
@dosubot dosubot bot added the 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features label Jul 14, 2023
@eyurtsev
Copy link
Collaborator

eyurtsev commented Aug 8, 2023

Closing as stale

@eyurtsev eyurtsev closed this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants