View Source OpenaiEx (openai_ex v0.1.0)

OpenaiEx is an Elixir library that provides a community-maintained client for the OpenAI API.

The library closely follows the structure of the official OpenAI API client libraries for Python and JavaScript, making it easy to understand and reuse existing documentation and code.

Link to this section Summary

Functions

Sends a GET request to the specified OpenAI API URL endpoint.

Creates a new OpenaiEx struct with the specified token and organization.

Sends a POST request to the specified OpenAI API URL endpoint with the specified JSON body.

Link to this section Functions

Sends a GET request to the specified OpenAI API URL endpoint.

Link to this function

new(token, organization \\ nil)

View Source

Creates a new OpenaiEx struct with the specified token and organization.

See https://platform.openai.com/docs/api-reference/authentication for details.

Sends a POST request to the specified OpenAI API URL endpoint with the specified JSON body.