mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-10 21:17:08 +00:00
This reverts commit 7d05a6ee8f44b314fa697a427439e5fa4d78c3d7. 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
@ -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
|
||||||
@ -989,6 +981,7 @@ func NewCLI() *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),
|
||||||
|
PreRunE: checkServerHeartbeat,
|
||||||
RunE: RunHandler,
|
RunE: RunHandler,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user