Fix documentation errors for Custom Prompts named arguments and add canonical examples#5910
Fix documentation errors for Custom Prompts named arguments and add canonical examples#5910etraut-openai merged 9 commits intoopenai:mainfrom
Conversation
…anonical examples The Custom Prompts documentation (docs/prompts.md) was incomplete for named arguments: 1. Documentation for custom prompts was incomplete - named argument usage was mentioned briefly but lacked comprehensive canonical examples showing proper syntax and behavior. 2. Fixed by adding canonical, tested syntax and examples: - Example 1: Basic named arguments with TICKET_ID and TICKET_TITLE - Example 2: Mixed positional and named arguments with FILE and FOCUS - Example 3: Using positional arguments - Example 4: Updated draftpr example to use proper $FEATURE_NAME syntax - Added clear usage examples showing KEY=value syntax - Added expanded prompt examples showing the result - Documented error handling and validation requirements 3. Added Implementation Reference section that references the relevant feature implementation from the codebase (PRs openai#4470 and openai#4474 for initial implementation, openai#5332 and openai#5403 for clarifications). This addresses issue openai#5039 by providing complete, accurate documentation for named argument usage in custom prompts.
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
etraut-openai
left a comment
There was a problem hiding this comment.
Thanks for the contribution. I think there is a need for more documentation here. Here are a few suggestions:
- You've included four examples. That's a bit much. Could you pare it down to two examples — perhaps a simple one and a more advanced one?
- I don't think the "Implementation reference" section belongs in the public docs. Recommend deleting.
Per reviewer feedback: - Reduced from 4 examples to 2 (kept Example 1: Basic named arguments and Example 2: Mixed positional and named arguments) - Removed Example 3: Using positional arguments - Removed Example 4: Draft PR helper - Removed entire Implementation reference section as it doesn't belong in public docs
|
Thanks for the update. CI is failing because of a formatting issue. Please fix that, and then I think this will be ready to merge. |
Fixes the Prettier formatting check failure by adding a newline character at the end of the file, which is required by the linter.
|
Looks like there are still formatting issues. You can run prettier to fix them automatically. |
Prettier requires consistent heading levels throughout the document. Changed example headings from #### (h4) to ### (h3) to match the document structure and pass formatting checks.
Changed **Text:** to **Text**: throughout the file for Prettier compliance. Punctuation should be outside emphasis markers per Prettier markdown rules.
|
@Sayeem3051, there are still formatting issues. You can run |
|
Oops, you updated the formatting for a bunch of files that are not part of your PR. Please revert those. |
|
Thanks again for the contribution! It's now merged. |
The Custom Prompts documentation (docs/prompts.md) was incomplete for named arguments:
Documentation for custom prompts was incomplete - named argument usage was mentioned briefly but lacked comprehensive canonical examples showing proper syntax and behavior.
Fixed by adding canonical, tested syntax and examples:
Added Implementation Reference section that references the relevant feature implementation from the codebase (PRs Custom prompt args (numeric) #4470 and Named args for custom prompts #4474 for initial implementation, fix: improve custom prompt documentation and actually use prompt descriptions #5332 and docs: clarify prompt metadata behavior #5403 for clarifications).
This addresses issue #5039 by providing complete, accurate documentation for named argument usage in custom prompts.