Features:
- GPT-3 powered chatbot (the same technology used by ChatGPT)
- Keep asking follow up questions
- Remember previous conversations even if it is closed
How to use:
1) Download the shortcut
2) Edit the shortcut
3) Replace with your openai key
3.1) You can get your api keys here https://platform.openai.com/account/api-keys
4) Run the shortcut manually by clicking the play button
5) Allow all accesses when it prompts
6) Say "Hey Siri let's chat"
7) Enjoy
p.s. conversation log will be saved in the clipboard, clear the clipboard or copy something else into it will clear previous conversation
Updates:
9 Mar:
1) Updated to use GPT-3.5 model. The price is 10% of the old model and should be better at chatting in general.
2) Feel free to change the system prompt to play with it (The text begins with "You are the AI who is helpful, creative, clever, ...")
3) Fixed double quote in question/answer that potentially leads to "What's the text" bug.
Nyheder
Updated system prompt
Hvad den gør
47 handlinger-
Text
-
If
-
Show AlertAdd your API Key
-
Stop This Shortcut
-
If
-
Text
-
Set Variablesystem_prompt
-
Text
-
Set Variablemessages
-
Set Variablekey
-
Text
-
Text
-
Text
-
Set VariableConversation
-
Get Device Details
-
If
-
Get Clipboard
-
If
-
Set Variablemessages
-
Set Variableprompt
-
If
-
Set Variableprompt
-
If
-
Set Variableprompt
-
Repeat
-
If
-
Set Variableprompt
-
If
-
Ask for Input…
-
Set Variablequestion
-
Replace Text
-
Set Variableupdatedquest
-
Text
-
Add to Variable
-
Text
-
Get Contents of URLhttps://api.openai.com/v1/chat/completions
-
Get Text from Input
-
Get Dictionary Value
-
Get Dictionary Value
-
Get Dictionary Value
-
Text
-
Replace Text
-
Set Variableupdatedres
-
Text
-
Add to Variable
-
Set Variableprompt
-
Copy to Clipboard
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#include 'actions/web'
#include 'actions/text'
#include 'actions/sharing'
#include 'actions/device'
#define color violet
#define glyph musicWaveForm
const Text = "ADD API KEY HERE"
if Text contains "ADD API KEY HERE" {
alert("Edit this shortcut and paste in your API Key ", "Add your API Key")
stop()
} else {
}
@system_prompt = "You are the AI who is helpful, creative, clever, and very friendly. The human is using voice-to-text so the text might not be very accurate. Try your best to answer the question. Keep all answers in one paragraph."
@messages = ""
@key = Text
@Conversation = "Previous conversation detected from clipboard. You can ask the next follow up question or say 'Give me the summary so far'"
const DeviceName = getDeviceDetail("")
if DeviceName !contains "Watch" {
const Clipboard = getClipboard()
if Clipboard contains "\"role\": \"user\", \"content\"" {
@messages
@prompt
} else {
@prompt
}
} else {
@prompt
}
repeat _ for 999 {
if !@prompt {
@prompt
} else {
}
prompt(@prompt, "Text")
@question
replaceText("(\“|\”|\")", "\'", @question, true)
@updatedquest
@messages += ",{\\"role\\": \\"user\\", \\"content\\": \\"{@updatedquest}\\"}"
const Text1 = "{\n \\"model\\" : \\"gpt-3.5-turbo\\",\n \\"messages\\": [\n {\\"role\\": \\"system\\", \\"content\\": \\"{@system_prompt}\\"} {@messages}\n ]\n}"
const ContentsOfURL = fileRequest("https://api.openai.com/v1/chat/completions", "POST", Text1, {
"Authorization": "Bearer {@key}",
"Content-Type": "application/json"
})
const Text2 = getText(ContentsOfURL)
const DictionaryValue = getValue(Text2, "choices")
const DictionaryValue1 = getValue(DictionaryValue, "message")
replaceText("(\“|\”|\")", "'", true)
@updatedres
@messages += ",{ \\"role\\": \\"assistant\\", \\"content\\": \\"{@updatedres}\\" }"
@prompt
setClipboard(@messages)
}
Bedømmelser og anmeldelser
Skriv en anmeldelseIngen anmeldelser endnu. Vær den første!