|
|
@ -624,13 +624,13 @@ func ShowHandler(cmd *cobra.Command, args []string) error { |
|
|
return errors.New("only one of '--license', '--modelfile', '--parameters', '--system', or '--template' can be specified") |
|
|
return errors.New("only one of '--license', '--modelfile', '--parameters', '--system', or '--template' can be specified") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if flagsSet == 1 { |
|
|
req := api.ShowRequest{Name: args[0]} |
|
|
req := api.ShowRequest{Name: args[0]} |
|
|
resp, err := client.Show(cmd.Context(), &req) |
|
|
resp, err := client.Show(cmd.Context(), &req) |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return err |
|
|
return err |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if flagsSet == 1 { |
|
|
switch showType { |
|
|
switch showType { |
|
|
case "license": |
|
|
case "license": |
|
|
fmt.Println(resp.License) |
|
|
fmt.Println(resp.License) |
|
|
@ -647,12 +647,12 @@ func ShowHandler(cmd *cobra.Command, args []string) error { |
|
|
return nil |
|
|
return nil |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
req := api.ShowRequest{Name: args[0]} |
|
|
showInfo(resp) |
|
|
resp, err := client.Show(cmd.Context(), &req) |
|
|
|
|
|
if err != nil { |
|
|
|
|
|
return err |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func showInfo(resp *api.ShowResponse) { |
|
|
arch := resp.ModelInfo["general.architecture"].(string) |
|
|
arch := resp.ModelInfo["general.architecture"].(string) |
|
|
|
|
|
|
|
|
modelData := [][]string{ |
|
|
modelData := [][]string{ |
|
|
@ -711,8 +711,6 @@ func ShowHandler(cmd *cobra.Command, args []string) error { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
table.Render() |
|
|
table.Render() |
|
|
|
|
|
|
|
|
return nil |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func renderSubTable(data [][]string, file bool) string { |
|
|
func renderSubTable(data [][]string, file bool) string { |
|
|
|