Module chat

Source
Expand description

§Chat API

The chat API is used to have a conversation with the GPT-3.5 model which runs ChatGPT.

The main structs used in here are ChatResponse and ChatMessage.

§Chat

This is a new experimental struct that allows you to have a conversation with the GPT-3.5 model. It will automatically remember the messages you send and the messages the model sends so the model can remember the conversation.

See the ChatBuilder and Chat structs for more information.

Structs§

Chat
A struct that represents a chat session This struct makes it easy to interact with the chat api, as well as remembering messages. This struct guarantees that messages are sent and stored in the order that ask is called.
ChatBuilder
Builds a Chat struct for initiating a chat session.
ChatChoice
Represents the choice object returned by the chat API.
ChatMessage
Represents one of the messages sent to or received from the chat API.
ChatResponse
Represents a response from the chat API.
Usage
Represents the usage information returned by the chat API.

Enums§

Role
Represents one of the roles that can be used in the chat API.