Skip to content

Commit 236a4a7

Browse files
committed
adding base, tooless agent
1 parent e9ee74e commit 236a4a7

File tree

3 files changed

+28
-2
lines changed

3 files changed

+28
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "ada-python"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
description = "Ada, making LLMs easier to work with."
55
authors = ["Will Beebe"]
66
packages = [

src/agents/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
logger = logging.getLogger(__name__)
1313

1414
class Agent(LLM):
15-
def __init__(self, client, tool_manager: ToolManager, system_prompt: str, tools=[], storage_manager: StorageManager = None):
15+
def __init__(self, client, tool_manager: ToolManager, system_prompt: str = None, tools=[], storage_manager: StorageManager = None):
1616
self.tools = tools
1717
logger.debug("Initializing Agent with tools: %s and system prompt: '%s'", tools, system_prompt)
1818
super().__init__(

src/agents/base.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
3+
from abcs.llm import LLM
4+
from agents.agent import Agent
5+
from storage.memory_storage import MemoryStorage
6+
from tools.tool_manager import ToolManager
7+
8+
9+
class Base(Agent):
10+
def __init__(self, client: LLM, storage_manager: any = None):
11+
tool_manager = ToolManager()
12+
# override client tool manager
13+
client.tool_manager = tool_manager
14+
tools = client.load_tool_definitions()
15+
16+
storage = storage_manager
17+
if storage_manager is None:
18+
storage = MemoryStorage()
19+
client.storage_manager = storage_manager
20+
21+
super().__init__(
22+
client=client,
23+
tool_manager=tool_manager,
24+
tools=tools,
25+
storage_manager=storage,
26+
)

0 commit comments

Comments
 (0)