Option classes
ChatOptions
-
class
ChatOptions -
- Fully qualified name
-
\Netresearch\Nr Llm\ Service\ Option\ Chat Options
Typed options for chat operations.
- static
factual() -
Create options optimized for factual responses (temperature: 0.1).
- returns
-
ChatOptions
withResponseFormat(string $format): self-
Request an output format:
text,jsonormarkdown.jsonactivates the provider's native JSON mode on every adapter (ADR-128).
withResponseSchema(array $schema): self-
Attach a strict-subset JSON schema (ADR-126) the provider should enforce natively where it can. Set automatically by
complete; the local strict validation remains authoritative either way.Structured ()
withReasoningEffort(ReasoningEffort $effort): self-
Ask a reasoning model for an amount of thinking: one of the
ReasoningcasesEffort None,Minimal,Low,Medium,High,XHighandMax(ADR-204). It wins over the coarsethinkswitch. An effort the model does not allow is moved onto its own scale before the request is sent —NonebecomesLowon GPT-6 Astra — and the applied value is written to the response metadata undernrllm_. Only OpenAI's GPT-6 models have an effort scale today; every other model and provider ignores the option and writes no such key.reasoning_ effort