Git Product home page Git Product logo

yue-yang / chatgpt-siri Goto Github PK

View Code? Open in Web Editor NEW
3.6K 30.0 159.0 9.91 MB

Shortcuts for Siri using ChatGPT API gpt-3.5-turbo & gpt-4 model, supports continuous conversations, configure the API key & save chat records. 由 ChatGPT API gpt-3.5-turbo & gpt-4 模型驱动的智能 Siri,支持连续对话,配置API key,配置系统prompt,保存聊天记录。

Home Page: https://twitter.com/YueYangDev

License: MIT License

chatgpt chatgpt-api siri siri-shortcuts open-source chatgpt3

chatgpt-siri's Introduction

🤖️ ChatGPT Siri

Start the "Shortcut" through Siri to connect to the ChatGPT API, turning Siri into an AI chat assistant. You can speak your question directly to Siri, and Siri will answer you. Now our Siri has finally become intelligent and can talk to us fluently! And all this can be done with just a Shortcut and an API key.

Preparation

  • Ensure that the network can access the domain name https://api.openai.com.
  • Ensure that there is enough balance in the API account: https://platform.openai.com/account/usage.
  • Use Siri to start the shortcut: open Settings-> Siri Answer-> Automatic. Check "Always show what you say to Siri" to see if recognition is accurate. Ensure that Siri's language setting matches the language you are using.
  • For versions 1.2 and above, you need to turn on the "Settings" - Apple ID - iCloud - iCloud Drive function to use the save to TXT file function.

Other related issues

Shortcut Download

Click the link below to download shortcuts, support iPhone、iPad、Mac、HomePod、CarPlay.

ChatGPT Siri 1.0

Support continuous chatting, exit chatting, start new chatting, customize API key, customize prompt system message, customize hint message.

ChatGPT Siri 1.1

I recommend installing version 1.2, which saves chat logs with more chat details to a txt file for easier management.

Support continuous chatting, exit chatting, start new chatting, customize API key, customize prompt system message, customize hint message.

New feature: support for automatically saving chat records to the "Notes" app.

ChatGPT Siri 1.2

Support continuous chatting, exit chatting, start new chatting, customize API key, customize prompt system message, customize hint message.

New feature: automatically save chat data to a txt file, the record includes the sending and receiving time of each conversation, tokens consumption statistics.

Chat Records path: open the "Files" app, find the path: iCloud Drive/Shortcuts/ChatGPT-log to view the chat files, Supports iCloud sync.

You need to open 'Settings' - Apple ID - iCloud - iCloud Drive function to enable the feature of saving to txt file.

ChatGPT Siri 1.2.1

The function is the same as 1.2, with additional support for sharing text to Shortcuts via Share Sheet on iPad and iPhone, and sending text to Shortcuts through Quick Actions on Mac, for quickly launching Shortcuts.

ChatGPT Siri 1.2.2

The function is the same as 1.2.1, but with a bug fix for new chat.

ChatGPT Siri 1.2.3

The function is same as 1.2.2, with the following additions:

  1. Ability to select the model and support GPT-4;
  2. Automatically copy the last response to the clipboard;
  3. Save chat records in different folders by day;
  4. Add back the default system message.

ChatGPT Siri 1.2.4

The function is the same as 1.2.3, with a bug fix for potential issues with chats record directories in different language systems.

ChatGPT Siri 1.2.5

The function is the same as 1.2.4, with the following modifications:

  1. Added error message for not finding choices.
  2. Removed colon from chat log file name to avoid potential directory issues.

Currently, GPT-4 requires joining a waitlist. Once you join the waitlist, you will receive a confirmation email. Then, you need to wait for the invitation to use the GPT-4 API, and after you have qualified, you can see the GPT-4 model option for testing in the playground backend. If you do not have GPT-4 qualifications, please choose to use the GPT-3.5-Turbo model.

API key acquisition

To use the "shortcut" to call the ChatGPT API, an OpenAI API key is required. You can go to the OpenAI official website to get it for free, the steps are as follows:

  1. Go to https://platform.openai.com to register an account and log in.
  2. Click on the avatar in the upper right corner and select "View API keys".
  3. Click the "Create new secret key" button on the right side of the page to generate an API key.
  4. Copy the API key for backup. Note that the API key only appears once. If you forgot it, regenerate a new one.

Note: There is a fee to use the API, the price is $0.0020 / 1K tokens, 1k tokens is approximately equal to 750 words, or 500 Chinese characters. New users of OpenAI will have a credit of $5 to be used during your first 3 months. Therefore, it is best not to share the API key with others. If the API key is leaked, you can delete it in the OpenAI background and generate a new one.

Edit shortcut to replace API key

Open the "Shortcuts" app, find the downloaded "ChatGPT" shortcut, press and hold to select "Edit", and paste the above API key into the text box below.

How to use it

Start the "shortcut" with Siri, just say "Hey, Siri, ChatGPT", and then you can start chatting with Siri, our Siri has become very smart, enjoy! 🎉

update: I recommend you to change the default name because Siri cannot recognize "ChatGPT" accurately.

