diff --git a/cmd/cmd.go b/cmd/cmd.go index b75c0b5e..f6d31f5b 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -726,14 +726,17 @@ func ShowHandler(cmd *cobra.Command, args []string) error { } func showInfo(resp *api.ShowResponse) { - arch := resp.ModelInfo["general.architecture"].(string) - modelData := [][]string{ - {"arch", arch}, {"parameters", resp.Details.ParameterSize}, {"quantization", resp.Details.QuantizationLevel}, - {"context length", fmt.Sprintf("%v", resp.ModelInfo[fmt.Sprintf("%s.context_length", arch)].(float64))}, - {"embedding length", fmt.Sprintf("%v", resp.ModelInfo[fmt.Sprintf("%s.embedding_length", arch)].(float64))}, + } + if resp.ModelInfo != nil { + arch := resp.ModelInfo["general.architecture"].(string) + modelData = append(modelData, + []string{"arch", arch}, + []string{"context length", fmt.Sprintf("%v", resp.ModelInfo[fmt.Sprintf("%s.context_length", arch)].(float64))}, + []string{"embedding length", fmt.Sprintf("%v", resp.ModelInfo[fmt.Sprintf("%s.embedding_length", arch)].(float64))}, + ) } mainTableData := [][]string{