Fix article typo and broken method chain in README max-tokens example#250
Fix article typo and broken method chain in README max-tokens example#250alewolf wants to merge 1 commit into
Conversation
Two fixes in the 'Text generation using max tokens' example:
- 'a 80-verse' -> 'an 80-verse' ('eighty' takes 'an').
- Remove the stray semicolon after usingMaxTokens(8000) so the fluent chain
correctly continues to ->generateText().
Co-authored-by: Karolína Vyskočilová <3611726+vyskoczilova@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the README’s PHP usage example to improve grammar and correct the method-chaining snippet so it reads as a single fluent call.
Changes:
- Fixes the article in the prompt text (“a 80-verse” → “an 80-verse”).
- Adjusts the fluent chain so
->generateText()is part of the same statement (removes the premature semicolon afterusingMaxTokens).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Summary
Two small fixes to the "Text generation using max tokens" code example in
README.md:'Write a 80-verse poem ...'→'Write an 80-verse poem ...'("eighty" begins with a vowel sound, so it takes an).->usingMaxTokens(8000)terminated the statement mid-chain, making the following->generateText()a parse error. Removing it lets the fluent builder chain flow through as intended.This supersedes and consolidates #246 and #249, which each touched this same code block.
Props
Props @vyskoczilova for the contribution.
🤖 Generated with Claude Code