show request to server rather than local check (#778)
This commit is contained in:
parent
9ef2fce33a
commit
68d7255bd3
1 changed files with 6 additions and 1 deletions
|
@ -688,7 +688,12 @@ func generateInteractive(cmd *cobra.Command, model string) error {
|
|||
case strings.HasPrefix(line, "/show"):
|
||||
args := strings.Fields(line)
|
||||
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 {
|
||||
fmt.Println("error: couldn't get model")
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue