| 657 | ) |
| 658 | |
| 659 | class Critic(ChatAgent): |
| 660 | def __init__(self, config: ChatAgentConfig): |
| 661 | super().__init__(config) |
| 662 | self.enable_message(QueryTool, use=False, handle=True) |
| 663 | self.enable_message(FeedbackTool, use=True, handle=True) |
| 664 | |
| 665 | def polinsky_query(self, msg: QueryTool) -> str: |
| 666 | # pass on the number so LLM can respond |
| 667 | return f"Is the Polinsky transform of {msg.number} equal to {msg.value}?" |
| 668 | |
| 669 | def polinsky_feedback(self, msg: FeedbackTool) -> str | DonePassTool: |
| 670 | """Pass on the feedback to the Requestor""" |
| 671 | return DonePassTool() if use_orch_tools else DONE + " " + PASS |
| 672 | |
| 673 | critic_agent = Critic( |
| 674 | ChatAgentConfig( |
no outgoing calls
searching dependent graphs…