Skip to content

Instantly share code, notes, and snippets.

@rana01645
Created March 5, 2023 08:59
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 rana01645/60027589abb0c7bc164149f9cd98b089 to your computer and use it in GitHub Desktop.
Save rana01645/60027589abb0c7bc164149f9cd98b089 to your computer and use it in GitHub Desktop.
write a php api class for this
curl https://api.openai.com/v1/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-3.5-turbo",
"messages": [{"role": "user", "content": "What is the OpenAI mission?"}]
}'
@NasirNobin
Copy link

NasirNobin commented Mar 5, 2023

write a php api class for openai completions using gpt-3.5-turbo use guzzle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment