mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
add modelpaths (#96)
This commit is contained in:
parent
1f45f7bb52
commit
4a28a2f093
3 changed files with 147 additions and 80 deletions
|
@ -48,7 +48,13 @@ func create(cmd *cobra.Command, args []string) error {
|
|||
}
|
||||
|
||||
func RunRun(cmd *cobra.Command, args []string) error {
|
||||
_, err := os.Stat(args[0])
|
||||
mp := server.ParseModelPath(args[0])
|
||||
fp, err := mp.GetManifestPath(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = os.Stat(fp)
|
||||
switch {
|
||||
case errors.Is(err, os.ErrNotExist):
|
||||
if err := pull(args[0]); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue