-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changing cross-agent synchronization mechanism to socket-based with z… #25
Conversation
…eromq; Changed agent meta class to lazt intialization to resolve cross-process sync problems
Start to merge PR 25 since all other features depend on it. |
instruction="Test instruction", | ||
tools=[self.mock_tool], | ||
lm=self.mock_lm, | ||
prompter=BedrockConverseToolChatPrompter() | ||
) | ||
).name("TestAgent") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't mind moving name
functionality outside of init. But do we have any default naming mechanism for cases when traceability is desired but user didn't assign agent names, e.g. voting?
from chorus.data.dialog import Message | ||
|
||
|
||
class MockMessageClient(ChorusMessageClient): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this's not put in tests
folder instead?
try: | ||
observation = executor.execute(action) | ||
except Exception as e: | ||
import traceback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this import needed?
""" | ||
A team of agents that collaborate to achieve a goal. | ||
""" | ||
|
||
def name_to_identifier(self, name: str) -> str: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we need two difference concept of name
vs identifier
.
obj._init_kwargs = kwargs | ||
obj._agent_name = None | ||
|
||
# Immediately call __init__ instead of delayed initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what's this for?
@@ -30,7 +30,7 @@ class SimpleToolExecutor(ToolExecutor): | |||
""" | |||
|
|||
def __init__(self, tools: List[ExecutableTool], agent_context: Optional[AgentContext] = None, tolerate_error: bool = True): | |||
for tool in tools: | |||
for i, tool in enumerate(tools): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't seem needed
@@ -69,7 +69,7 @@ class AgentContext(OrchestrationContext): | |||
|
|||
agent_id: str | |||
team_info: Optional[TeamInfo] = None | |||
message_service: MessageService = Field(default_factory=MessageService) | |||
message_client: Optional[ChorusMessageClient] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we name-changed message_service
to message_client
everywhere. Any reason behind this?
Changing cross-agent synchronization mechanism to socket-based with zeromq; Changed agent meta class to lazy initialization to resolve cross-process sync problems
The developer interface will look like