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

Function gen_prompt

TestChatGPT.py:44–51  ·  view source on GitHub ↗
(train_df, k=-1)

Source from the content-addressed store, hash-verified

42# 生成 prompt
43# 不提示专业科目,让模型直接理解题目
44def gen_prompt(train_df, k=-1):
45 prompt = "请阅读以下选择题并给出正确选项,不要解释原因。\n"
46 if k == -1:
47 k = train_df.shape[0]
48 for i in range(k):
49 prompt += format_example(train_df, i)
50
51 return prompt
52
53# chatgpt api
54# 将此函数替换为付费api

Callers 1

evalFunction · 0.70

Calls 1

format_exampleFunction · 0.70

Tested by

no test coverage detected