[PR #10636] cmd: strip single quotes from image input #13304

Closed
opened 2026-04-13 00:23:19 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/10636

State: closed
Merged: Yes


Terminal applications vary in how they handle dragged files, with some terminals like macOS Terminal and Windows Terminal typically adding quotes automatically to handle spaces in filenames.

Without removing these quotes the prompt to the LLM will have empty quote formatting:

Before:
'/Users/bruce/cat.jpg' describe this is sent to the LLM as '' describe this (with the image attached).

This change:
'/Users/bruce/cat.jpg' describe this is sent to the LLM as describe this (with the image attached).

**Original Pull Request:** https://github.com/ollama/ollama/pull/10636 **State:** closed **Merged:** Yes --- Terminal applications vary in how they handle dragged files, with some terminals like macOS Terminal and Windows Terminal typically adding quotes automatically to handle spaces in filenames. Without removing these quotes the prompt to the LLM will have empty quote formatting: Before: `'/Users/bruce/cat.jpg' describe this` is sent to the LLM as `'' describe this` (with the image attached). This change: `'/Users/bruce/cat.jpg' describe this` is sent to the LLM as `describe this` (with the image attached).
GiteaMirror added the pull-request label 2026-04-13 00:23:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13304