openai/src/08abd2df-1406-4939-a1a6-94d2fce3f043/code.power

18 lines
328 B
Plaintext
Raw Normal View History

2023-07-04 06:26:05 +00:00
/**
* List the available models from OpenAI API.
*
* @return object|null
* @since 3.2.0
**/
public function list(): ?object
{
// Build the request path.
$path = "/models";
// Send the get request.
return $this->response->get(
$this->http->get(
$this->uri->get($path)
)
);
}