AS AgentScopeAPI 手册 / API Reference
类class agentscope.model

Parameters

class Parameters(BaseModel)
源码Source agentscope/model/_anthropic/_model.py:33–96

参数,与模型服务通信并返回生成或向量化结果。位于 agentscope.model 包。

The parameters for the Anthropic chat model. Declared in agentscope.model.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
max_tokensint | None
最大令牌数字段。
Field(default=None, title='Max Tokens', description='The maximum number of tokens to generate in the chat completion.', gt=0)
thinking_enablebool
`thinking_enable` 字段。
Field(default=False, title='Thinking', description='The thinking enable for the LLM output.')
thinking_budgetint | None
`thinking_budget` 字段。
Field(default=None, title='Thinking Budget', description='The thinking budget for the LLM output.', gt=0)
thinking_modeLiteral['adaptive', 'enabled', 'disabled'] | None
`thinking_mode` 字段。
Field(default=None, title='Thinking Mode', description='How Claude thinks. ``adaptive`` lets the model decide when and how deeply, and is the only mode Claude Opus 4.7 and later accept — those models reject the ``enabled`` (budget-based) mode. Takes precedence over ``thinking_enable``; leave unset to fall back to it.')
thinking_displayLiteral['summarized', 'omitted'] | None
`thinking_display` 字段。
Field(default=None, title='Thinking Display', description='Whether thinking blocks carry readable summaries or come back empty. Claude Opus 4.7 and later default to ``omitted``, so set ``summarized`` to see the reasoning.')
reasoning_effortLiteral['low', 'medium', 'high', 'xhigh', 'max'] | None
`reasoning_effort` 字段。
Field(default=None, title='Reasoning Effort', description="How many tokens Claude spends on the whole response — not just thinking, but tool calls and explanation too. Sent as Anthropic's ``output_config.effort``. The API default is ``high``. Supported levels vary by model — see the model card, and note that Claude Sonnet 4.5 and Claude Haiku 4.5 do not accept this parameter at all.")

属性详情Attribute Detail

max_tokens

int | None = Field(default=None, title='Max Tokens', description='The maximum number of tokens to generate in the chat completion.', gt=0)

最大令牌数字段。声明为 int | None。

The maximum number of tokens to generate in the chat completion.

源码Source agentscope/model/_anthropic/_model.py:36

thinking_enable

bool = Field(default=False, title='Thinking', description='The thinking enable for the LLM output.')

thinking_enable 字段。声明为 bool。

The thinking enable for the LLM output.

源码Source agentscope/model/_anthropic/_model.py:46

thinking_budget

int | None = Field(default=None, title='Thinking Budget', description='The thinking budget for the LLM output.', gt=0)

thinking_budget 字段。声明为 int | None。

The thinking budget for the LLM output.

源码Source agentscope/model/_anthropic/_model.py:52

thinking_mode

Literal['adaptive', 'enabled', 'disabled'] | None = Field(default=None, title='Thinking Mode', description='How Claude thinks. ``adaptive`` lets the model decide when and how deeply, and is the only mode Claude Opus 4.7 and later accept — those models reject the ``enabled`` (budget-based) mode. Takes precedence over ``thinking_enable``; leave unset to fall back to it.')

thinking_mode 字段。声明为 Literal['adaptive', 'enabled', 'disabled'] | None。

How Claude thinks.

源码Source agentscope/model/_anthropic/_model.py:59

thinking_display

Literal['summarized', 'omitted'] | None = Field(default=None, title='Thinking Display', description='Whether thinking blocks carry readable summaries or come back empty. Claude Opus 4.7 and later default to ``omitted``, so set ``summarized`` to see the reasoning.')

thinking_display 字段。声明为 Literal['summarized', 'omitted'] | None。

Whether thinking blocks carry readable summaries or come back empty.

源码Source agentscope/model/_anthropic/_model.py:73

reasoning_effort

Literal['low', 'medium', 'high', 'xhigh', 'max'] | None = Field(default=None, title='Reasoning Effort', description="How many tokens Claude spends on the whole response — not just thinking, but tool calls and explanation too. Sent as Anthropic's ``output_config.effort``. The API default is ``high``. Supported levels vary by model — see the model card, and note that Claude Sonnet 4.5 and Claude Haiku 4.5 do not accept this parameter at all.")

reasoning_effort 字段。声明为 Literal['low', 'medium', 'high', 'xhigh', 'max'] | None。

How many tokens Claude spends on the whole response — not just thinking, but tool calls and explanation too.

源码Source agentscope/model/_anthropic/_model.py:83
基于官方固定版本源码静态生成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.