Skip to content

Instantly share code, notes, and snippets.

@gducharme
Last active February 2, 2023 14:15
Show Gist options
  • Select an option

  • Save gducharme/e21e58e1cedcac1c81d4cd336de5e6a7 to your computer and use it in GitHub Desktop.

Select an option

Save gducharme/e21e58e1cedcac1c81d4cd336de5e6a7 to your computer and use it in GitHub Desktop.
#export OPENAI_TOKEN=
# models can be expensive or cheap.
# text-davinci-003 is powerful and is 0.002 dollar per token
# Get a token from https://beta.openai.com/account/api-keys
curl https://api.openai.com/v1/completions \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $OPENAI_TOKEN" \
-v \
-d '{
"model": "text-davinci-003",
"prompt": "When I use a curl command to search for prs on api.github.com/search/issues, I receive an error message saying (The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.) but I can see them inside of github search interface",
"max_tokens": 2000,
"temperature": 0
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment