枚举类 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()
      返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
      返回:
      包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
    • valueOf

      public static StructuredOutputReminder valueOf(String name)
      返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - 如果该枚举类没有带有指定名称的常量
      NullPointerException - 如果参数为空值