"docs/vscode:/vscode.git/clone" did not exist on "f73d0b6becf8f6b985c237bdfc94e31f2d96e956"
Unverified Commit 949d7832 authored by Blake Mizerany's avatar Blake Mizerany Committed by GitHub
Browse files

Revert "cmd: provide feedback if OLLAMA_MODELS is set on non-serve command (#3470)" (#3662)

This reverts commit 7d05a6ee.

This proved to be more painful than useful.

See: https://github.com/ollama/ollama/issues/3624
parent 99d227c9
......@@ -252,14 +252,6 @@ func createBlob(cmd *cobra.Command, client *api.Client, path string) (string, er
}
func RunHandler(cmd *cobra.Command, args []string) error {
if os.Getenv("OLLAMA_MODELS") != "" {
return errors.New("OLLAMA_MODELS must only be set for 'ollama serve'")
}
if err := checkServerHeartbeat(cmd, args); err != nil {
return err
}
client, err := api.ClientFromEnvironment()
if err != nil {
return err
......@@ -986,10 +978,11 @@ func NewCLI() *cobra.Command {
showCmd.Flags().Bool("system", false, "Show system message of a model")
runCmd := &cobra.Command{
Use: "run MODEL [PROMPT]",
Short: "Run a model",
Args: cobra.MinimumNArgs(1),
RunE: RunHandler,
Use: "run MODEL [PROMPT]",
Short: "Run a model",
Args: cobra.MinimumNArgs(1),
PreRunE: checkServerHeartbeat,
RunE: RunHandler,
}
runCmd.Flags().Bool("verbose", false, "Show timings for response")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment