<?php

declare(strict_types=1);

namespace KimaAI\Ai\Providers\Replicate\Endpoint;

use KimaAI\Ai\Providers\Replicate\ReplicateClient;


final class Models {
  /**
   * Replicate client wrapper.
   *
   * @var ReplicateClient
   */
  private ReplicateClient $client;

  public function __construct(ReplicateClient $client) {
    $this->client = $client;
  }

  /**
   * List public models.
   */
  public function list(array $query = []): array {
    return $this->client->request('GET', '/models', $query);
  }

  /**
   * Get a model by owner/name.
   */
  public function get(string $owner, string $name): array {
    return $this->client->request('GET', '/models/' . $owner . '/' . $name);
  }
}
