ExOpenAI.Models (ex_openai.ex v1.2.1) View Source

Modules for interacting with the models group of OpenAI APIs

API Reference: https://platform.openai.com/docs/api-reference/models

Link to this section Summary

Functions

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Link to this section Functions

Specs

list_models(openai_organization_key: String.t(), openai_api_key: String.t()) ::
  {:ok, ExOpenAI.Components.ListModelsResponse.t()} | {:error, any()}

Lists the currently available models, and provides basic information about each one such as the owner and availability.

Endpoint: https://api.openai.com/v1/models

Method: GET

Docs: https://platform.openai.com/docs/api-reference/models


Required Arguments:

Optional Arguments:

  • openai_api_key: OpenAI API key to pass directly. If this is specified, it will override the api_key config value.

  • openai_organization_key: OpenAI API key to pass directly. If this is specified, it will override the organization_key config value.