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
chat(messages, tools, settings)
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.
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.
format_message(message, state)
Formats a message for use in a chat completion request to the OpenAI API.
format_tool(tool, state)
Formats a tool for use in a chat completion request to the OpenAI API.
models(settings \\ [])
Retrieves a list of models supported by the OpenAI API for given user.
run(state)
Sends a chat completion request to the OpenAI API.