Class ChatResult.Builder

  • Enclosing class:
    ChatResult

    public static class ChatResult.Builder
    extends Object
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • traces

        public ChatResult.Builder traces​(List<Trace> traces)
        The trace that displays the internal progression, such as reasoning and actions during an execution.
        Parameters:
        traces - the value to set
        Returns:
        this builder
      • toolResults

        public ChatResult.Builder toolResults​(Map<String,​String> toolResults)
        A map where each key is a toolId and the value contains tool type and additional dynamic results.

        This field is deprecated and will be removed after July 02 2026.

        Parameters:
        toolResults - the value to set
        Returns:
        this builder
      • toolOutputs

        public ChatResult.Builder toolOutputs​(List<ToolOutput> toolOutputs)
        Array of tool outputs in execution order.

        Each item includes the tool OCID, output type, and corresponding content. The result structure is defined by the toolOutputType discriminator.

        Parameters:
        toolOutputs - the value to set
        Returns:
        this builder
      • requiredActions

        public ChatResult.Builder requiredActions​(List<RequiredAction> requiredActions)
        A list of actions the agent requires the user or agent client to perform.
        Parameters:
        requiredActions - the value to set
        Returns:
        this builder
      • guardrailResult

        public ChatResult.Builder guardrailResult​(String guardrailResult)
        Captures the result of guardrail evaluations as JSON string performed on either the input to the agent or the output generated by the agent.
        Parameters:
        guardrailResult - the value to set
        Returns:
        this builder