Making WordPress.org


Ignore:
Timestamp:
06/07/2023 08:07:12 AM (2 years ago)
Author:
akirk
Message:

Translate: allow switching on thin ajax request via flag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/gp-translation-helpers/includes/class-gp-openai-review.php

    r12626 r12629  
    2525
    2626        if ( empty( trim( $openai_key ) ) ) {
    27             return array();
     27            return array(
     28                'status' => 404,
     29                'error' => 'No OpenAI Key defined',
     30            );
    2831        }
    29         $openai_temperature = 0;
    3032
    3133        $openai_query .= 'For the english text  "' . $original . '", is "' . $translation . '" a correct translation in ' . $language . '?';
     
    5557                        'n'           => 1,
    5658                        'messages'    => $messages,
    57                         'temperature' => $openai_temperature,
    5859                    )
    5960                ),
Note: See TracChangeset for help on using the changeset viewer.