Hacxx Database Article Generator - SOURCE CODE 03-29-2023, 03:31 AM
#1
Code:
<script>
// My modification
var database = prompt("Write the website name:", "");
// Define the API endpoint and parameters
const endpoint = 'https://api.openai.com/v1/engine/chat';
const prompt = 'write me a article about '+database+' database leaked';
const apiKey = 'YOUR_API_KEY';
// Define the HTTP request options
const requestOptions = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${apiKey}`,
},
body: JSON.stringify({
'prompt': prompt,
'temperature': 0.5,
'max_tokens': 50,
'stop': '\n',
}),
};
// Make the HTTP request using the Fetch API
fetch(endpoint, requestOptions)
.then(response => response.json())
.then(data => {
// Handle the response data
console.log(data);
})
.catch(error => {
// Handle any errors that occurred
console.error(error);
});
</script>