Making WordPress.org

Changeset 13830

Timestamp:
06/17/2024 02:12:06 PM (7 weeks ago)
Author:
amieiro
Message:

Translate: use the OpenAI model the user has selected. By default, it uses gpt-3.5-turbo

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/ajax-fetch-openai-review.php

    r12628 r13830  
    5555$openai_query .= 'For the english text  "' . addslashes( $original_singular ) . '", is "' . addslashes( $translation ) . '" a correct translation in ' . addslashes( $language ) . '?';
    5656$openai_query  = ( $is_retry ) ? 'Are you sure that ' . $openai_query : $openai_query;
     57
    5758if ( $glossary_query ) {
    5859    $messages[] = array(
     
    7879        'body'    => wp_json_encode(
    7980            array(
    80                 'model'       => 'gpt-3.5-turbo',
     81                'model'       => ,
    8182                'max_tokens'  => 1000,
    8283                'n'           => 1,
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-translation-suggestions/inc/routes/class-translation-memory.php

    r13827 r13830  
    219219        $openai_query .= ' Translate the following text to ' . $gp_locale->english_name . ": \n";
    220220        $openai_query .= '"' . $original_singular . '"';
     221
    221222
    222223        $messages = array(
     
    241242                'body'    => wp_json_encode(
    242243                    array(
    243                         'model'       => 'gpt-3.5-turbo',
     244                        'model'       => ,
    244245                        'max_tokens'  => 1000,
    245246                        'n'           => 1,
Note: See TracChangeset for help on using the changeset viewer.