Skip to content

Instantly share code, notes, and snippets.

@rolfbjarne
Created January 27, 2023 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rolfbjarne/f0a6b6646001996002e245dd45820ed3 to your computer and use it in GitHub Desktop.
Save rolfbjarne/f0a6b6646001996002e245dd45820ed3 to your computer and use it in GitHub Desktop.
$ curl https://api.openai.com/v1/completions -H "Content-Type: application/json" -H "Authorization: Bearer $API_KEY" -d '{"model": "text-davinci-003", "prompt": "Is this an inclusive code review comment: this is very good code!", "temperature": 0, "max_tokens": 70}'
{
"id": "cmpl-6dKMNKwvoYSF8SLD5Y2HSDakDZgqz",
"object": "text_completion",
"created": 1674831075,
"model": "text-davinci-003",
"choices":
[
{
"text": "\n\nYes, this is an inclusive code review comment.",
"index": 0,
"logprobs": null,
"finish_reason": "stop"
}
],
"usage":
{
"prompt_tokens": 14,
"completion_tokens": 12,
"total_tokens": 26
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment