-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
) |