Merge remote-tracking branch 'upstream/master' into more_azure

This commit is contained in:
Peter Edwards
2023-04-13 08:35:13 +02:00
7 changed files with 60 additions and 11 deletions

View File

@@ -44,8 +44,11 @@ class Config(metaclass=Singleton):
self.smart_token_limit = int(os.getenv("SMART_TOKEN_LIMIT", 8000))
self.openai_api_key = os.getenv("OPENAI_API_KEY")
self.temperature = int(os.getenv("TEMPERATURE", "1"))
self.use_azure = False
self.use_azure = os.getenv("USE_AZURE") == 'True'
self.execute_local_commands = os.getenv('EXECUTE_LOCAL_COMMANDS', 'False') == 'True'
if self.use_azure:
self.load_azure_config()
openai.api_type = "azure"