Refactor/rename agent subpackage to agents (#4961)

* Add links to github issues in the README and clarify run instructions

* Rename agent subpackage to agents

* Revert all unwanted changes

* Use relative import in `agents/__init__.py`

---------

Co-authored-by: Reinier van der Leer <github@pwuts.nl>
This commit is contained in:
James Collins
2023-07-13 07:31:49 -07:00
committed by GitHub
parent 4177c37b51
commit c9adedf746
26 changed files with 26 additions and 26 deletions

View File

@@ -1,3 +0,0 @@
from autogpt.agent.agent import Agent
__all__ = ["Agent"]

View File

@@ -0,0 +1,3 @@
from .agent import Agent
__all__ = ["Agent"]

View File

@@ -2,7 +2,7 @@ import functools
from pathlib import Path
from typing import Callable
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.logs import logger

View File

@@ -7,7 +7,7 @@ import docker
from docker.errors import DockerException, ImageNotFound
from docker.models.containers import Container as DockerContainer
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.config import Config
from autogpt.logs import logger

View File

@@ -8,7 +8,7 @@ import os.path
from pathlib import Path
from typing import Generator, Literal
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.logs import logger
from autogpt.memory.vector import MemoryItem, VectorMemory

View File

@@ -2,7 +2,7 @@
from git.repo import Repo
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.url_utils.validators import validate_url

View File

@@ -9,7 +9,7 @@ import openai
import requests
from PIL import Image
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.logs import logger

View File

@@ -3,7 +3,7 @@ from __future__ import annotations
from typing import NoReturn
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.logs import logger

View File

@@ -7,7 +7,7 @@ from itertools import islice
from duckduckgo_search import DDGS
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
DUCKDUCKGO_MAX_ATTEMPTS = 3

View File

@@ -27,7 +27,7 @@ from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
from webdriver_manager.microsoft import EdgeChromiumDriverManager as EdgeDriverManager
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.command_decorator import command
from autogpt.logs import logger
from autogpt.memory.vector import MemoryItem, get_memory

View File

@@ -4,7 +4,7 @@ import time
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.config import Config
from autogpt.llm.api_manager import ApiManager

View File

@@ -6,7 +6,7 @@ from typing import Optional
from colorama import Fore, Style
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.config.config import ConfigBuilder, check_openai_api_key
from autogpt.configurator import create_config
from autogpt.logs import logger

View File

@@ -6,7 +6,7 @@ from dataclasses import dataclass
from typing import TYPE_CHECKING, Optional
if TYPE_CHECKING:
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.config import Config
from autogpt.json_utils.utilities import extract_json_from_response

View File

@@ -1,4 +1,4 @@
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.config import AIConfig, Config, ConfigBuilder
from autogpt.main import COMMAND_CATEGORIES
from autogpt.memory.vector import get_memory

View File

@@ -3,7 +3,7 @@ from pathlib import Path
import pytest
from pytest_mock import MockerFixture
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.commands.execute_code import execute_python_file
from autogpt.workspace import Workspace
from tests.challenges.challenge_decorator.challenge_decorator import challenge

View File

@@ -6,7 +6,7 @@ import pytest
import yaml
from pytest_mock import MockerFixture
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.config import AIConfig, Config, ConfigBuilder
from autogpt.config.ai_config import AIConfig
from autogpt.llm.api_manager import ApiManager

View File

@@ -1,6 +1,6 @@
import pytest
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.config import AIConfig, Config
from autogpt.memory.vector import get_memory
from autogpt.models.command_registry import CommandRegistry

View File

@@ -7,7 +7,7 @@ import tempfile
import pytest
import autogpt.commands.execute_code as sut # system under testing
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.config import Config

View File

@@ -6,7 +6,7 @@ from unittest.mock import patch
import pytest
from PIL import Image
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.commands.image_gen import generate_image, generate_image_with_sd_webui

View File

@@ -1,7 +1,7 @@
import pytest
from pytest_mock import MockerFixture
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.commands.web_selenium import browse_website

View File

@@ -1,4 +1,4 @@
from autogpt.agent.agent import Agent, execute_command
from autogpt.agents.agent import Agent, execute_command
def test_agent_initialization(agent: Agent):

View File

@@ -12,7 +12,7 @@ import pytest
from pytest_mock import MockerFixture
import autogpt.commands.file_operations as file_ops
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.config import Config
from autogpt.memory.vector.memory_item import MemoryItem
from autogpt.memory.vector.utils import Embedding

View File

@@ -2,7 +2,7 @@ import pytest
from git.exc import GitCommandError
from git.repo.base import Repo
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.commands.git_operations import clone_repository

View File

@@ -4,7 +4,7 @@ from unittest.mock import MagicMock
import pytest
from autogpt.agent import Agent
from autogpt.agents import Agent
from autogpt.config import AIConfig
from autogpt.config.config import Config
from autogpt.llm.base import ChatModelResponse, ChatSequence, Message

View File

@@ -3,7 +3,7 @@ import json
import pytest
from googleapiclient.errors import HttpError
from autogpt.agent.agent import Agent
from autogpt.agents.agent import Agent
from autogpt.commands.web_search import google, safe_google_results, web_search