Closed aixiaodewugege closed 10 months ago
The text for instruction can be found in our paper. You can follow the prompts in LLaVA to modify ~~
Thanks for your reply~ But I mean the code that using these prompt~~~
Any suggestion?
You can use it like this:
import openai
def call_chatgpt(chatgpt_messages, max_tokens=500, model="gpt-3.5-turbo"):
response = openai.ChatCompletion.create(model=model, messages=chatgpt_messages, temperature=0.6, max_tokens=max_tokens)
reply = response['choices'][0]['message']['content']
total_tokens = response['usage']['total_tokens']
return reply, total_tokens
chat = [
{
'role': 'system',
'content': "You are a good assistant. Follow the user's instructions carefully."
},
{
'role': 'user',
'content': 'Hello"
}
]
output = call_chatgpt(chat, max_tokens=500)[0]
Hi, I want to generate instruct data on my dataset with GPT4. But I don't know how to write the code. And I also notice that there is rate limit from openai. So I 'd like to have some suggestion or help from you~~~