mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04: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
|
logs
|
||||||
*.log
|
*.log
|
||||||
*.mp3
|
*.mp3
|
||||||
|
mem.sqlite3
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
"""Agent manager for managing GPT agents"""
|
"""Agent manager for managing GPT agents"""
|
||||||
from __future__ import annotations
|
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.llm_utils import create_chat_completion
|
||||||
|
from autogpt.singleton import Singleton
|
||||||
from autogpt.types.openai import Message
|
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.ai_config import AIConfig
|
||||||
from autogpt.config.config import Config, check_openai_api_key
|
from autogpt.config.config import Config, check_openai_api_key
|
||||||
from autogpt.config.singleton import AbstractSingleton, Singleton
|
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"check_openai_api_key",
|
"check_openai_api_key",
|
||||||
"AbstractSingleton",
|
|
||||||
"AIConfig",
|
"AIConfig",
|
||||||
"Config",
|
"Config",
|
||||||
"Singleton",
|
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ from auto_gpt_plugin_template import AutoGPTPluginTemplate
|
|||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
from autogpt.config.singleton import Singleton
|
from autogpt.singleton import Singleton
|
||||||
|
|
||||||
load_dotenv(verbose=True, override=True)
|
load_dotenv(verbose=True, override=True)
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ from logging import LogRecord
|
|||||||
|
|
||||||
from colorama import Fore, Style
|
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
|
from autogpt.speech import say_text
|
||||||
|
|
||||||
CFG = Config()
|
CFG = Config()
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
"""Base class for memory providers."""
|
"""Base class for memory providers."""
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
from autogpt.config import AbstractSingleton, Config
|
from autogpt.config import Config
|
||||||
|
from autogpt.singleton import AbstractSingleton
|
||||||
|
|
||||||
cfg = Config()
|
cfg = Config()
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import abc
|
import abc
|
||||||
from threading import Lock
|
from threading import Lock
|
||||||
|
|
||||||
from autogpt.config import AbstractSingleton
|
from autogpt.singleton import AbstractSingleton
|
||||||
|
|
||||||
|
|
||||||
class VoiceBase(AbstractSingleton):
|
class VoiceBase(AbstractSingleton):
|
||||||
|
|||||||
Reference in New Issue
Block a user