AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(backend): enable the google blocks + fix .env (#10430)
Nicholas Tindlef8b9e80829ce
diff --git a/autogpt_platform/backend/backend/blocks/google/calendar.py b/autogpt_platform/backend/backend/blocks/google/calendar.pyindex 27cc9e5958..c75e0ec9eb 100644--- a/autogpt_platform/backend/backend/blocks/google/calendar.py+++ b/autogpt_platform/backend/backend/blocks/google/calendar.py@@ -10,7 +10,7 @@ from pydantic import BaseModelfrom backend.data.block import Block, BlockCategory, BlockOutput, BlockSchemafrom backend.data.model import SchemaField-from backend.util.settings import AppEnvironment, Settings+from backend.util.settings import Settingsfrom ._auth import (GOOGLE_OAUTH_IS_CONFIGURED,@@ -88,8 +88,6 @@ class GoogleCalendarReadEventsBlock(Block):)def __init__(self):- settings = Settings()-# Create realistic test data for eventstest_now = datetime.now(tz=timezone.utc)test_tomorrow = test_now + timedelta(days=1)@@ -116,8 +114,7 @@ class GoogleCalendarReadEventsBlock(Block):categories={BlockCategory.PRODUCTIVITY, BlockCategory.DATA},input_schema=GoogleCalendarReadEventsBlock.Input,output_schema=GoogleCalendarReadEventsBlock.Output,- disabled=not GOOGLE_OAUTH_IS_CONFIGURED- or settings.config.app_env == AppEnvironment.PRODUCTION,+ disabled=not GOOGLE_OAUTH_IS_CONFIGURED,test_input={"credentials": TEST_CREDENTIALS_INPUT,"calendar_id": "primary",@@ -442,16 +439,13 @@ class GoogleCalendarCreateEventBlock(Block):error: str = SchemaField(description="Error message if event creation failed")def __init__(self):- settings = Settings()-super().__init__(id="ed2ec950-fbff-4204-94c0-023fb1d625e0",description="This block creates a new event in Google Calendar with customizable parameters.",categories={BlockCategory.PRODUCTIVITY},input_schema=GoogleCalendarCreateEventBlock.Input,output_schema=GoogleCalendarCreateEventBlock.Output,- disabled=not GOOGLE_OAUTH_IS_CONFIGURED- or settings.config.app_env == AppEnvironment.PRODUCTION,+ disabled=not GOOGLE_OAUTH_IS_CONFIGURED,test_input={"credentials": TEST_CREDENTIALS_INPUT,"event_title": "Team Meeting",diff --git a/autogpt_platform/backend/backend/blocks/google/sheets.py b/autogpt_platform/backend/backend/blocks/google/sheets.pyindex 6119fd1527..6e63958c82 100644--- a/autogpt_platform/backend/backend/blocks/google/sheets.py+++ b/autogpt_platform/backend/backend/blocks/google/sheets.py@@ -7,7 +7,7 @@ from googleapiclient.discovery import buildfrom backend.data.block import Block, BlockCategory, BlockOutput, BlockSchemafrom backend.data.model import SchemaField-from backend.util.settings import AppEnvironment, Settings+from backend.util.settings import Settingsfrom ._auth import (GOOGLE_OAUTH_IS_CONFIGURED,@@ -19,10 +19,7 @@ from ._auth import ()settings = Settings()-GOOGLE_SHEETS_DISABLED = (- not GOOGLE_OAUTH_IS_CONFIGURED- or settings.config.app_env == AppEnvironment.PRODUCTION-)+GOOGLE_SHEETS_DISABLED = not GOOGLE_OAUTH_IS_CONFIGUREDdef parse_a1_notation(a1: str) -> tuple[str | None, str]:diff --git a/autogpt_platform/frontend/.env.example b/autogpt_platform/frontend/.env.exampleindex 5e1edb8a86..a23ac83551 100644--- a/autogpt_platform/frontend/.env.example+++ b/autogpt_platform/frontend/.env.example@@ -5,7 +5,7 @@ NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/apiNEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/wsNEXT_PUBLIC_AGPT_MARKETPLACE_URL=http://localhost:8015/api/v1/marketNEXT_PUBLIC_LAUNCHDARKLY_ENABLED=false-NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID=687910b9638a3d099c11ab7f # Local environment on Launch darkly+NEXT_PUBLIC_LAUNCHDARKLY_CLIENT_ID=687ab1372f497809b131e06e # Local environment on Launch darklyNEXT_PUBLIC_APP_ENV=localNEXT_PUBLIC_AGPT_SERVER_BASE_URL=http://localhost:8006