diff --git a/.env.example b/.env.example index cc12b4d5..840d7866 100644 --- a/.env.example +++ b/.env.example @@ -1,16 +1,15 @@ -OPENAI_API_KEY="" -WOLFRAM_ALPHA_APPID="" -ZAPIER_NLA_API_KEY="" +OPENAI_API_KEY="your_openai_api_key_here" +WOLFRAM_ALPHA_APPID="your_wolfram_alpha_appid_here" +ZAPIER_NLA_API_KEY="your_zapier_nla_api_key_here" EVAL_PORT=8000 -MODEL_NAME="" -CELERY_BROKER_URL="" +MODEL_NAME="gpt-4" +CELERY_BROKER_URL="redis://localhost:6379" -SERVER="" +SERVER="http://localhost:8000" USE_GPU=True PLAYGROUND_DIR="playground" -OPENAI_API_KEY="your_openai_api_key_here" LOG_LEVEL="INFO" BOT_NAME="Orca" @@ -20,10 +19,8 @@ BING_SEARCH_URL="your_bing_search_url_here" BING_SUBSCRIPTION_KEY="your_bing_subscription_key_here" SERPAPI_API_KEY="your_serpapi_api_key_here" -IFTTTKey="" - -BRAVE_API_KEY="" -SPOONACULAR_KEY="" -HF_API_KEY="Huggingface api key" +IFTTTKey="your_iftttkey_here" -MODEL_NAME="gpt-4" \ No newline at end of file +BRAVE_API_KEY="your_brave_api_key_here" +SPOONACULAR_KEY="your_spoonacular_key_here" +HF_API_KEY="your_huggingface_api_key_here" diff --git a/swarms/utils/main.py b/swarms/utils/main.py index 1d812fbe..ca42a745 100644 --- a/swarms/utils/main.py +++ b/swarms/utils/main.py @@ -274,12 +274,11 @@ class StaticUploader(AbstractUploader): @staticmethod def from_settings(path: Path, endpoint: str) -> "StaticUploader": - server = os.environ.get("SERVER") - if server is None: - raise EnvironmentError("'SERVER' environment variable is not set.") + server = os.environ.get("SERVER", "default_server_value") return StaticUploader(server, path, endpoint) + def get_url(self, uploaded_path: str) -> str: return f"{self.server}/{uploaded_path}"