Tutorials_for_BDFD

ChatGPT with /

Mar 29th, 2023
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Variable
  2.  
  3. KEY = Your open ai key
  4.  
  5.  
  6. Code
  7. for the langue watch the tutorial
  8.  
  9. $nomention
  10. $c[**⭐READ BEFORE USING⭐**
  11.  
  12.  
  13. **Please create the variable "KEY" in Bot Designer For Discord, then put the value to your Secret OpenAi Key.**
  14.  
  15. Search in google OpenAi Key. Copy the key and Paste to the value.**USE BDSCRIPT 2**.
  16.  
  17. ]
  18. $httpAddHeader[Content-Type;application/json]
  19. $httpAddHeader[Authorization;Bearer $getVar[KEY]]
  20. $httpPost[https://api.openai.com/v1/completions;{
  21. "model": "text-davinci-003",
  22. "prompt": "$message",
  23. "max_tokens": 200,
  24. "temperature": 0,
  25. "top_p": 1,
  26. "n": 1,
  27. "stream": false,
  28. "logprobs": null
  29. }]
  30. $textSplit[$httpResult;"]
  31.  
  32. $title[ Ki]
  33. $description[$replaceText[
  34. $replaceText[$replaceText[$splitText[20];n;;2];\\;;2]
  35. ;\n\n;
  36. ]]
  37.  
  38. $if[$replaceText[$replaceText[$replaceText[$splitText[20];n;;2];\\;;2];\n\n;]==]
  39. $description[no repsons from the server]
  40. Please change the KEY variable to your OpenAI API Key in Bot Designer For Discord
  41. $else
  42. $endif
Advertisement
Add Comment
Please, Sign In to add comment