Sets the top log probabilities configuration.
Description
If $topLogprobs is null, enables log probabilities.
If $topLogprobs has a value, enables log probabilities and sets the number of top log probabilities to return.
Parameters
$topLogprobsint|nulloptional- The number of top log probabilities to return, or null to enable log probabilities.
Default:
null
Source
public function usingTopLogprobs(?int $topLogprobs = null): self
{
// Always enable log probabilities
$this->modelConfig->setLogprobs(\true);
// If a specific number is provided, set it
if ($topLogprobs !== null) {
$this->modelConfig->setTopLogprobs($topLogprobs);
}
return $this;
}
Changelog
| Version | Description |
|---|---|
| 0.1.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.