Module chat_shared

Module chat_shared 

Source
Expand description

This module defines shared data structures and components used across various OpenAI chat-related API endpoints. It includes definitions for chat completion requests, messages, content parts, and tool-related structures.

For more details, refer to the OpenAI Chat API documentation.

Modules§

exposed
Exposed namespace of the module.
orphan
Orphan namespace of the module.
own
Own namespace of the module.
prelude
Prelude to use essentials: use my_module ::prelude :: *.

Structs§

ChatCompletionChoice
Represents a choice in a chat completion response.
ChatCompletionLogprobs
Represents log probability information for a chat completion choice.
ChatCompletionLogprobsContent
Represents log probability information for a single token in the completion.
ChatCompletionLogprobsTopLogprob
Represents a top log probability token.
ChatCompletionMessageToolCall
Represents a tool call generated by the model.
ChatCompletionMessageToolCallFunction
Represents a function call within a tool call.
ChatCompletionRequest
Represents a chat completion request.
ChatCompletionRequestMessage
Represents a message in a chat completion request.
ChatCompletionRequestMessageContentImageUrl
Represents an image URL in a chat completion request message content part.
ChatCompletionResponseFormat
Represents the format that the model must output.
ChatCompletionResponseMessage
Represents a message in a chat completion response.
ChatCompletionStreamChoice
Represents a choice in a streaming chat completion response.
ChatCompletionStreamResponse
Represents a streaming chat completion response.
ChatCompletionStreamResponseMessage
Represents a message in a streaming chat completion response.
ChatCompletionTool
Represents a tool that can be used by the model.
ChatCompletionUsage
Represents usage statistics for a chat completion request.
CreateChatCompletionResponse
Represents a chat completion response.
ToolChoiceFunction
Represents a function to force the model to use.
ToolChoiceObject
Represents a specific tool to force the model to use.

Enums§

ChatCompletionRequestMessageContent
Represents the content of a message in a chat completion request. Can be a simple string or a list of content parts (for multimodal input).
ChatCompletionRequestMessageContentPart
Represents a part of the content in a chat completion request message. Can be text or an image URL.
ToolChoiceOption
Represents the choice of tool to use.