GenAI.Provider.OpenAI (Noizu Labs, GenAI Wrapper v0.1.0)

Module for interacting with the OpenAI API.

Link to this section Summary

Functions

Sends a chat completion request to the Mistral API. This function constructs the request body based on the provided messages, tools, and settings, sends the request to the Mistral API, and returns a GenAI.ChatCompletion struct with the response.

Low level inference, pass in model, messages, tools, and various settings to prepare final provider specific API requires.

Formats a message for use in a chat completion request to the OpenAI API.

Formats a tool for use in a chat completion request to the OpenAI API.

Retrieves a list of models supported by the OpenAI API for given user.

Sends a chat completion request to the OpenAI API.

Link to this section Functions

Link to this function

chat(messages, tools, settings)

This function is deprecated. This function is deprecated. Use `GenAI.Thread.chat/5` instead..

Sends a chat completion request to the Mistral API. This function constructs the request body based on the provided messages, tools, and settings, sends the request to the Mistral API, and returns a GenAI.ChatCompletion struct with the response.

Link to this function

chat(model, messages, tools, hyper_parameters, provider_settings \\ [])

Low level inference, pass in model, messages, tools, and various settings to prepare final provider specific API requires.

Link to this function

format_message(message, state)

Formats a message for use in a chat completion request to the OpenAI API.

Link to this function

format_tool(tool, state)

Formats a tool for use in a chat completion request to the OpenAI API.

Link to this function

models(settings \\ [])

Retrieves a list of models supported by the OpenAI API for given user.

Sends a chat completion request to the OpenAI API.