ShareShortcuts
Fork “Let’s Chat”

Har du bygget noget nyt oven på denne genvej? Del den som en fork: den bliver din egen genvej, som du styrer, og begge sider linker til hinanden, så knyl2013 får kredit.

  1. 1Hent genvejen og ret den i Genveje-appen. Giv den sit eget navn.
  2. 2Del den fra Genveje-appen og kopiér iCloud-linket.
  3. 3Kom tilbage hertil, indsæt linket og beskriv, hvad der er anderledes, fx “Tilføjet et trin, der bruger Apple Intelligence til at gøre teksten mere personlig.”
Downloads
37K
Gemt
1
Handlinger
47
Kategori
API
Version
2.2
Sprog
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.

Nyheder

Version 2.2

Updated system prompt

Versionshistorik
2.2 9. mar. 2023

Updated system prompt

2.1 9. mar. 2023

Updated "ADD API KEY HERE" message

2.0 9. mar. 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. feb. 2023

Add support to Apple Watch

1.1 9. feb. 2023

update continue conversation prompt text

1.0 8. feb. 2023

First release

Hvad den gør

47 handlinger
  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

Vis som kode
Beta

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)
}
Åbn i Cherri Playground Dekompileret med cherri 2.3.0 (GPL-2.0). Kan kræve små rettelser, før den kan kompileres.

Bedømmelser og anmeldelser

Skriv en anmeldelse
–
ud af 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Ingen anmeldelser endnu. Vær den første!

Annonce

Du vil måske også kunne lide

Se alle
Annonce