ShareShortcuts

Nina 9000 - chatGPT (GPT-3)

Nina 9000 is here

nikluz
Fork “Nina 9000 - chatGPT (GPT-3)”

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å nikluz 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
35K
Gemt
0
Handlinger
50
Kategori
API
Version
1.0
Sprog
EN

Forhåndsvisning

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)

Nyheder

Version 1.0

First release

Versionshistorik
1.0 31. jan. 2023

First release

Hvad den gør

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

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'
#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()
Å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

Mere fra nikluz

Se alle

Du vil måske også kunne lide

Se alle
Annonce