mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-04 05:44:25 +01:00
Load .env in package init (#3251)
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load the users .env file into environment variables
|
||||
load_dotenv(verbose=True, override=True)
|
||||
|
||||
del load_dotenv
|
||||
|
||||
@@ -2,12 +2,9 @@
|
||||
import os
|
||||
|
||||
import tweepy
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from autogpt.commands.command import command
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@command(
|
||||
"send_tweet",
|
||||
|
||||
@@ -6,12 +6,9 @@ import openai
|
||||
import yaml
|
||||
from auto_gpt_plugin_template import AutoGPTPluginTemplate
|
||||
from colorama import Fore
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from autogpt.singleton import Singleton
|
||||
|
||||
load_dotenv(verbose=True, override=True)
|
||||
|
||||
|
||||
class Config(metaclass=Singleton):
|
||||
"""
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from autogpt.api_manager import ApiManager
|
||||
from autogpt.api_manager import api_manager as api_manager_
|
||||
from autogpt.config import Config
|
||||
from autogpt.workspace import Workspace
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def workspace_root(tmp_path) -> Path:
|
||||
|
||||
Reference in New Issue
Block a user