Fix plain_output for tests

pull/4935/head
Reinier van der Leer 2023-07-09 22:42:47 +02:00
parent c562fbf4bc
commit 2b56996a27
No known key found for this signature in database
GPG Key ID: 64035FE419545762
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ from autogpt.agent.agent import Agent
from autogpt.config import AIConfig, Config, ConfigBuilder
from autogpt.config.ai_config import AIConfig
from autogpt.llm.api_manager import ApiManager
from autogpt.logs import logger
from autogpt.memory.vector import get_memory
from autogpt.models.command_registry import CommandRegistry
from autogpt.prompts.prompt import DEFAULT_TRIGGERING_PROMPT
@ -52,6 +53,9 @@ def config(
if not os.environ.get("OPENAI_API_KEY"):
os.environ["OPENAI_API_KEY"] = "sk-dummy"
# HACK: this is necessary to ensure PLAIN_OUTPUT takes effect
logger.config = config
config.plugins_dir = "tests/unit/data/test_plugins"
config.plugins_config_file = temp_plugins_config_file