Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

Docs/redirect uri google calender toolkit (#3393)

Tanuj Taneja9c6df73a35ec
diff --git a/camel/toolkits/google_calendar_toolkit.py b/camel/toolkits/google_calendar_toolkit.py
index bef60c1e0..6061b8924 100644
--- a/camel/toolkits/google_calendar_toolkit.py
+++ b/camel/toolkits/google_calendar_toolkit.py
@@ -45,8 +45,21 @@ class GoogleCalendarToolkit(BaseToolkit):
timeout (Optional[float]): The timeout value for API requests
in seconds. If None, no timeout is applied.
(default: :obj:`None`)
+
+ Note:
+ Before using this toolkit, make sure to:
+ 1. Set the required environment variables: GOOGLE_CLIENT_ID and
+ GOOGLE_CLIENT_SECRET
+ 2. Configure the redirect URI in Google Cloud Console to
+ http://localhost/
"""
super().__init__(timeout=timeout)
+ logger.info(
+ "Initializing GoogleCalendarToolkit. Make sure to set "
+ "GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET environment variables, "
+ "and configure the redirect URI in Google Cloud Console to "
+ "http://localhost/"
+ )
self.service = self._get_calendar_service()
def create_event(
diff --git a/examples/toolkits/google_calendar_toolkit.py b/examples/toolkits/google_calendar_toolkit.py
index 52eb43233..c4c5004e3 100644
--- a/examples/toolkits/google_calendar_toolkit.py
+++ b/examples/toolkits/google_calendar_toolkit.py
@@ -12,6 +12,11 @@
# limitations under the License.
# ========= Copyright 2023-2024 @ CAMEL-AI.org. All Rights Reserved. =========
+# To use GoogleCalendarToolkit make sure to set required environment variables:
+# GOOGLE_CLIENT_ID
+# GOOGLE_CLIENT_SECRET
+# Also you need to set the redirect URI in Google Cloud Console to http://localhost/
+
from camel.agents import ChatAgent
from camel.configs import BaseConfig
from camel.models import ModelFactory