MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / make_conv_hf

Function make_conv_hf

eval/Coding/leetcode/evaluate_leetcode.py:70–77  ·  view source on GitHub ↗
(example, tokenizer)

Source from the content-addressed store, hash-verified

68
69
70def make_conv_hf(example, tokenizer):
71 system_prompt = open("system_prompt.md").read()
72 msg = [
73 {"role": "system", "content": system_prompt},
74 {"role": "user", "content": example["prompt_sft"] + "\n\nWrite Python code to solve the problem. Present the code in \n```python\nYour code\n```\nat the end."}
75 ]
76 chat = tokenizer.apply_chat_template(msg, tokenize=False, add_generation_prompt=True)
77 return chat
78
79samples = []
80del problems["start_time"]

Callers 1

Calls 1

readMethod · 0.45

Tested by

no test coverage detected