OpenAI API

ChatCompletionRequestSystemMessageContentPart

One Of
typestringrequired

The type of the content part.

Allowed values:text

textstringrequired

The text content.

Example

Tool message

object
rolestringrequired

The role of the messages author, in this case tool.

Allowed values:tool

contentOne Of
required

The contents of the tool message.

Text contentstring

The contents of the tool message.

tool_call_idstringrequired

Tool call that this message is responding to.

Example

ChatCompletionRequestToolMessageContentPart

One Of
typestringrequired

The type of the content part.

Allowed values:text

textstringrequired

The text content.

Example

User message

object

Messages sent by an end user, containing prompts or additional context
information.

contentOne Of
required

The contents of the user message.

Text contentstring

The text contents of the message.

rolestringrequired

The role of the messages author, in this case user.

Allowed values:user

namestring

An optional name for the participant. Provides the model information to differentiate between participants of the same role.

Example

ChatCompletionRequestUserMessageContentPart

One Of
typestringrequired

The type of the content part.

Allowed values:text

textstringrequired

The text content.

Example