agentscope.modelParameters
class Parameters(BaseModel)
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_tokens | int | None | 最大令牌数字段。 | Field(default=None, title='Max Tokens', description='The maximum number of tokens to generate in the chat completion.', gt=0) |
thinking_enable | bool | `thinking_enable` 字段。 | Field(default=False, title='Thinking', description='The thinking enable for the LLM output.') |
thinking_budget | int | None | `thinking_budget` 字段。 | Field(default=None, title='Thinking Budget', description='The thinking budget for the LLM output.', gt=0) |
thinking_mode | Literal['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_display | Literal['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_effort | Literal['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.
agentscope/model/_anthropic/_model.py:36thinking_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.
agentscope/model/_anthropic/_model.py:46thinking_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.
agentscope/model/_anthropic/_model.py:52thinking_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.
agentscope/model/_anthropic/_model.py:59thinking_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.
agentscope/model/_anthropic/_model.py:73reasoning_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.
agentscope/model/_anthropic/_model.py:83