Plugin Directory

Changeset 3206319


Ignore:
Timestamp:
12/11/2024 12:04:05 PM (12 months ago)
Author:
martin7ba
Message:

Updated to use GPT-3.5-Turbo model

Location:
martincv-openai-blog-post
Files:
25 added
3 edited

Legend:

Unmodified
Added
Removed
  • martincv-openai-blog-post/trunk/README.md

    r3120281 r3206319  
    44Tags: openai, post, gpt
    55Requires at least: 5.0
    6 Tested up to: 6.6
     6Tested up to: 6.7.1
    77Requires PHP: 7.3
    8 Stable tag: 1.0
     8Stable tag: 1.1
    99License: GPLv3 or later
    1010License URI: http://www.gnu.org/licenses/gpl-3.0.html
    1111
    12 Utilizes OpenAi DaVinci 003 to generate Post based on the post title.
     12Utilizes OpenAi GPT-3.5-turbo to generate Post based on the post title.
    1313You can use it with Gutenberg or Classic editor. Works for both posts and pages.
    1414
    1515== Description ==
    1616
    17 This plugin utilizes OpenAi DaVinci 003 to generated Blog Post based on the entered post title.
     17This plugin utilizes OpenAi GPT-3.5-turbo to generated Blog Post based on the entered post title.
    1818You can use it with Gutenberg Editor or the Classic editor. Works for both posts and pages.
    1919
  • martincv-openai-blog-post/trunk/inc/class-openai.php

    r2834084 r3206319  
    132132        $request_args = array(
    133133            'body' => array(
    134                 'model'             => 'text-davinci-003',
     134                'model'             => 'gpt-3.5-turbo',
     135                'messages'          => array(
     136                    array(
     137                        'role'    => 'system',
     138                        'content' => 'You are a helpful assistant.',
     139                    ),
     140                    array(
     141                        'role'    => 'user',
     142                        'content' => $prompt,
     143                    ),
     144                ),
    135145                'max_tokens'        => (int) $max_tokens,
    136146                'temperature'       => (float) $temperature,
     
    138148                'frequency_penalty' => (float) $frequency_penalty,
    139149                'presence_penalty'  => (float) $presence_penalty,
    140                 'best_of'           => (int) $best_of,
    141                 'prompt'            => $prompt,
    142150            ),
    143151        );
    144152
    145         return $this->request( 'completions', $request_args );
     153        return $this->request( 'chat/completions', $request_args );
    146154    }
    147155
  • martincv-openai-blog-post/trunk/martincv-openai-post.php

    r2834084 r3206319  
    55 * Author:      MartinCV
    66 * Author URI:  https://www.martincv.com
    7  * Version:     1.0
     7 * Version:     1.1
    88 * Text Domain: martincv-openai-post
    99 *
Note: See TracChangeset for help on using the changeset viewer.