• Nicolas Patry's avatar
    Adding a new `return_full_text` parameter to TextGenerationPipeline. (#9852) · c2d0ffec
    Nicolas Patry authored
    * Adding a new `return_full_text` parameter to TextGenerationPipeline.
    
    For text-generation, it's sometimes used as prompting text.
    In that context, prefixing `generated_text` with the actual input
    forces the caller to take an extra step to remove it.
    
    The proposed change adds a new parameter (for backward compatibility).
    `return_full_text` that enables the caller to prevent adding the prefix.
    
    * Doc quality.
    c2d0ffec
test_pipelines_text_generation.py 2.75 KB