MCPcopy Index your code
hub / github.com/langroid/langroid / Critic

Class Critic

tests/main/test_task.py:659–671  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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(

Callers 1

test_task_2_agent_2_toolFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_task_2_agent_2_toolFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…