ChatGPT
Nouveautés
Version 1.0
First release
Ce qu’il fait
12 actions-
Text
-
If
-
Show AlertAdd your API Key
-
Stop This Shortcut
-
If
-
Ask for InputHello! How can I assist you today?
-
Get Contents of URLhttps://api.openai.com/v1/completions
-
Get Text from Input
-
Get Dictionary Value
-
Get Dictionary Value
-
Text
-
Show Result
Afficher en tant que code
Chaque action de ce raccourci écrite en Cherri, un langage de programmation pour Raccourcis. Idéal pour comprendre son fonctionnement.
#include 'actions/web'
#define color lightblue
#define glyph atom
const Text = "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"
if Text contains "" {
alert("Edit this shortcut and paste in your API Key ", "Add your API Key")
stop()
} else {
}
prompt("Hello! How can I assist you today?")
const ContentsOfURL = jsonRequest("https://api.openai.com/v1/completions", "POST", {
"max_tokens": 2000,
"model": "text-davinci-003",
"prompt": "{}"
}, {
"Authorization": "Bearer {Text}",
"Content-Type": "application/json"
})
const Text1 = getText(ContentsOfURL)
const DictionaryValue = getValue(Text1, "choices")
show()
Ouvrir dans Cherri Playground
Décompilé avec cherri 2.3.0 (GPL-2.0). Quelques corrections peuvent être nécessaires avant la compilation.
Notes et avis
Écrire un avis–
sur 5
★★★★★
★★★★
★★★
★★
★
0 ratings
Aucun avis pour le moment. Sois le premier à partager ton avis !
Publicité
Plus de rifatclcode4
Ça pourrait aussi te plaire
Publicité