diff --git a/.env.template b/.env.template index dd690308..d4d99baa 100644 --- a/.env.template +++ b/.env.template @@ -71,6 +71,7 @@ OPENAI_API_KEY=your-openai-api-key # TEMPERATURE=0 # USE_AZURE=False +# OPENAI_ORGANIZATION=your-openai-organization-key-if-applicable ### AZURE # moved to `azure.yaml.template` diff --git a/autogpt/config/config.py b/autogpt/config/config.py index 1e61b808..5f76bb74 100644 --- a/autogpt/config/config.py +++ b/autogpt/config/config.py @@ -64,6 +64,7 @@ class Config(metaclass=Singleton): ) self.openai_api_key = os.getenv("OPENAI_API_KEY") + self.openai_organization = os.getenv("OPENAI_ORGANIZATION") self.temperature = float(os.getenv("TEMPERATURE", "0")) self.use_azure = os.getenv("USE_AZURE") == "True" self.execute_local_commands = ( @@ -79,6 +80,9 @@ class Config(metaclass=Singleton): openai.api_base = self.openai_api_base openai.api_version = self.openai_api_version + if self.openai_organization is not None: + openai.organization = self.openai_organization + self.elevenlabs_api_key = os.getenv("ELEVENLABS_API_KEY") self.elevenlabs_voice_1_id = os.getenv("ELEVENLABS_VOICE_1_ID") self.elevenlabs_voice_2_id = os.getenv("ELEVENLABS_VOICE_2_ID")