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
aba706ea
Commit
aba706ea
authored
Jul 17, 2023
by
Michael Yang
Browse files
remove unused persistent pre run
parent
529ff9ab
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
14 deletions
+0
-14
cmd/cmd.go
cmd/cmd.go
+0
-14
No files found.
cmd/cmd.go
View file @
aba706ea
...
@@ -9,7 +9,6 @@ import (
...
@@ -9,7 +9,6 @@ import (
"net"
"net"
"net/http"
"net/http"
"os"
"os"
"path/filepath"
"strings"
"strings"
"time"
"time"
...
@@ -21,15 +20,6 @@ import (
...
@@ -21,15 +20,6 @@ import (
"github.com/jmorganca/ollama/server"
"github.com/jmorganca/ollama/server"
)
)
func
cacheDir
()
string
{
home
,
err
:=
os
.
UserHomeDir
()
if
err
!=
nil
{
panic
(
err
)
}
return
filepath
.
Join
(
home
,
".ollama"
)
}
func
create
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
func
create
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
filename
,
_
:=
cmd
.
Flags
()
.
GetString
(
"file"
)
filename
,
_
:=
cmd
.
Flags
()
.
GetString
(
"file"
)
client
:=
api
.
NewClient
()
client
:=
api
.
NewClient
()
...
@@ -255,10 +245,6 @@ func NewCLI() *cobra.Command {
...
@@ -255,10 +245,6 @@ func NewCLI() *cobra.Command {
CompletionOptions
:
cobra
.
CompletionOptions
{
CompletionOptions
:
cobra
.
CompletionOptions
{
DisableDefaultCmd
:
true
,
DisableDefaultCmd
:
true
,
},
},
PersistentPreRunE
:
func
(
_
*
cobra
.
Command
,
args
[]
string
)
error
{
// create the models directory and it's parent
return
os
.
MkdirAll
(
filepath
.
Join
(
cacheDir
(),
"models"
),
0
o700
)
},
}
}
cobra
.
EnableCommandSorting
=
false
cobra
.
EnableCommandSorting
=
false
...
...
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