diff --git a/pyproject.toml b/pyproject.toml index a6cf776..f0edca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "ada-python" -version = "0.3.0" +version = "0.3.1" description = "Ada, making LLMs easier to work with." authors = ["Will Beebe"] packages = [ diff --git a/src/agents/agent.py b/src/agents/agent.py index 472679f..569396c 100644 --- a/src/agents/agent.py +++ b/src/agents/agent.py @@ -12,7 +12,7 @@ logger = logging.getLogger(__name__) class Agent(LLM): - def __init__(self, client, tool_manager: ToolManager, system_prompt: str, tools=[], storage_manager: StorageManager = None): + def __init__(self, client, tool_manager: ToolManager, system_prompt: str = None, tools=[], storage_manager: StorageManager = None): self.tools = tools logger.debug("Initializing Agent with tools: %s and system prompt: '%s'", tools, system_prompt) super().__init__( diff --git a/src/agents/base.py b/src/agents/base.py new file mode 100644 index 0000000..34aa32b --- /dev/null +++ b/src/agents/base.py @@ -0,0 +1,26 @@ + + +from abcs.llm import LLM +from agents.agent import Agent +from storage.memory_storage import MemoryStorage +from tools.tool_manager import ToolManager + + +class Base(Agent): + def __init__(self, client: LLM, storage_manager: any = None): + tool_manager = ToolManager() + # override client tool manager + client.tool_manager = tool_manager + tools = client.load_tool_definitions() + + storage = storage_manager + if storage_manager is None: + storage = MemoryStorage() + client.storage_manager = storage_manager + + super().__init__( + client=client, + tool_manager=tool_manager, + tools=tools, + storage_manager=storage, + )