MCPcopy Create free account
hub / github.com/THUDM/AgentBench / __init__

Method __init__

src/utils/rules.py:10–16  ·  view source on GitHub ↗

Check if target is in obj. `reverse`: if True, check if obj is in target

(self, target, reverse=False)

Source from the content-addressed store, hash-verified

8
9class ContainRule(RuleBase):
10 def __init__(self, target, reverse=False) -> None:
11 """
12 Check if target is in obj.
13 `reverse`: if True, check if obj is in target
14 """
15 self.target = target
16 self.reverse = reverse
17
18 def check(self, obj) -> bool:
19 if self.reverse:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected