Skip to main content

Filter: classifai_openai_embeddings_max_tokens

Filter the max number of tokens.

Useful if you want to change to a different model that uses a different number of tokens, or be more strict on the amount of tokens that can be used.

Parameters

NameTypeDescription
$this->max_tokensintThe default maximum tokens.

Since

  • 3.1.0

Source

Defined in includes/Classifai/Providers/OpenAI/Embeddings.php at line 194

Returns

The maximum tokens.

Ready to Get Started?

ClassifAI is a Free WordPress plugin that connects to your choice of AI platforms.