Create options optimized for factual responses (temperature: 0.1).
returns
ChatOptions
staticcreative()
Create options for creative content (temperature: 1.2).
returns
ChatOptions
staticbalanced()
Create balanced options (temperature: 0.7).
returns
ChatOptions
staticjson()
Create options for JSON output format.
returns
ChatOptions
staticcode()
Create options optimized for code generation.
returns
ChatOptions
withTemperature(float $temperature): self
Set temperature (0.0 - 2.0).
withMaxTokens(int $maxTokens): self
Set maximum output tokens.
withTopP(float $topP): self
Set nucleus sampling parameter.
withFrequencyPenalty(float $penalty): self
Set frequency penalty (-2.0 to 2.0).
withPresencePenalty(float $penalty): self
Set presence penalty (-2.0 to 2.0).
withSystemPrompt(string $prompt): self
Set system prompt.
withProvider(string $provider): self
Set provider (openai, claude, gemini).
withModel(string $model): self
Set specific model.
toArray(): array
Convert to array format.
Reference to the headline
Copy and freely share the link
This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor.
The link below can be used, but is prone to change if the page gets moved.