Module chat

Source

Modules§

chat_completion_builder
Tools for manipulating the type state of ChatCompletionBuilder.

Macros§

logit_bias

Structs§

ChatCompletion
A standard chat completion request. The response will be a string in any shape and will not be parsed.
ChatCompletionBuilder
Use builder syntax to set the inputs and finish with unstructured().
ChatCompletionResponse
A response from a chat completion request.
ChatCompletionResponseChoice
A response choice from a chat completion request.
Message
A chat completion message. You can pre-populate the request with user and assistant messages (alongside the system message) to provide context for the completion.
MessageBuilder
Use builder syntax to set the inputs and finish with build().
StructuredChatCompletion
A chat completion request who’s response conforms to a particular JSON schema.
StructuredChatCompletionResponse
A response from a structured chat completion request.
StructuredChatCompletionResponseChoice
UnifiedChatCompletionResponseMessage
A chat completion response message. Don’t use this type directly, and instead use the ? AKA Try operator to convert it into a result that can be used.

Enums§

FinishReason
The reason the response was terminated.
Model
The model that can be used for either standard or structured chat completions.
Role
The role of the message used for the chat completion.