Explorar o código

routes: fix show llava models

Michael Yang hai 1 ano
pai
achega
b25976aeb8
Modificáronse 1 ficheiros con 12 adicións e 12 borrados
  1. 12 12
      server/images.go

+ 12 - 12
server/images.go

@@ -68,31 +68,31 @@ func (m *Model) String() string {
 		Args: m.ModelPath,
 		Args: m.ModelPath,
 	})
 	})
 
 
-	if m.Template != "" {
+	for _, adapter := range m.AdapterPaths {
 		modelfile.Commands = append(modelfile.Commands, model.Command{
 		modelfile.Commands = append(modelfile.Commands, model.Command{
-			Name: "template",
-			Args: m.Template,
+			Name: "adapter",
+			Args: adapter,
 		})
 		})
 	}
 	}
 
 
-	if m.System != "" {
+	for _, projector := range m.ProjectorPaths {
 		modelfile.Commands = append(modelfile.Commands, model.Command{
 		modelfile.Commands = append(modelfile.Commands, model.Command{
-			Name: "system",
-			Args: m.System,
+			Name: "model",
+			Args: projector,
 		})
 		})
 	}
 	}
 
 
-	for _, adapter := range m.AdapterPaths {
+	if m.Template != "" {
 		modelfile.Commands = append(modelfile.Commands, model.Command{
 		modelfile.Commands = append(modelfile.Commands, model.Command{
-			Name: "adapter",
-			Args: adapter,
+			Name: "template",
+			Args: m.Template,
 		})
 		})
 	}
 	}
 
 
-	for _, projector := range m.ProjectorPaths {
+	if m.System != "" {
 		modelfile.Commands = append(modelfile.Commands, model.Command{
 		modelfile.Commands = append(modelfile.Commands, model.Command{
-			Name: "projector",
-			Args: projector,
+			Name: "system",
+			Args: m.System,
 		})
 		})
 	}
 	}