From f3f0454f74756fe33d00444526817c4ef4526e01 Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 6 Jul 2023 14:28:34 -0400 Subject: [PATCH] environg --- example.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/example.py b/example.py index a80ff392..f375369e 100644 --- a/example.py +++ b/example.py @@ -1,11 +1,14 @@ +import os from swarms import Swarms # Retrieve your API key from the environment or replace with your actual key # api_key = "sksdsds" +api_key = os.getenv("OPENAI_API_KEY") + # Initialize Swarms with your API key -swarm = Swarms() +swarm = Swarms(openai_api_key=api_key) # Define an objective objective = """