Skip to content

Commit

Permalink
adding base, tooless agent
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBeebe committed Jul 11, 2024
1 parent e9ee74e commit 236a4a7
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 = [
Expand Down
2 changes: 1 addition & 1 deletion src/agents/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand Down
26 changes: 26 additions & 0 deletions src/agents/base.py
Original file line number Diff line number Diff line change
@@ -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,
)

0 comments on commit 236a4a7

Please sign in to comment.