Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Variable
- KEY = Your open ai key
- Code
- for the langue watch the tutorial
- $nomention
- $c[**⭐READ BEFORE USING⭐**
- **Please create the variable "KEY" in Bot Designer For Discord, then put the value to your Secret OpenAi Key.**
- Search in google OpenAi Key. Copy the key and Paste to the value.**USE BDSCRIPT 2**.
- ]
- $httpAddHeader[Content-Type;application/json]
- $httpAddHeader[Authorization;Bearer $getVar[KEY]]
- $httpPost[https://api.openai.com/v1/completions;{
- "model": "text-davinci-003",
- "prompt": "$message",
- "max_tokens": 200,
- "temperature": 0,
- "top_p": 1,
- "n": 1,
- "stream": false,
- "logprobs": null
- }]
- $textSplit[$httpResult;"]
- $title[ Ki]
- $description[$replaceText[
- $replaceText[$replaceText[$splitText[20];n;;2];\\;;2]
- ;\n\n;
- ]]
- $if[$replaceText[$replaceText[$replaceText[$splitText[20];n;;2];\\;;2];\n\n;]==]
- $description[no repsons from the server]
- Please change the KEY variable to your OpenAI API Key in Bot Designer For Discord
- $else
- $endif
Advertisement
Add Comment
Please, Sign In to add comment