Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
36c88cb9
You need to sign in or sign up before continuing.
Commit
36c88cb9
authored
Oct 18, 2023
by
Michael Yang
Browse files
cmd: set ExactArgs
parent
235e43d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
cmd/cmd.go
cmd/cmd.go
+8
-7
No files found.
cmd/cmd.go
View file @
36c88cb9
...
...
@@ -932,7 +932,7 @@ func NewCLI() *cobra.Command {
createCmd
:=
&
cobra
.
Command
{
Use
:
"create MODEL"
,
Short
:
"Create a model from a Modelfile"
,
Args
:
cobra
.
MinimumN
Args
(
1
),
Args
:
cobra
.
Exact
Args
(
1
),
PreRunE
:
checkServerHeartbeat
,
RunE
:
CreateHandler
,
}
...
...
@@ -942,7 +942,7 @@ func NewCLI() *cobra.Command {
showCmd
:=
&
cobra
.
Command
{
Use
:
"show MODEL"
,
Short
:
"Show information for a model"
,
Args
:
cobra
.
MinimumN
Args
(
1
),
Args
:
cobra
.
Exact
Args
(
1
),
PreRunE
:
checkServerHeartbeat
,
RunE
:
ShowHandler
,
}
...
...
@@ -969,13 +969,14 @@ func NewCLI() *cobra.Command {
Use
:
"serve"
,
Aliases
:
[]
string
{
"start"
},
Short
:
"Start ollama"
,
Args
:
cobra
.
ExactArgs
(
0
),
RunE
:
RunServer
,
}
pullCmd
:=
&
cobra
.
Command
{
Use
:
"pull MODEL"
,
Short
:
"Pull a model from a registry"
,
Args
:
cobra
.
MinimumN
Args
(
1
),
Args
:
cobra
.
Exact
Args
(
1
),
PreRunE
:
checkServerHeartbeat
,
RunE
:
PullHandler
,
}
...
...
@@ -985,7 +986,7 @@ func NewCLI() *cobra.Command {
pushCmd
:=
&
cobra
.
Command
{
Use
:
"push MODEL"
,
Short
:
"Push a model to a registry"
,
Args
:
cobra
.
MinimumN
Args
(
1
),
Args
:
cobra
.
Exact
Args
(
1
),
PreRunE
:
checkServerHeartbeat
,
RunE
:
PushHandler
,
}
...
...
@@ -1001,15 +1002,15 @@ func NewCLI() *cobra.Command {
}
copyCmd
:=
&
cobra
.
Command
{
Use
:
"cp"
,
Use
:
"cp
SOURCE TARGET
"
,
Short
:
"Copy a model"
,
Args
:
cobra
.
MinimumN
Args
(
2
),
Args
:
cobra
.
Exact
Args
(
2
),
PreRunE
:
checkServerHeartbeat
,
RunE
:
CopyHandler
,
}
deleteCmd
:=
&
cobra
.
Command
{
Use
:
"rm"
,
Use
:
"rm
MODEL [MODEL...]
"
,
Short
:
"Remove a model"
,
Args
:
cobra
.
MinimumNArgs
(
1
),
PreRunE
:
checkServerHeartbeat
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment