This reverts commit 7d05a6ee8f
.
This proved to be more painful than useful.
See: https://github.com/ollama/ollama/issues/3624
This commit is contained in:
parent
99d227c9db
commit
949d7832cf
17
cmd/cmd.go
17
cmd/cmd.go
|
@ -252,14 +252,6 @@ func createBlob(cmd *cobra.Command, client *api.Client, path string) (string, er
|
||||||
}
|
}
|
||||||
|
|
||||||
func RunHandler(cmd *cobra.Command, args []string) error {
|
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()
|
client, err := api.ClientFromEnvironment()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -986,10 +978,11 @@ func NewCLI() *cobra.Command {
|
||||||
showCmd.Flags().Bool("system", false, "Show system message of a model")
|
showCmd.Flags().Bool("system", false, "Show system message of a model")
|
||||||
|
|
||||||
runCmd := &cobra.Command{
|
runCmd := &cobra.Command{
|
||||||
Use: "run MODEL [PROMPT]",
|
Use: "run MODEL [PROMPT]",
|
||||||
Short: "Run a model",
|
Short: "Run a model",
|
||||||
Args: cobra.MinimumNArgs(1),
|
Args: cobra.MinimumNArgs(1),
|
||||||
RunE: RunHandler,
|
PreRunE: checkServerHeartbeat,
|
||||||
|
RunE: RunHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
runCmd.Flags().Bool("verbose", false, "Show timings for response")
|
runCmd.Flags().Bool("verbose", false, "Show timings for response")
|
||||||
|
|
Loading…
Reference in a new issue