Use ChatGPT to reply to text messages.

135 views
Skip to first unread message

Purple_Bench

unread,
Aug 5, 2023, 4:55:36 PM8/5/23
to Automate
How can ChatGPT be used to reply to text messages? 
Should the "Shell Command" block be used? Or the "HTTP Request" block? 
It would be very helpful if someone could provide an example. 
I've included code below for an API call for chat gpt. All help and guidance is appreciated. Thank you. 


API_KEY="your_api_key_here"
API_URL="https://api.openai.com/v1/chat/completions"

curl -X POST $API_URL \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d '{
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Tell me a joke."}
  ]
}'

Henrik "The Developer" Lindqvist

unread,
Aug 18, 2023, 3:23:14 PM8/18/23
to Automate
Reply all
Reply to author
Forward
0 new messages