Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runner.go: Don't trim whitespace from inputs
It's possible to get prompts that consist entirely of whitespace - this is most likely to happen when generating embeddings. Currently, we will trim this away, leaving an empty prompt, which will then generate an error. Generating embeddings from whitespace should not trigger an error, as this may break pipelines. It's better to just leave the whitespace in place and process what we are given. This is consistent with past versions of Ollama. Bug ollama#7578
- Loading branch information