Enum Class StructuredOutputReminder
- 所有已实现的接口:
Serializable,Comparable<StructuredOutputReminder>,Constable
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.
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明Inject reminder prompt when model doesn't call the tool.Use tool_choice API parameter to force the tool call when the model doesn't call it voluntarily. -
方法概要
修饰符和类型方法说明static StructuredOutputReminderReturns the enum constant of this class with the specified name.static StructuredOutputReminder[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
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:
- First round: The model is free to call any tool (including business tools)
- 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
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
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
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 nameNullPointerException- 如果参数为空值
-