From f0b23b538d45a8a86603da7aa060dc4040e830ef Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 29 Jun 2023 16:19:39 -0700 Subject: [PATCH] remove add cmd --- README.md | 16 ---------------- ollama/cmd/cli.py | 8 -------- 2 files changed, 24 deletions(-) diff --git a/README.md b/README.md index 31c302a3..f6d4bcf9 100644 --- a/README.md +++ b/README.md @@ -55,22 +55,6 @@ List available local models models = ollama.models() ``` -### `ollama.serve()` - -Serve the ollama http server - -``` -ollama.serve() -``` - -### `ollama.add(filepath)` - -Add a model by importing from a file - -```python -ollama.add("./path/to/model") -``` - ### `ollama.load(model)` Manually a model for generation diff --git a/ollama/cmd/cli.py b/ollama/cmd/cli.py index c09741b4..f467b25b 100644 --- a/ollama/cmd/cli.py +++ b/ollama/cmd/cli.py @@ -29,10 +29,6 @@ def main(): generate_parser.add_argument("prompt", nargs="?") generate_parser.set_defaults(fn=generate) - add_parser = subparsers.add_parser("add") - add_parser.add_argument("model") - add_parser.set_defaults(fn=add) - pull_parser = subparsers.add_parser("pull") pull_parser.add_argument("model") pull_parser.set_defaults(fn=pull) @@ -115,10 +111,6 @@ def generate_batch(*args, **kwargs): generate_oneshot(*args, **kwargs) -def add(model, models_home): - os.rename(model, Path(models_home) / Path(model).name) - - def pull(*args, **kwargs): model.pull(*args, **kwargs)