MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / count

Function count

AgentBench.old/src/tasks/knowledgegraph/api.py:142–150  ·  view source on GitHub ↗

Count the number of a variable :param variable: a variable :return: the number of a variable

(variable: Variable, sparql_executor)

Source from the content-addressed store, hash-verified

140
141
142def count(variable: Variable, sparql_executor):
143 """
144 Count the number of a variable
145 :param variable: a variable
146 :return: the number of a variable
147 """
148 rtn_str = f"Observation: variable ##, which is a number"
149 new_variable = Variable("type.int", f"(COUNT {variable.program})")
150 return new_variable, rtn_str
151
152
153def get_attributes(variable: Variable, sparql_executor):

Callers

nothing calls this directly

Calls 1

VariableClass · 0.85

Tested by

no test coverage detected