From c469d90e2a6781ed8376a5c9e84cadb6e60b1bfd Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Wed, 25 Oct 2023 15:51:16 +0530 Subject: [PATCH] suggestions applied --- .../Classifai/Providers/OpenAI/APIRequest.php | 8 ++++---- .../Classifai/Providers/OpenAI/Tokenizer.php | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/includes/Classifai/Providers/OpenAI/APIRequest.php b/includes/Classifai/Providers/OpenAI/APIRequest.php index 5ed08ca87..224451373 100644 --- a/includes/Classifai/Providers/OpenAI/APIRequest.php +++ b/includes/Classifai/Providers/OpenAI/APIRequest.php @@ -56,7 +56,7 @@ public function get( string $url, array $options = [] ) { /** * Filter the response from OpenAI for a get request. * - * @since x.x.x + * @since 2.4.0 * @hook classifai_openai_api_response_get * * @param {string} $url Request URL. @@ -93,7 +93,7 @@ public function post( string $url = '', array $options = [] ) { /** * Filter the response from OpenAI for a post request. * - * @since x.x.x + * @since 2.4.0 * @hook classifai_openai_api_response_post * * @param {string} $url Request URL. @@ -145,7 +145,7 @@ public function post_form( string $url = '', array $body = [] ) { /** * Filter the options for the post form request. * - * @since x.x.x + * @since 2.4.0 * @hook classifai_openai_api_request_post_form_options * * @param {array} $options The options for the request. @@ -174,7 +174,7 @@ public function post_form( string $url = '', array $body = [] ) { /** * Filter the response from OpenAI for a post form request. * - * @since x.x.x + * @since 2.4.0 * @hook classifai_openai_api_response_post_form * * @param {string} $url Request URL. diff --git a/includes/Classifai/Providers/OpenAI/Tokenizer.php b/includes/Classifai/Providers/OpenAI/Tokenizer.php index 06242510d..6785fe446 100644 --- a/includes/Classifai/Providers/OpenAI/Tokenizer.php +++ b/includes/Classifai/Providers/OpenAI/Tokenizer.php @@ -39,26 +39,26 @@ public function __construct( $max_tokens ) { /** * How many characters in one token (roughly) * - * @since 0.1.0 + * @since 2.4..0 * @hook classifai_openai_characters_in_token * - * @param int $characters_in_token How many characters in one token (roughly) - * @param int $max_tokens Maximum tokens the model supports. + * @param {int} $characters_in_token How many characters in one token (roughly) + * @param {int} $max_tokens Maximum tokens the model supports. * - * @return int + * @return {int} */ $this->characters_in_token = apply_filters( 'classifai_openai_characters_in_token', $this->characters_in_token, $max_tokens ); /** * How many tokens a word will take (roughly) * - * @since 0.1.0 + * @since 2.4.0 * @hook classifai_openai_tokens_per_word * - * @param int $tokens_per_word How many tokens a word will take (roughly) - * @param int $max_tokens Maximum tokens the model supports. + * @param {int} $tokens_per_word How many tokens a word will take (roughly) + * @param {int} $max_tokens Maximum tokens the model supports. * - * @return int + * @return {int} */ $this->tokens_per_word = apply_filters( 'classifai_openai_tokens_per_word', $this->tokens_per_word, $max_tokens ); }