|
@@ -688,7 +688,12 @@ func generateInteractive(cmd *cobra.Command, model string) error {
|
|
case strings.HasPrefix(line, "/show"):
|
|
case strings.HasPrefix(line, "/show"):
|
|
args := strings.Fields(line)
|
|
args := strings.Fields(line)
|
|
if len(args) > 1 {
|
|
if len(args) > 1 {
|
|
- resp, err := server.GetModelInfo(model)
|
|
|
|
|
|
+ client, err := api.ClientFromEnvironment()
|
|
|
|
+ if err != nil {
|
|
|
|
+ fmt.Println("error: couldn't connect to ollama server")
|
|
|
|
+ return err
|
|
|
|
+ }
|
|
|
|
+ resp, err := client.Show(cmd.Context(), &api.ShowRequest{Name: model})
|
|
if err != nil {
|
|
if err != nil {
|
|
fmt.Println("error: couldn't get model")
|
|
fmt.Println("error: couldn't get model")
|
|
return err
|
|
return err
|