mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
Refactor/move singleton out of config module (#3161)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,6 +20,7 @@ log-ingestion.txt
|
||||
logs
|
||||
*.log
|
||||
*.mp3
|
||||
mem.sqlite3
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
"""Agent manager for managing GPT agents"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, Union
|
||||
from typing import List
|
||||
|
||||
from autogpt.config.config import Config, Singleton
|
||||
from autogpt.config.config import Config
|
||||
from autogpt.llm_utils import create_chat_completion
|
||||
from autogpt.singleton import Singleton
|
||||
from autogpt.types.openai import Message
|
||||
|
||||
|
||||
|
||||
@@ -3,12 +3,9 @@ This module contains the configuration classes for AutoGPT.
|
||||
"""
|
||||
from autogpt.config.ai_config import AIConfig
|
||||
from autogpt.config.config import Config, check_openai_api_key
|
||||
from autogpt.config.singleton import AbstractSingleton, Singleton
|
||||
|
||||
__all__ = [
|
||||
"check_openai_api_key",
|
||||
"AbstractSingleton",
|
||||
"AIConfig",
|
||||
"Config",
|
||||
"Singleton",
|
||||
]
|
||||
|
||||
@@ -8,7 +8,7 @@ from auto_gpt_plugin_template import AutoGPTPluginTemplate
|
||||
from colorama import Fore
|
||||
from dotenv import load_dotenv
|
||||
|
||||
from autogpt.config.singleton import Singleton
|
||||
from autogpt.singleton import Singleton
|
||||
|
||||
load_dotenv(verbose=True, override=True)
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ from logging import LogRecord
|
||||
|
||||
from colorama import Fore, Style
|
||||
|
||||
from autogpt.config import Config, Singleton
|
||||
from autogpt.config import Config
|
||||
from autogpt.singleton import Singleton
|
||||
from autogpt.speech import say_text
|
||||
|
||||
CFG = Config()
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
"""Base class for memory providers."""
|
||||
import abc
|
||||
|
||||
from autogpt.config import AbstractSingleton, Config
|
||||
from autogpt.config import Config
|
||||
from autogpt.singleton import AbstractSingleton
|
||||
|
||||
cfg = Config()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import abc
|
||||
from threading import Lock
|
||||
|
||||
from autogpt.config import AbstractSingleton
|
||||
from autogpt.singleton import AbstractSingleton
|
||||
|
||||
|
||||
class VoiceBase(AbstractSingleton):
|
||||
|
||||
Reference in New Issue
Block a user