Refine paraphrase prompt; forward media modalities and support JSON mode - #11
Merged
hemanth-asirvatham merged 1 commit intoFeb 6, 2026
Conversation
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
json_modeis enabled and surface modality/search settings through the API.Description
src/gabriel/prompts/paraphrase_prompt.jinja2to remove examples, emphasize instruction fidelity, add concise modality guidance, and conditionally require JSON-only output whenjson_modeis set, with the final output wording changed to the requested phrasing.json_modeinto prompt rendering and propagate modality/search options from the API by updatingsrc/gabriel/tasks/paraphrase.pyto forwardprompt_images,prompt_audio, andprompt_pdfsto the underlying helper, callwarn_if_modality_mismatch, and useload_image_inputs/load_audio_inputs/load_pdf_inputswhen appropriate.modalityandsearch_context_sizeon theparaphraseAPI insrc/gabriel/api.pyand wire defaults soweb_searchandsearch_context_sizebehave sensibly whenmodality == "web".search_context_sizeintoget_all_responses.tests/test_basic.pyto addtest_paraphrase_modalities_forward_mediaand adapt existing paraphrase tests to the new signatures and behavior.Testing
test_paraphrase_modalities_forward_mediaand updated existing paraphrase tests intests/test_basic.pyto reflect the new API and media-forwarding behavior.pytest).Codex Task