This hacky project aims to improve the functionality of Siri by utilizing ChatGPT. The project is inspired by the frustration of encountering Siri's default response of "I've found this on the web" when asked to perform tasks that are not straightforward.
To run the project, you will need to have Docker and Docker Compose installed on your machine. Once you have these dependencies installed, follow the steps below:
- Clone this repository to your local machine.
- Navigate to the root directory.
- Copy the
.env.example
file to a new file called.env
usingcp .env.example .env
. - Open the
.env
file in your text editor and set theOPEN_AI_SESSION_KEY
variable by following the instructions provided in the file.- You can find the session token by visiting https://chat.openai.com/api/auth/session.
- Press F12 to open console.
- Go to Application > Cookies.
- Copy the session token value in
__Secure-next-auth.session-token
.
- Run
docker compose up
to start the project. This will build the necessary Docker images and start the container. - Once the container is running, the API will be exposed on 0.0.0.0:5001.
To configure Siri to use the API:
- Open the Shortcuts app on your iPhone.
- Create a new shortcut.
- Add a "URL" action.
- Set the URL to
http://<YOUR_IP_ADDRESS>:5001/
. - Add an "Ask for Input" action.
- Set the question to "What do you want to ask GPT?"
- Set the variable to "text".
- Add a "Get Contents of URL" action.
- Set the URL to the variable URL you defined earlier.
- Set the method to "POST".
- Set the request body to JSON.
- Add a field to the body called "message" and set it to "Provided Input".
- Add a "Speak" action.
- Set the text to "Contents of URL".
- Rename the shortcut to something like "Ask GPT" or "Hey GPT".
- Save the shortcut.
You can now trigger the shortcut using the prompt "Hey Siri Hey GPT" or whatever you named the shortcut.
Please note that this is not an official product of OpenAI and is not affiliated with the company in any way. It is a personal project and any use of it is at the user's own risk. The developer of this project is not responsible for any liabilities or legal issues that may arise from its use.