Expand description
Module for handling chat completion requests and responses.
This module defines the structures and methods for handling chat completion requests and responses.
It includes the ChatCompletionRequest
, ChatCompletionResponse
, ChatCompletionMessage
,
ChatCompletionChoice
, Function
, FunctionParameters
, JSONSchemaType
, JSONSchemaDefine
,
FinishReason
, FinishDetails
, ToolCall
, ToolCallFunction
, and Tool
structs along with their associated methods.
These structures facilitate the creation, serialization, and deserialization of chat completion requests and responses
in various formats, allowing for customizable and extensible interactions with chat models.
Structs§
- Chat
Completion Choice - Represents a choice in a chat completion response.
- Chat
Completion Message - Represents a chat completion message.
- Chat
Completion Message ForResponse - Represents a chat completion message for a response.
- Chat
Completion Request - Represents a request for chat completion.
- Chat
Completion Response - Represents a chat completion response.
- Finish
Details - Additional details for the finish reason.
- Function
- Represents a function definition.
- Function
Parameters - Represents the parameters of a function using JSON schema.
- Image
Url - Represents an image URL.
- Image
UrlType - Represents the URL of an image.
- JSON
Schema Define - Defines the structure of a JSON schema.
- Tool
- Represents a tool in the request.
- Tool
Call - Represents a tool call in the chat completion response.
- Tool
Call Function - Represents a function associated with a tool call.
Enums§
- Content
- Represents the content of a message.
- Content
Type - Represents the type of content.
- Finish
Reason - Reason for finishing the response.
- JSON
Schema Type - Represents the JSON schema type.
- Tool
Choice Type - Represents the type of tool choice in the request.
- Tool
Type - Enum for different types of tools.