java.lang.Object
co.elastic.clients.elasticsearch.inference.Message
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class Message extends Object implements JsonpSerializable
An object representing part of the conversation.
See Also:
  • Field Details

  • Method Details

    • of

    • content

      @Nullable public final MessageContent content()
      The content of the message.

      API name: content

    • role

      public final String role()
      Required - The role of the message author.

      API name: role

    • toolCallId

      @Nullable public final String toolCallId()
      The tool call that this message is responding to.

      API name: tool_call_id

    • toolCalls

      public final List<ToolCall> toolCalls()
      The tool calls generated by the model.

      API name: tool_calls

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupMessageDeserializer

      protected static void setupMessageDeserializer(ObjectDeserializer<Message.Builder> op)