Record Class OpenAiApi.ChatCompletionMessage

java.lang.Object
java.lang.Record
org.springframework.ai.openai.api.OpenAiApi.ChatCompletionMessage
Record Components:
rawContent - The contents of the message. Can be either a OpenAiApi.ChatCompletionMessage.MediaContent or a String. The response message content is always a String.
role - The role of the messages author. Could be one of the OpenAiApi.ChatCompletionMessage.Role types.
name - An optional name for the participant. Provides the model information to differentiate between participants of the same role. In case of Function calling, the name is the function name that the message is responding to.
toolCallId - Tool call that this message is responding to. Only applicable for the OpenAiApi.ChatCompletionMessage.Role.TOOL role and null otherwise.
toolCalls - The tool calls generated by the model, such as function calls. Applicable only for OpenAiApi.ChatCompletionMessage.Role.ASSISTANT role and null otherwise.
refusal - The refusal message by the assistant. Applicable only for OpenAiApi.ChatCompletionMessage.Role.ASSISTANT role and null otherwise.
audioOutput - Audio response from the model.
annotations - Annotations for the message, when applicable, as when using the web search tool.
Enclosing class:
OpenAiApi

public static record OpenAiApi.ChatCompletionMessage(Object rawContent, OpenAiApi.ChatCompletionMessage.Role role, String name, String toolCallId, List<OpenAiApi.ChatCompletionMessage.ToolCall> toolCalls, String refusal, OpenAiApi.ChatCompletionMessage.AudioOutput audioOutput, List<OpenAiApi.ChatCompletionMessage.Annotation> annotations) extends Record
Message comprising the conversation.