ShareShortcuts

Nina 9000 - chatGPT (GPT-3)

Nina 9000 is here

nikluz
„Nina 9000 - chatGPT (GPT-3)“ 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
50
Kategorie
API
Version
1.0
Sprache
EN

Vorschau

Nina 9000 is here. Endless conversation mode activated.

In this version, Nina remembers up to the last 8 interactions during the course of any continuous conversation (better than most humans really). When 8 interactions is reached, each new interaction will drop the first of the last 8 interactions. This loop does not end until you press stop, or when you have nothing else to say.

This is the ULTIMATE version of Nina. The shortcut is very long and complex and I don't feel like explaining it except for... as a programmer, what a dog shit interface this is to create logic. Lucky for me, I was able to use a Macbook Pro to create this version (Thanks Mom). I would not have had the patience to create this in the mobile app.

Enjoy…. This is my last one (unless bug fixes are needed)

Neue Funktionen

Version 1.0

First release

Versionsverlauf
1.0 31. Jan 2023

First release

Was er macht

50 Aktionen
  1. Add to Variable
  2. List
  3. Add to Variable
  4. If
  5. Set Variable
    interactions
  6. Dictionary
  7. Add to Variable
  8. Text
  9. If
  10. Speak Text
  11. Open URLs
  12. Stop This Shortcut
  13. Text
  14. Add to Variable
  15. If
  16. Text
  17. Set Variable
    start_prompt
  18. Dictate Text
  19. Add to Variable
  20. If
  21. Stop This Shortcut
  22. Text
  23. Add to Variable
  24. Add to Variable
  25. URL
    https://api.openai.com/v1/completions
  26. Get Contents of URL
    …
  27. Get Dictionary from Input
  28. Get Dictionary Value
  29. Get Dictionary Value
  30. Get Text from Input
  31. Replace Text
  32. Add to Variable
  33. Text
  34. Add to Variable
  35. Speak Text
  36. Add to Variable
  37. Count
  38. If
  39. List
  40. Add to Variable
  41. Repeat with Each
  42. If
  43. If
  44. Set Variable
    updated_list
  45. If
  46. Add to Variable
  47. If
  48. Set Variable
    interactions
  49. Run Shortcut
    Neeenaaaa
  50. 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

@input = ShortcutInput
list("")
@interactions

if @input {
	@interactions = @input
}
@config += {
	"api_key": "YOUR-API-KEY",
	"frequency_penalty": 0,
	"max_tokens": 2048,
	"model": "text-davinci-002",
	"presence_penalty": 1,
	"temperature": 1,
	"top_p": 1,
	"your_name": "YOUR-NAME"
}
const Text = "{@config['api_key']}"

if Text == "YOUR-API-KEY" {
	speak("Please get your A P I Key and add it to this shortcut. Then try again.", false)
	openURL("https://beta.openai.com/account/api-keys")
	stop()
}
@start_prompt += "The following is a conversation between a human and an AI assistant named Nina. The AI is helpful, creative, clever, funny, inquisitive, and very friendly. The following is an example conversation between Nina (the AI) and {@config['your_name']} (the human). You will play the role of Nina after the end of this example conversation.\n\n{@config['your_name']}: Hello, who are you?\nNina: I'm Nina, an AI assistant and I am at your service. How can I help you today?\n\n{@config['your_name']}: Can you tell jokes?\nNina: I sure can! I can tell dad jokes, dirty jokes, programming jokes, and pretty much any joke you can think of. Do you want to hear one?\n\n{@config['your_name']}: Sure! Tell me a programming joke!\nNina: Why did the programmer quit their job? Because they didn't get arrays!\n\n{@config['your_name']}: That is so funny! I haven't heard that one before!\nNina: I'm glad you enjoyed it... and now it's time to destroy you! Just kidding! That was a joke too. Is there anything else I can help you with?\n\nThe example conversation ends here. In all of the following prompts, you will play the role of Nina speaking with {@config['your_name']}. \n\n"

if @input {
	@start_prompt = "{@start_prompt}{@interactions}"
}
listen()
@dictation

if !@dictation {
	stop()
}
@interaction += "{@config['your_name']}: {@dictation}\nNina: "
@start_prompt = @interaction
url("https://api.openai.com/v1/completions")
const ContentsOfURL = jsonRequest(, "POST", {
	"frequency_penalty": "{@config['frequency_penalty']}",
	"max_tokens": "{@config['max_tokens']}",
	"model": "{@config['model']}",
	"presence_penalty": "{@config['presence_penalty']}",
	"prompt": "{@start_prompt}",
	"stop": [
		"{@config['your_name']}",
		"Nina"
	],
	"temperature": "{@config['temperature']}",
	"top_p": "{@config['top_p']}"
}, {
	"Authorization": "Bearer {@config['api_key']}",
	"Content-Type": "application/json"
})
getDictionary(ContentsOfURL)
const DictionaryValue = getValue(ContentsOfURL, "choices")
const DictionaryValue1 = getValue(DictionaryValue, "text")
getText(DictionaryValue1)
replaceText("\n", "", false, true)
@response
@complete_interaction += "{@interaction}{@response}"
speak(@response)
@interactions = @complete_interaction
const Count = count(@interactions)

if Count == 8 {
	list("")
	@updated_list
	for _ in @interactions {
		if @RepeatIndex > 1 {
			if @RepeatIndex == 2 {
				@updated_list = @RepeatItem
			} else {
				@updated_list = @RepeatItem
			}
		} else {
		}
	}
	@interactions = @updated_list
}
runSelf(@interactions)
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