[PR #4362] [MERGED] fix ollama create's usage string #16738

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

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4362
Author: @todashuta
Created: 5/11/2024
Status: Merged
Merged: 5/11/2024
Merged by: @jmorganca

Base: mainHead: fix-usage-string


📝 Commits (1)

  • f3606ce fix ollama create's usage string

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 cmd/cmd.go (+1 -1)

📄 Description

Since StringP() automatically adds the initial value, the initial value description for Modelfile was duplicated.
I have fixed this by removing the redundant default value description from the usage.

Before:

$ ./ollama create -h
Create a model from a Modelfile

Usage:
  ollama create MODEL [flags]

Flags:
  -f, --file string       Name of the Modelfile (default "Modelfile") (default "Modelfile")
  -h, --help              help for create
  -q, --quantize string   Quantize model to this level (e.g. q4_0)

Environment Variables:
      OLLAMA_HOST        The host:port or base URL of the Ollama server (e.g. http://localhost:11434)

After:

$ ./ollama create -h
Create a model from a Modelfile

Usage:
  ollama create MODEL [flags]

Flags:
  -f, --file string       Name of the Modelfile (default "Modelfile")
  -h, --help              help for create
  -q, --quantize string   Quantize model to this level (e.g. q4_0)

Environment Variables:
      OLLAMA_HOST        The host:port or base URL of the Ollama server (e.g. http://localhost:11434)

🔄 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/4362 **Author:** [@todashuta](https://github.com/todashuta) **Created:** 5/11/2024 **Status:** ✅ Merged **Merged:** 5/11/2024 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `fix-usage-string` --- ### 📝 Commits (1) - [`f3606ce`](https://github.com/ollama/ollama/commit/f3606ce6e8d7acdf8c14222a869e85bd709f7224) fix `ollama create`'s usage string ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+1 -1) </details> ### 📄 Description Since `StringP()` automatically adds the initial value, the initial value description for Modelfile was duplicated. I have fixed this by removing the redundant default value description from the usage. Before: ``` $ ./ollama create -h Create a model from a Modelfile Usage: ollama create MODEL [flags] Flags: -f, --file string Name of the Modelfile (default "Modelfile") (default "Modelfile") -h, --help help for create -q, --quantize string Quantize model to this level (e.g. q4_0) Environment Variables: OLLAMA_HOST The host:port or base URL of the Ollama server (e.g. http://localhost:11434) ``` After: ``` $ ./ollama create -h Create a model from a Modelfile Usage: ollama create MODEL [flags] Flags: -f, --file string Name of the Modelfile (default "Modelfile") -h, --help help for create -q, --quantize string Quantize model to this level (e.g. q4_0) Environment Variables: OLLAMA_HOST The host:port or base URL of the Ollama server (e.g. http://localhost:11434) ``` --- <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 05:41:39 -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#16738