Skip to main content

Constructor

Methods

Behavior Notes

  • Adds optional system prompt automatically.
  • Applies defensive truncation before completion calls.
  • Includes token-budget safety helpers and retry paths for token/output-limit errors.
  • Uses max_tokens safety logic (does not set both max_tokens and max_completion_tokens).