Skip to content

Latest commit

 

History

History
 
 

models

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Models

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.

Methods

This document covers the method(s) located in models.h. You can find their function signature(s) below.

List Models

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);

List Models (async)

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);

Retrieve Model

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);

Retrieve Model (async)

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);

Example Usage

For example usage of the above function(s), please refer to the examples folder.