ShareShortcuts

Let’s Chat

knyl2013
Dupliquer « Let’s Chat »

Tu as créé quelque chose de nouveau à partir de ce raccourci ? Partage-le comme version dérivée : il devient un raccourci à toi, que tu gères, et les deux pages renvoient l’une vers l’autre pour que knyl2013 soit crédité.

  1. 1Obtenez le raccourci et modifiez-le dans l’app Raccourcis. Donnez-lui un nom bien à lui.
  2. 2Partage-le depuis l’app Raccourcis et copie le lien iCloud.
  3. 3Reviens ici, colle le lien et décris ce qui change, par exemple : « Ajout d’une étape qui utilise Apple Intelligence pour personnaliser le texte. »
Créer mon fork
Téléchargements
37K
Enregistré
1
Actions
47
Catégorie
API
Version
2.2
Langue
EN

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.

Nouveautés

Version 2.2

Updated system prompt

Historique des versions
2.2 9 mars 2023

Updated system prompt

2.1 9 mars 2023

Updated "ADD API KEY HERE" message

2.0 9 mars 2023

Updated to use GPT-3.5, the price is 10% of the old model and should be even better at chatting 🥳

1.2 26 févr. 2023

Add support to Apple Watch

1.1 9 févr. 2023

update continue conversation prompt text

1.0 8 févr. 2023

First release

Ce qu’il fait

47 actions
  1. Text
  2. If
  3. Show Alert
    Add your API Key
  4. Stop This Shortcut
  5. If
  6. Text
  7. Set Variable
    system_prompt
  8. Text
  9. Set Variable
    messages
  10. Set Variable
    key
  11. Text
  12. Text
  13. Text
  14. Set Variable
    Conversation
  15. Get Device Details
  16. If
  17. Get Clipboard
  18. If
  19. Set Variable
    messages
  20. Set Variable
    prompt
  21. If
  22. Set Variable
    prompt
  23. If
  24. Set Variable
    prompt
  25. Repeat
  26. If
  27. Set Variable
    prompt
  28. If
  29. Ask for Input
    …
  30. Set Variable
    question
  31. Replace Text
  32. Set Variable
    updatedquest
  33. Text
  34. Add to Variable
  35. Text
  36. Get Contents of URL
    https://api.openai.com/v1/chat/completions
  37. Get Text from Input
  38. Get Dictionary Value
  39. Get Dictionary Value
  40. Get Dictionary Value
  41. Text
  42. Replace Text
  43. Set Variable
    updatedres
  44. Text
  45. Add to Variable
  46. Set Variable
    prompt
  47. Copy to Clipboard

Afficher en tant que code
Bêta

Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.

#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)
}
Ouvrir dans Cherri Playground Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.

Notes et avis

Écrire un avis
–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Aucun avis pour le moment. Sois le premier à partager ton avis !

Publicité

Ça pourrait aussi te plaire

Tout afficher
Publicité