openai-cookbook
openai-cookbook copied to clipboard
Repeating Instruction Examples
Is there a way if I want to query a model for a similar question + set of instruction to avoid passing the instruction every time? eg.
prompt = ['which categories does this <thing> fall in from the list below?\n - fruit \n -vegetable \n etc.']
response = openai.Completion.create(model="text-davinci-003",
prompt=prompt,
temperature=0.0,
max_tokens=256,
top_p=1,
frequency_penalty=0,
presence_penalty=0
)
I want to ask this question for a lot of different <things>
, and avoid being billed every time for the same words & instructions.