mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-09 08:14:27 +01:00
Hotfix/global agent manager workaround (#3157)
* Add indirection layer to entry point * Get around singleton pattern for AgentManager to fix tests
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
"""The application entry point. Can be invoked by a CLI or any other front end application."""
|
||||
|
||||
import logging
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
BIN
mem.sqlite3
Normal file
BIN
mem.sqlite3
Normal file
Binary file not shown.
@@ -8,6 +8,9 @@ from tests.utils import requires_api_key
|
||||
|
||||
@pytest.fixture
|
||||
def agent_manager():
|
||||
# Hack, real gross. Singletons are not good times.
|
||||
if AgentManager in AgentManager._instances:
|
||||
del AgentManager._instances[AgentManager]
|
||||
return AgentManager()
|
||||
|
||||
|
||||
@@ -23,7 +26,7 @@ def prompt():
|
||||
|
||||
@pytest.fixture
|
||||
def model():
|
||||
return "gpt-4"
|
||||
return "gpt-3.5-turbo"
|
||||
|
||||
|
||||
@requires_api_key("OPENAI_API_KEY")
|
||||
|
||||
Reference in New Issue
Block a user