mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-20 05:34:25 +01:00
Adding support for openai_organization env variable (#289)
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user