AS AgentScopeAPI 手册 / API Reference

ThinkLevel

record ThinkLevel(String level) implements ThinkOption
源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:127–166

承载 Think 级别数据的记录类型。位于 io.agentscope.extensions.model.ollama.options 包,实现 ThinkOption。核心成员包括 level、toJsonValue、ThinkLevel、LOW、MEDIUM、HIGH。

Implementation of ThinkOption representing a specific level of reasoning effort. Designed for models that allow tuning the "effort" or "depth" of the chain of thought.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
levelString
执行级别相关操作。
The desired level of thinking (must be one of: "low", "medium", "high").

字段摘要Field Summary

字段Field类型Type说明Description
LOW
staticfinal
ThinkLevel
LOW字段。
Predefined constant for low-effort thinking.
MEDIUM
staticfinal
ThinkLevel
MEDIUM字段。
Predefined constant for medium-effort thinking.
HIGH
staticfinal
ThinkLevel
HIGH字段。
Predefined constant for high-effort thinking.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ThinkLevel(String level)
初始化 `ThinkLevel` 实例。
Constructs a new ThinkLevel with validation.

方法摘要Method Summary

方法Method说明Description
public Object toJsonValue()
返回到 JSON 值。
Returns the to json value.

记录组件详情Record Component Detail

level

String level

执行级别相关操作。

The desired level of thinking (must be one of: "low", "medium", "high").

源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:127–166

字段详情Field Detail

LOW

public static final ThinkLevel LOW
staticfinal

LOW字段。声明为 public static final ThinkLevel LOW。

Predefined constant for low-effort thinking.

源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:134

MEDIUM

public static final ThinkLevel MEDIUM
staticfinal

MEDIUM字段。声明为 public static final ThinkLevel MEDIUM。

Predefined constant for medium-effort thinking.

源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:139

HIGH

public static final ThinkLevel HIGH
staticfinal

HIGH字段。声明为 public static final ThinkLevel HIGH。

Predefined constant for high-effort thinking.

源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:144

构造器详情Constructor Detail

ThinkLevel

public ThinkLevel(String level)

初始化 ThinkLevel 实例。

Constructs a new ThinkLevel with validation.

参数Parameters
名称Name类型Type说明Description
levelString级别(类型 `String`)。The thinking level string.
抛出Throws
  • IllegalArgumentException 可能抛出 `IllegalArgumentException`。if the provided level is not within the valid set.
源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:152–160

方法详情Method Detail

toJsonValue

public Object toJsonValue()

返回到 JSON 值。

Returns the to json value.

返回Returns Object
返回对象。Returns object.
源码Source io/agentscope/extensions/model/ollama/options/ThinkOption.java:162–165
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.