ShareShortcuts
Создать форк «Let’s Chat»

Создали что-то новое на основе этой команды? Поделитесь ей как форком: она станет вашей собственной командой, которой вы управляете, а обе страницы будут ссылаться друг на друга, чтобы knyl2013 получил(а) признание.

  1. 1Получите команду и измените её в приложении «Быстрые команды». Дайте ей собственное название.
  2. 2Поделись ею из приложения «Быстрые команды» и скопируй ссылку iCloud.
  3. 3Вернись сюда, вставь ссылку и опиши, что изменилось, например: «Добавлен шаг, который использует Apple Intelligence для персонализации текста».
Загрузки
37K
Сохранено
1
Действия
47
Категория
API
Версия
2.2
Язык
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.

Что нового

Версия 2.2

Updated system prompt

История версий
2.2 9 мар 2023 г.

Updated system prompt

2.1 9 мар 2023 г.

Updated "ADD API KEY HERE" message

2.0 9 мар 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 фев 2023 г.

Add support to Apple Watch

1.1 9 фев 2023 г.

update continue conversation prompt text

1.0 8 фев 2023 г.

First release

Что делает

Действий: 47
  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

Посмотреть как код
Бета

Все действия этой команды, записанные на Cherri — языке программирования для приложения «Быстрые команды». Отлично подходит, чтобы разобраться, как она работает.

#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)
}
Открыть в Cherri Playground Декомпилировано с помощью cherri 2.3.0 (GPL-2.0). Перед компиляцией могут понадобиться небольшие исправления.

Оценки и отзывы

Написать отзыв
–
из 5
★★★★★
★★★★
★★★
★★
★
0 ratings

Пока нет отзывов. Поделись мнением первым!

Реклама

Вам также может понравиться

См. все
Реклама