MCPcopy Index your code
hub / github.com/THUDM/AgentBench / count

Method count

src/server/tasks/knowledgegraph/api.py:140–146  ·  view source on GitHub ↗

Count variable cardinality. Returns (new_variable(number), "Observation: ...").

(self, variable: Variable)

Source from the content-addressed store, hash-verified

138 return new_variable, rtn_str
139
140 def count(self, variable: Variable):
141 """
142 Count variable cardinality. Returns (new_variable(number), "Observation: ...").
143 """
144 rtn_str = f"Observation: variable ##, which is a number"
145 new_variable = Variable("type.int", f"(COUNT {variable.program})")
146 return new_variable, rtn_str
147
148 def get_attributes(self, variable: Variable):
149 """

Callers 1

_clean_mysql_resultMethod · 0.80

Calls 1

VariableClass · 0.85

Tested by

no test coverage detected