Noizu.OpenAI.Api.Model (Noizu Labs: OpenAI v0.1.3)

Noizu.OpenAI.Api.Model is a module that provides functionality for managing models using OpenAI's API.

This module offers two main functions:

  1. list/0 - Lists all the available models.
  2. fetch/1 - Retrieves information about a specific model.

usage

Usage

{:ok, models} = Noizu.OpenAI.Api.Model.list()
{:ok, model_info} = Noizu.OpenAI.Api.Model.fetch(model)

Link to this section Summary

Functions

Retrieves the details of a specific model from the OpenAI API.

Retrieves the list of available models from the OpenAI API.

Link to this section Functions

Retrieves the details of a specific model from the OpenAI API.

parameters

Parameters

  • model: The name of the model for which to retrieve details

returns

Returns

Returns a tuple {:ok, model} on successful API call, where model is a map containing the details of the specified model. Returns {:error, term} on failure, where term contains error details.

example

Example

{:ok, model} = Noizu.OpenAI.model("text-davinci-003")

Retrieves the list of available models from the OpenAI API.

returns

Returns

Returns a tuple {:ok, models} on successful API call, where models is a list of available models. Returns {:error, term} on failure, where term contains error details.

example

Example

{:ok, models} = Noizu.OpenAI.Api.Model.list()