Skip to content

Commit

Permalink
suggestions applied
Browse files Browse the repository at this point in the history
  • Loading branch information
faisal-alvi committed Oct 25, 2023
1 parent 568e388 commit c469d90
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions includes/Classifai/Providers/OpenAI/APIRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
16 changes: 8 additions & 8 deletions includes/Classifai/Providers/OpenAI/Tokenizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
Expand Down

0 comments on commit c469d90

Please sign in to comment.