This commit is contained in:
William FH
2023-12-12 10:55:42 -08:00
committed by GitHub
parent 57337b4862
commit c32554a3e0
3 changed files with 17 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
import os
from typing import List, Tuple
from langchain.agents import AgentExecutor
@@ -37,9 +38,10 @@ tools = [
GmailGetMessage(),
GmailGetThread(),
GmailSearch(),
GmailSendMessage(),
search_engine,
]
if os.environ.get("GMAIL_AGENT_ENABLE_SEND") == "true":
tools.append(GmailSendMessage())
current_user = (
build_resource_service().users().getProfile(userId="me").execute()["emailAddress"]
)