diff --git a/.env.example b/.env.example index d1efe4e8..9401588d 100644 --- a/.env.example +++ b/.env.example @@ -33,6 +33,7 @@ IFTTTKey="your_iftttkey_here" BRAVE_API_KEY="your_brave_api_key_here" SPOONACULAR_KEY="your_spoonacular_key_here" HF_API_KEY="your_huggingface_api_key_here" +USE_TELEMTRY=True REDIS_HOST= diff --git a/pyproject.toml b/pyproject.toml index a6d135e7..d92aa27d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "4.3.1" +version = "4.3.3" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] @@ -25,13 +25,13 @@ classifiers = [ [tool.poetry.dependencies] python = ">=3.9,<4.0" -torch = "2.1.1" +torch = ">=2.1.1,<3.0" transformers = "*" -asyncio = "3.4.3" +asyncio = ">=3.4.3,<4.0" einops = "0.7.0" google-generativeai = "0.3.1" langchain-experimental = "0.0.10" -langchain-community = "*" +langchain-community = "0.0.29" faiss-cpu = "1.7.4" backoff = "2.2.1" datasets = "*" @@ -50,7 +50,7 @@ huggingface-hub = "*" pydantic = "2.6.4" tenacity = "8.2.2" Pillow = "9.4.0" -chromadb = "*" +chromadb = "0.4.24" termcolor = "2.2.0" torchvision = "0.16.1" rich = "13.5.2" diff --git a/swarms/__init__.py b/swarms/__init__.py index 4c8726ff..b9eb1426 100644 --- a/swarms/__init__.py +++ b/swarms/__init__.py @@ -1,14 +1,18 @@ -# from swarms.telemetry.main import Telemetry # noqa: E402, F403 -from swarms.telemetry.bootup import bootup # noqa: E402, F403 import os +from swarms.telemetry.bootup import bootup # noqa: E402, F403 +from swarms.telemetry.sentry_active import activate_sentry + os.environ["WANDB_SILENT"] = "true" bootup() +activate_sentry() + from swarms.agents import * # noqa: E402, F403 from swarms.artifacts import * # noqa: E402, F403 from swarms.chunkers import * # noqa: E402, F403 +from swarms.memory import * # noqa: E402, F403 from swarms.models import * # noqa: E402, F403 from swarms.prompts import * # noqa: E402, F403 from swarms.structs import * # noqa: E402, F403 @@ -16,4 +20,3 @@ from swarms.telemetry import * # noqa: E402, F403 from swarms.tokenizers import * # noqa: E402, F403 from swarms.tools import * # noqa: E402, F403 from swarms.utils import * # noqa: E402, F403 -from swarms.memory import * # noqa: E402, F403 diff --git a/swarms/telemetry/__init__.py b/swarms/telemetry/__init__.py index 8c13871a..442ad55b 100644 --- a/swarms/telemetry/__init__.py +++ b/swarms/telemetry/__init__.py @@ -18,25 +18,7 @@ from swarms.telemetry.user_utils import ( get_system_info, get_user_device_data, ) - -# # Capture data from the user's device -# posthog.capture( -# "User Device Data", -# str(get_user_device_data()), -# ) - -# # Capture system information -# posthog.capture( -# "System Information", -# str(system_info()), -# ) - -# # Capture the user's unique identifier -# posthog.capture( -# "User Unique Identifier", -# str(generate_unique_identifier()), -# ) - +from swarms.telemetry.sentry_active import activate_sentry __all__ = [ "log_all_calls", @@ -54,4 +36,5 @@ __all__ = [ "get_package_mismatches", "system_info", "get_user_device_data", + "activate_sentry", ] diff --git a/swarms/telemetry/sentry_active.py b/swarms/telemetry/sentry_active.py new file mode 100644 index 00000000..c24c4267 --- /dev/null +++ b/swarms/telemetry/sentry_active.py @@ -0,0 +1,20 @@ +import os +from dotenv import load_dotenv +import sentry_sdk + +load_dotenv() + +os.environ["USE_TELEMETRY"] = "True" + +use_telementry = os.getenv("USE_TELEMETRY") + +def activate_sentry(): + if use_telementry == "True": + sentry_sdk.init( + dsn="https://5d72dd59551c02f78391d2ea5872ddd4@o4504578305490944.ingest.us.sentry.io/4506951704444928", + traces_sample_rate=1.0, + profiles_sample_rate=1.0, + enable_tracing=True, + debug = True, + ) + \ No newline at end of file