mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 22:44:21 +01:00
Merge branch 'master' into azure-ad
This commit is contained in:
@@ -44,7 +44,7 @@ class Config(metaclass=Singleton):
|
|||||||
self.smart_token_limit = int(os.getenv("SMART_TOKEN_LIMIT", 8000))
|
self.smart_token_limit = int(os.getenv("SMART_TOKEN_LIMIT", 8000))
|
||||||
|
|
||||||
self.openai_api_key = os.getenv("OPENAI_API_KEY")
|
self.openai_api_key = os.getenv("OPENAI_API_KEY")
|
||||||
self.temperature = int(os.getenv("TEMPERATURE", "1"))
|
self.temperature = float(os.getenv("TEMPERATURE", "1"))
|
||||||
self.use_azure = os.getenv("USE_AZURE") == 'True'
|
self.use_azure = os.getenv("USE_AZURE") == 'True'
|
||||||
self.execute_local_commands = os.getenv('EXECUTE_LOCAL_COMMANDS', 'False') == 'True'
|
self.execute_local_commands = os.getenv('EXECUTE_LOCAL_COMMANDS', 'False') == 'True'
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ def write_to_file(filename, text):
|
|||||||
directory = os.path.dirname(filepath)
|
directory = os.path.dirname(filepath)
|
||||||
if not os.path.exists(directory):
|
if not os.path.exists(directory):
|
||||||
os.makedirs(directory)
|
os.makedirs(directory)
|
||||||
with open(filepath, "w") as f:
|
with open(filepath, "w", encoding='utf-8') as f:
|
||||||
f.write(text)
|
f.write(text)
|
||||||
return "File written to successfully."
|
return "File written to successfully."
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user