If you don't like the name, you can rename the shortcut, change it to any name you like, and then you can chat with Siri just say "Hey, Siri, xxx", xxx is the new name you chose, it's better not to add special symbols to the name. It’s hard to read the symbols 😂, If Siri cannot match the name of the shortcut, it won’t work!

Of course, you can also directly click the shortcut to use. At this time, it is used in the form of a dialog box, and it will not be read out. You can add it to your Home Screen for quick access. end 🎉

Advanced usage

This shortcut supports iPhone, iPad and Mac, supports continuous conversations, supports quit chat, new chat. The usage is as follows:

  • The default is to support continuous dialogue, which can record context and discuss issues continuously.
  • If you want to start a new chat, say "New chat" when it's our turn, Siri will start a new round of chat, which means that the previous context will be lost, and you can't continue chatting with the previous information.
  • If you want to quit ChatGPT to use the system's Siri, you can say "Quit chat" on your turn. Of course, you can also close Siri directly and open it again. But here it is more natural to provide the command to exit.

Customize name, icon and hint messages.

  • img1: Rename and choose icon
  • img2: Welcome and continue hints
img1 img2

Customize hint messages.

  • img1: Quit chat command, quit chat hint
  • img2: New chat command, new chat welcome hint
img1 img2

Customize system message

You can also customize system message, which help set the behavior of the assistant. In this "shortcut" system message is one of the default system messages of ChatGPT used:

You are ChatGPT, a large language model trained by OpenAI. Answer as concisely as possible. Knowledge cutoff: Sep 2021.

Modify method, edit the "shortcut", slide down, and find the position as shown in the figure:

For example, you can replace system message with the following:

I will let you act as a translator. Your goal is to translate any language into English. Please do not use an interpreter accent when translating, but to translate naturally, smoothly and authentically, using beautiful and elegant expressions.

Of course, you can also write it yourself, such as asking him to be a joker, a writer, a chef, etc. There are endless ways to play. You can also find a prompt written by someone else on the Internet, and fill it in here with a little modification. Here it is recommended to duplicate the "shortcut" and give the cope one a different name. For example, the shortcut for translation is called "My Translator", so you can just say "Hey, Siri, My Translator", and start a ChatGPT dedicated to translation.

Also you can directly say what you want the ChatGPT to be when it's your turn to say. For example ask him to help you as a translator. But it’s not as convenient as the “shortcut” above that specifically modifies the system message for translation. That “translator” can work directly, which is very nice! This is also the meaning of Prompt, you can customize the using scene first, and then use ChatGPT more efficiently. This is why there are so many awesome prompt tutorials on the Internet. We can build our own prompt suitable for us and let ChatGPT to be more powerful!

AI Image

1.0

1.1

Automatically save images to the photo album.

Contact

FAQ

👉 Questions

Star History

Star History Chart

chatgpt-siri's People

Contributors

ppyaoo avatar yue-yang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-siri's Issues

Error - could not ealuate the key path

Hi Yue-yang, I got it working on my iPhone 11 but having an issue with my iPhone 8... I would get this error:

Could not evaluate the key path, in "'', no value was found for dictionary key 'choices'.

Please help! Thanks!

Respond with voice / text to speech

Great job on what looks to be a super stable shortcut! I would love to have responses read out to me for hands free operation, would that be possible?

Bug

3DF4B40A-EB17-4E01-8A0F-38BBC5A2CA2D

It seems i have problem with dictionary, 😭. Any idea to fix it? Thanks

It lies to me that it is not GPT-3.5 but GPT-2

When I ask it (v.1.2.2) who are you and which language model you using it claims that it is ChatGPT-2 and it can't be ChatGPT-3.5 turbo. why it lies to me? it is using gpt-3.5-turbo in API.

GPT-4?

Any plans to change the model to gpt-4?

"Could not evaluate key path" error

On occasion during an exchange I get a pop-up that says, "In ', no value was found for dictionary key 'choices.'"

And in the shortcut, in red it states that above "Get Value for choices.1.message in Contents of URL"

error: The file doesn't exist

v1.2
iOS and MacOS

STEPS TO REPRO

  1. load the shortcut
  2. enter api key
  3. open shortcut
  4. enter New Chat (see welcome message)
  5. enter a question [fails "The file doesn't exist" at step Run Chat input new-chat-command]

Answer with numeric formula

When there are mathematical formulas in the answer, Siri does not interpret the response correctly and reads it imprecisely. One could add to the end of each question sent: 'Answer in textual format without using numbers or mathematical symbols, and writing out units of measurement in full, if present.' In this way, the response is completely in textual format and Siri is able to read it correctly. I do not know if there are other ways to do it, but this seems to work.

请求超时

之前在python的openai库中使用也是同样的情况,不使用代理的话就是报“请求超时”的错误,如果使用代理的话就会报“SSL错误”,请问你有遇到这样的问题吗,请问该如何解决?

Not always submitting prompt

Some questions seem to trigger the prompt with “at your service”. How do we force the shortcut to respond to everything that is not “new chat” or “bye”?

请问,如何修改成自己反向代理的URL呢?

我直接修改了其中的api.openai.com的那个URL,但是用起来就错误。是哪里的问题呢?

我反向代理的URL可以在其他的工具上正常使用,看起来是正常的。

如何在快捷指令中修改使用呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.