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

Method openchat_v3_2

AgentBench.old/src/agents/tgi_client.py:58–67  ·  view source on GitHub ↗
(messages: List[Dict[str, str]])

Source from the content-addressed store, hash-verified

56
57 @staticmethod
58 def openchat_v3_2(messages: List[Dict[str, str]]):
59 prompt = ""
60 role_dict = {
61 "user": "GPT4 User: {content}<|end_of_turn|>",
62 "agent": "GPT4 Assistant: {content}<|end_of_turn|>",
63 }
64 for item in messages:
65 prompt += role_dict[item['role']].format(content=item['content'])
66 prompt += "GPT4 Assistant:"
67 return {"prompt": prompt}
68
69
70class TGIAgent(Agent):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected