ShareShortcuts

Nina One - ChatGPT (GPT3)

This is the "improved version" of Nina (Zero)

nikluz
„Nina One - ChatGPT (GPT3)“ forken

Hast du auf Basis dieses Kurzbefehls etwas Neues erstellt? Teile ihn als Fork: Er wird zu deinem eigenen Kurzbefehl, den du selbst verwaltest, und beide Seiten verlinken aufeinander, damit nikluz die Anerkennung erhält.

  1. 1Lade den Kurzbefehl und ändere ihn in der Kurzbefehle-App. Gib ihm einen eigenen Namen.
  2. 2Teile ihn in der Kurzbefehle-App und kopiere den iCloud-Link.
  3. 3Komm hierher zurück, füge den Link ein und beschreibe, was sich geändert hat, z. B. „Einen Schritt hinzugefügt, der Apple Intelligence nutzt, um den Text zu personalisieren.“
Downloads
35K
Gesichert
0
Aktionen
42
Kategorie
API
Version
1.0
Sprache
EN

Vorschau

This is the "improved version" of Nina (Zero). Conversation can be held up to a certain extent (maybe 50 interactions)

DISCLAIMERS

Disclaimer #1: this is not a complete Siri “replacement”. If you want to DO THINGS, like setting an alarm, use Siri. HOWEVER, if you want to have an interesting conversation where you can ask it pretty much anything and get a response, this will outperform Siri a million percent.

Disclaimer #2: I believe openAI has cut off free credits towards using the API, so you will likely need to add a payment method to your openAI API account in order to use this shortcut (which uses the API). It costs about a penny per 5 “calls” to the API. So, you are looking at around $1 for 500 “calls” to the API. In my opinion, it’s a negligible amount, but you can make your decision on that.

INSTRUCTIONS

Same instructions as before, just go into the shortcut and put in your API key, or it will prompt you to do so. Also, I accidentally left my name in there(Nikki), so just change it to yours.

This is not text based. This is pure voice chat. In my opinion, this is a better experience than typing in questions (and it’s actually a lot faster). Hopefully Apple will give us some better speaking voices in the future.

This is an update to my previous shortcut (Nina Zero) who could only answer one question at a time using the openAI API. This time, conversations can be held, but not indefinitely (tokens will eventually run out due to how I am keeping the conversation going). However, my next iteration, Nina 9000, will be able to hold conversations indefinitely. Enjoy.

Neue Funktionen

Version 1.0

First release

Versionsverlauf
1.0 29. Jan 2023

First release

Was er macht

42 Aktionen
  1. If
  2. Set Variable
    input
  3. Text
  4. Set Variable
    APIKEY
  5. If
  6. Text
  7. Set Variable
    warning
  8. Speak Text
  9. Text
  10. Set Variable
    keylink
  11. Open URLs
  12. Stop This Shortcut
  13. Text
  14. Set Variable
    yourname
  15. If
  16. Set Variable
    prompt
  17. If
  18. Text
  19. Set Variable
    prompt
  20. Dictate Text
  21. Set Variable
    message
  22. Text
  23. Add to Variable
  24. URL
    https://api.openai.com/v1/completions
  25. Get Contents of URL
    …
  26. Get Dictionary from Input
  27. Get Dictionary Value
  28. Get Dictionary Value
  29. Set Variable
    response
  30. Speak Text
  31. Replace Text
  32. Add to Variable
  33. Text
  34. Add to Variable
  35. Dictate Text
  36. If
  37. Stop This Shortcut
  38. If
  39. Text
  40. Add to Variable
  41. Run Shortcut
    Nina One
  42. Stop This Shortcut

Als Code ansehen
Beta

Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.

#include 'actions/web'
#include 'actions/text'
#define color green
#define glyph twoCartoonHearts


if ShortcutInput {
	@input = ShortcutInput
}
@APIKEY = "API-KEY-HERE"

if @APIKEY == "API-KEY-HERE" {
	@warning = "You need to update this shortcut with your A P I key to use the AI assistant. \n\nPlease go to beta dot open A I dot com slash account slash A P I dash keys to get your A P I Key.\n\nThen open the shortcuts app and edit this shortcut by replacing \\"A P I-KEY-HERE\\" with your A P I key"
	speak(@warning, false)
	@keylink = "https://beta.openai.com/account/api-keys"
	openURL(@keylink)
	stop()
}
@yourname = "Nikki"

if @input {
	@prompt = @input
} else {
	@prompt = "The following is a conversation with an AI assistant named Nina. The AI is helpful, creative, clever, and very friendly. The following is an example conversation between Nina (the AI) and Nikki (the human). You will play the role of Nina after the end of the example conversation.\n\n{@yourname}: Hello, who are you?\nNina: I'm Nina, an AI assistant. How can i help you?\n\n{@yourname}: What is 2 + 2?\nNina: 2 + 2 is 4.\n\n{@yourname}: Thank you so much!\nNina: No problem at all, that was an easy one.\n\n"
	listen("After Short Pause", "en-US")
	@message
	@prompt += "{@yourname}: {@message}\nNina: "
}
url("https://api.openai.com/v1/completions")
const ContenuDeLURL = jsonRequest(, "POST", {
	"frequency_penalty": 0,
	"max_tokens": 2048,
	"model": "text-davinci-002",
	"presence_penalty": 1,
	"prompt": "{@prompt}",
	"temperature": 1,
	"top_p": 1
}, {
	"Authorization": "Bearer {@APIKEY}",
	"Content-Type": "application/json"
})
const Dictionnaire = getDictionary(ContenuDeLURL)
const ValeurDuDictionnaire = getValue(Dictionnaire, "choices")
@response = ValeurDuDictionnaire['text']
speak(@response)
replaceText("\n", "\"\"", @response)
@prompt = @response
@prompt += "\n{@yourname}: "
const DictatedText = listen()

if !DictatedText {
	stop()
} else {
	@prompt += "{DictatedText}\nNina: "
	runSelf(@prompt)
}
stop()
In Cherri Playground öffnen Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.

Bewertungen und Rezensionen

Rezension schreiben
–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Werbung

Mehr von nikluz

Alle anzeigen

Das gefällt dir vielleicht auch

Alle anzeigen
Werbung