Writing code requests | WordPress.org

[ad_1]

Hi @texasbiz

Our plugin uses OpenAI GPT-3 models. So all responses are coming from there. It is not something that our plugin can control.

Of course you can format the output from the ai engine. I am using another ai plugin here from projectdmc.org and code output is just fine:

<?php 

// create a form to allow user to choose a file
echo '<form action="" method="post" enctype="multipart/form-data">
    <input type="file" name="fileToUpload" id="fileToUpload">
    <input type="submit" value="Upload File" name="submit">
</form>';

if (isset($_POST['submit'])) {

    // get file details
    $fileName = $_FILES['fileToUpload']['name'];
    $fileSize = $_FILES['fileToUpload']['size'];
    $fileTmpName = $_FILES['fileToUpload']['tmp_name'];
    $fileType = $_FILES['fileToUpload']['type'];
    $fileError = $_FILES['fileToUpload']['error'];
    $fileExt = explode('.',$fileName);
    $fileActualExt = strtolower(end($fileExt));

    // allowed file types
    $allowed = array('enc');

    // check for errors
    if ($fileError !== 0) {
        echo "An error occurred";
    }
    else {
        // check file type
        if (in_array($fileActualExt, $allowed)) {
            // read file contents
            $fileContent = file_get_contents($fileTmpName);

            // decode content using base64_decode
            $decodedContent = base64_decode($fileContent);

            // decrypt content using openssl
            $key = "your_key_here";
            $decryptedContent = openssl_decrypt($decodedContent, 'aes-256-cbc', $key);

            // echo decrypted content
            echo $decryptedContent;
        }
        else {
            echo "Invalid file type";
        }
    }
}

?>

You can use the playground at openai and the out is formatted too.

I can write a simple PHP CURL script that outputs formatted code.

Anyway, wishing you the best.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer