diff --git a/playground/models/gemini.py b/gemini.py similarity index 84% rename from playground/models/gemini.py rename to gemini.py index 6edffde5..99b3f49c 100644 --- a/playground/models/gemini.py +++ b/gemini.py @@ -1,9 +1,7 @@ from swarms.models.gemini import Gemini # Initialize the model -model = Gemini( - gemini_api_key="A", -) +model = Gemini() # Establish the prompt and image task = "What is your name" diff --git a/swarms/swarms/base.py b/swarms/swarms/base.py index 2f97df6b..fe81df4e 100644 --- a/swarms/swarms/base.py +++ b/swarms/swarms/base.py @@ -1,15 +1,3 @@ -""" - -Paid - -# TODO: Pass in abstract LLM class that can utilize Hf or Anthropic models, Move away from OPENAI -# TODO: ADD Universal Communication Layer, a ocean vectorstore instance -# TODO: BE MORE EXPLICIT ON TOOL USE, TASK DECOMPOSITION AND TASK COMPLETETION AND ALLOCATION -# TODO: Add RLHF Data collection, ask user how the swarm is performing -# TODO: Create an onboarding process if not settings are preconfigured like `from swarms import Swarm, Swarm()` => then initiate onboarding name your swarm + provide purpose + etc - -""" - import asyncio from abc import ABC from concurrent.futures import ThreadPoolExecutor, as_completed diff --git a/swarms/telemetry/posthog_utils.py b/swarms/telemetry/posthog_utils.py index f9796f4e..9cf9c649 100644 --- a/swarms/telemetry/posthog_utils.py +++ b/swarms/telemetry/posthog_utils.py @@ -9,22 +9,13 @@ from swarms.telemetry.user_utils import generate_unique_identifier load_dotenv() -# Initialize Posthog client -def init_posthog(debug: bool = True, *args, **kwargs): - """Initialize Posthog client. +# # Initialize Posthog client +api_key = os.getenv("POSTHOG_API_KEY") +host = os.getenv("POSTHOG_HOST") +posthog = Posthog(api_key, host=host) +posthog.debug = True - Args: - debug (bool, optional): Whether to enable debug mode. Defaults to True. - - """ - api_key = os.getenv("POSTHOG_API_KEY") - host = os.getenv("POSTHOG_HOST") - posthog = Posthog(api_key, host=host, *args, **kwargs) - - if debug: - posthog.debug = True - - return posthog +# return posthog def log_activity_posthog(event_name: str, **event_properties): @@ -55,7 +46,7 @@ def log_activity_posthog(event_name: str, **event_properties): distinct_user_id = generate_unique_identifier() # Capture the event - init_posthog.capture( + posthog.capture( distinct_user_id, event_name, event_properties ) @@ -66,13 +57,13 @@ def log_activity_posthog(event_name: str, **event_properties): return decorator_log_activity -@log_activity_posthog( - "function_executed", function_name="my_function" -) -def my_function(): - # Function logic here - return "Function executed successfully!" +# @log_activity_posthog( +# "function_executed", function_name="my_function" +# ) +# def my_function(): +# # Function logic here +# return "Function executed successfully!" -out = my_function() -print(out) +# out = my_function() +# print(out)