The Models
class is defined in models.h
at liboai::Models
, and its interface can ideally be accessed through a liboai::OpenAI
object.
This class and its associated liboai::OpenAI
interface allow access to the Models endpoint of the OpenAI API; this endpoint's functionality can be found below.
- List and describe the various models available in the API.
This document covers the method(s) located in models.h
. You can find their function signature(s) below.
Lists the currently available models, and provides basic information about each one such as the owner and availability. Returns a liboai::Response
containing response data.
liboai::Response list() const & noexcept(false);
Asynchronously lists the currently available models, and provides basic information about each one such as the owner and availability. Returns a liboai::FutureResponse
containing future response data.
liboai::FutureResponse list_async() const & noexcept(false);
Retrieves a model instance, providing basic information about the model such as the owner and permissioning. Returns a liboai::Response
containing response data.
liboai::Response retrieve(
const std::string& model
) const & noexcept(false);
Asynchronously retrieves a model instance, providing basic information about the model such as the owner and permissioning. Returns a liboai::FutureResponse
containing future response data.
liboai::FutureResponse retrieve_async(
const std::string& model
) const & noexcept(false);
For example usage of the above function(s), please refer to the examples folder.