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

Closed
opened 2026-04-16 06:39:42 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10636
Author: @BruceMacD
Created: 5/9/2025
Status: Merged
Merged: 5/10/2025
Merged by: @BruceMacD

Base: mainHead: brucemacd/no-img-quotes


📝 Commits (1)

  • ec04b90 cmd: strip single quotes from image page

📊 Changes

2 files changed (+25 additions, -0 deletions)

View changed files

📝 cmd/interactive.go (+2 -0)
📝 cmd/interactive_test.go (+23 -0)

📄 Description

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).


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/10636 **Author:** [@BruceMacD](https://github.com/BruceMacD) **Created:** 5/9/2025 **Status:** ✅ Merged **Merged:** 5/10/2025 **Merged by:** [@BruceMacD](https://github.com/BruceMacD) **Base:** `main` ← **Head:** `brucemacd/no-img-quotes` --- ### 📝 Commits (1) - [`ec04b90`](https://github.com/ollama/ollama/commit/ec04b9090363365fff15f60ead0ad2a3e9b4d3fc) cmd: strip single quotes from image page ### 📊 Changes **2 files changed** (+25 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `cmd/interactive.go` (+2 -0) 📝 `cmd/interactive_test.go` (+23 -0) </details> ### 📄 Description 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). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 06:39:43 -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#18575