Unverified Commit 68d7255b authored by Bruce MacDonald's avatar Bruce MacDonald Committed by GitHub
Browse files

show request to server rather than local check (#778)

parent 9ef2fce3
...@@ -688,7 +688,12 @@ func generateInteractive(cmd *cobra.Command, model string) error { ...@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment