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

Method inject

AgentBench.old/src/agent.py:28–34  ·  view source on GitHub ↗
(self, message: dict)

Source from the content-addressed store, hash-verified

26 self.model_inference = self.wrap_inference(model_inference)
27
28 def inject(self, message: dict) -> None:
29 assert isinstance(message, dict)
30 assert "role" in message and "content" in message
31 assert isinstance(message["role"], str)
32 assert isinstance(message["content"], str)
33 assert message["role"] in ["user", "agent"]
34 self.history.append(message)
35
36 def action(self, extend_messages: List[dict] = None) -> str:
37 extend = []

Callers 6

get_answerMethod · 0.80
processFunction · 0.80
inject_infoMethod · 0.80
alfworld_runMethod · 0.80
predictFunction · 0.80
predict_singleMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected