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

Function get_prompt

eval_heldout/science-world/eval.py:174–184  ·  view source on GitHub ↗
(conv: Conversation)

Source from the content-addressed store, hash-verified

172 conv.append_message(conv.roles[i % 2], ex)
173
174def get_prompt(conv: Conversation) -> str:
175 if conv.name == 'openchat':
176 ret = ''
177 for role, message in conv.messages:
178 if message:
179 ret += role + ": " + message + conv.sep
180 else:
181 ret += role + ":"
182 return ret
183 else:
184 return conv.get_prompt()
185
186# Example user input console, to play through a game.
187def eval(args, task_num, logger):

Callers 1

evalFunction · 0.70

Calls 1

get_promptMethod · 0.80

Tested by

no test coverage detected