How To integrate ChatGPT into Siri on your iPhone
本文最后更新于:2024年8月9日 晚上
This is a question and answer be generated from the ChatGDP on how to integrate chat-GPT into Siri
Very interesting. This is a war between artificial intelligence VS home assistance. This is the revolutionary just like first iPhone first come up, it’s about a game changing about all related industry and it’s a revolutionary. Should we be worried about ? I don’t know we’ll see.
Ask:
How to integrate ChatGPT into Siri, when I say Hi Siri, ask something to Siri, Siri will turn ChatGPT for answers and Siri will read the answers back to me as response, maybe you can show me how to craete shortcut to do so in IPhone, I need very specific steps including how to authorization to chatGPT
Answer
Sure, here are the detailed steps to integrate ChatGPT into Siri and create a shortcut to ask Siri to chat with ChatGPT on your iPhone:
- Create an OpenAI API Key:
- If you don’t already have an OpenAI account, sign up for a new account at https://beta.openai.com/signup/.
- In your OpenAI account dashboard, click on the “API Keys” tab, then click on the “New API Key” button to create a new API Key.
- Remember this API Key, you’ll need to use it in the following steps.
- Create a new Siri Shortcut:
- Open the Shortcuts app on your iPhone.
- Tap the “+” button in the top right corner to create a new Shortcut.
- Tap “Add Action” and search for “Text”, then add a new “Text” action.
- In the text field of the “Text” action, type “Ask ChatGPT: “ (or any phrase you want Siri to respond with).
- Tap “Done” to save the “Text” action.
- Add an OpenAI API request to the Siri Shortcut:
- Tap “Add Action” and search for “Get Contents of URL”, then add a new “Get Contents of URL” action.
- In the “Get Contents of URL” action, paste the following URL: https://api.openai.com/v1/engines/davinci-codex/completions
- In the “Headers” section, add a new header with the key “Authorization” and value “Bearer [YOUR OPENAI API KEY]” (replace “[YOUR OPENAI API KEY]” with the API Key you obtained in step 1).
- In the “Query” section, add a new item with the key “prompt” and value “Hey Siri, [Ask Question]” (replace “[Ask Question]” with the variable Siri will ask you).
- In the “Result” section, tap “Show More” and select “Text”.
- Customize the response for the Siri Shortcut:
- Tap “Add Action” and search for “Text”, then add a new “Text” action.
- In the text field of the “Text” action, type “ChatGPT response: “ (or any phrase you want Siri to respond with).
- Tap “Done” to save the “Text” action.
- Finish and test the Siri Shortcut:
- Tap “Done” to finish the Siri Shortcut.
- Test the Siri Shortcut by activating Siri and saying “Hey Siri, [Ask Question]”. Siri will ask you for the variable you added in step 3.
- After providing the variable, Siri will call the OpenAI API to retrieve a response from ChatGPT and read it back to you.
How To integrate ChatGPT into Siri on your iPhone
https://git.msft.vip/2023/02/19-How-To-integrate-ChatGPT-into-Siri-on-your-iPhone/