枚举类 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 StructuredOutputReminder返回带有指定名称的该类的枚举常量。static StructuredOutputReminder[]values()返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同
-
枚举常量详细资料
-
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
返回包含该枚举类的常量的数组, 顺序与声明这些常量的顺序相同- 返回:
- 包含该枚举类的常量的数组,顺序与声明这些常量的顺序相同
-
valueOf
返回带有指定名称的该类的枚举常量。 字符串必须与用于声明该类的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- 如果该枚举类没有带有指定名称的常量NullPointerException- 如果参数为空值
-