LLM:prompt指令数据制作

https://github.com/ymcui/Chinese-LLaMA-Alpaca

import openai
import json
import sys
import random

openai.api_key = ""   # you must provide your OpenAI API key before crawling
if not openai.api_key:
  raise ValueError("OpenAI API key not provided. Please set the 'openai.api_key' variable.")

def return_random_prompt():
  system_prompt = "你需要尽可能给出多样化的任务指令和对应的回答。我们将用于人工评估ChatGPT模型对指令的完成情况。要求:\n"

  # generate random topics
  topic_list = ["科技", "娱乐", "体育", "金融", "时政", "教育", "医疗", "旅游", "美食", "汽车", "房产", "文化", "历史", "地理", "自然", "人文", "社会", "法律", "军事", "政治", "经济", "文学", "艺术", "宗教", "哲学", "语言&#

你可能感兴趣的:(#,LLM/SFT,prompt)