MCPcopy Create free account
hub / github.com/Felixgithub2017/MMCU / gen_prompt

Function gen_prompt

TestChatGLM.py:46–53  ·  view source on GitHub ↗
(train_df, k=-1)

Source from the content-addressed store, hash-verified

44# 生成 prompt
45# 不提示专业科目,让模型直接理解题目
46def gen_prompt(train_df, k=-1):
47 prompt = "请阅读以下选择题并给出正确选项,不要解释原因。请只给出答案的序号。\n"
48 if k == -1:
49 k = train_df.shape[0]
50 for i in range(k):
51 prompt += format_example(train_df, i)
52
53 return prompt
54
55# chatglm
56def plain_chat(prompt):

Callers 1

evalFunction · 0.70

Calls 1

format_exampleFunction · 0.70

Tested by

no test coverage detected