Enum Class StructuredOutputReminder

java.lang.Object
java.lang.Enum<StructuredOutputReminder>
io.agentscope.core.model.StructuredOutputReminder
所有已实现的接口:
Serializable, Comparable<StructuredOutputReminder>, Constable

public enum StructuredOutputReminder extends Enum<StructuredOutputReminder>
Configuration for how to ensure the model calls generate_response tool in structured output mode.

This enum controls the mechanism used to enforce that the model calls the temporary generate_response tool when generating structured output.

  • 枚举常量详细资料

    • TOOL_CHOICE

      public static final StructuredOutputReminder TOOL_CHOICE
      Use tool_choice API parameter to force the tool call when the model doesn't call it voluntarily. This is the default and recommended option.

      When this mode is used:

      1. First round: The model is free to call any tool (including business tools)
      2. If the model doesn't call generate_response: The next round will force it via tool_choice parameter

      This approach allows the agent to complete multi-step tasks before generating the final structured output.

    • PROMPT

      public static final StructuredOutputReminder PROMPT
      Inject reminder prompt when model doesn't call the tool. Legacy approach requiring multiple API calls and retries.

      When this mode is used, if the model doesn't call the generate_response tool, a reminder message will be injected into the conversation and the agent will retry the reasoning step. This may require multiple iterations to successfully generate the structured output.

  • 方法详细资料

    • values

      public static StructuredOutputReminder[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StructuredOutputReminder valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值