• Jesse Gross's avatar
    prompt: Don't trim whitespace from prompts · 900f64e6
    Jesse Gross authored
    New lines can be an important part of a user's prompt and trimming
    it can alter the results. We previously only trimmed prompts with
    images but refactoring brought this behavior to all prompts, where
    it became more noticable.
    
    The /generate endpoint adds less whitespace and therefore doesn't
    need to trim it out - this brings the same behavior to /chat.
    
    Thanks to @gabe-l-hart for spotting the issue!
    
    Fixes #7795
    900f64e6
prompt_test.go 10.9 KB