package
0.17.0
Repository: https://github.com/gmlewis/modus.git
Documentation: pkg.go.dev

# Functions

Creates a new assistant message object.
Creates a new assistant message object from a completion message, so it can be used in a conversation.
Creates a new assistant message object from multiple content parts.
Creates a new audio content part from raw audio data.
Creates a new audio output parameters object.
Creates a new developer message object.
Creates a new developer message object from multiple content parts.
Creates a new image content part from raw image data.
Creates a new image content part from a URL.
Creates a new refusal content part.
Creates a new system message object.
Creates a new system message object from multiple content parts.
Creates a new text content part.
Creates a new tool object for a function.
Creates a new tool message object.
Creates a new tool message object from multiple content parts.
Creates a new user message object.
Creates a new user message object from multiple content parts.

# Constants

The output embeddings are encoded as a base64-encoded string, containing an binary representation of an array of floating-point numbers.
The output embeddings are encoded as an array of floating-point numbers.
Audio modality requests the model to respond with spoken audio.
Text modality requests the model to respond with text.
The OpenAI system will utilize scale tier credits until they are exhausted.
The request will be processed using the default OpenAI service tier with a lower uptime SLA and no latency guarantee.

# Variables

Instructs the model to output the response as a JSON object.
Enables Structured Outputs which guarantees the model will match your supplied JSON schema.
Instructs the model to output the response as a plain text string.
Directs the model to pick between generating a message or calling one or more tools.
Forces the model to call a specific tool.
Directs the model to not call any tool and instead generates a message.
Directs that the model must call one or more tools.

# Structs

An assistant message object, representing a message previously generated by the model.
An audio object, used to represent audio in a content part.
An audio content part.
An audio output object generated by the model when using audio modality.
Parameters for audio output.
Represents a reference to a previous audio response from the model.
Provides input and output types that conform to the OpenAI Chat API, as described in the [API Reference] docs.
The input object for the OpenAI Chat API.
The output object for the OpenAI Chat API.
A completion choice object returned in the response.
A chat completion message generated by the model.
A developer message.
The output vector embeddings data.
Provides input and output types that conform to the OpenAI Embeddings API, as described in the [API Reference] docs.
The input object for the OpenAI Embeddings API.
The output object for the OpenAI Embeddings API.
A function call object that the model may generate.
The definition of a function that can be called by the model.
An image object, used to represent an image in a content part.
An image content part.
Log probability information for a choice.
Log probability information for a message content token.
Log probability information for the most likely tokens at a given position.
A refusal content part.
An object specifying the format that the model must output.
A system message.
A text content part.
A tool object that the model may call.
A tool call object that the model may generate.
An object specifying which tool the model should call.
A tool message object.
The usage statistics returned by the OpenAI API.
A user message object.

# Interfaces

An interface for an assistant message content part.
An interface for a message content part.
An interface to any request message.
An interface for a system message content part.
An interface for a tool content part.
An interface for a user message content part.

# Type aliases

An interface for a developer message content part.
The encoding format for the output embeddings.
A type that represents the modality of the chat.
The OpenAI service tier used to process the request.