类class
agentscope.modelParameters
class Parameters(BaseModel)
源码Source
agentscope/model/_xai/_model.py:39–88参数用于 xAI 聊天模型。位于 agentscope.model 包。
The parameters for the xAI 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 for the LLM output.', gt=0) |
thinking_enable | bool | `thinking_enable` 字段。 | Field(default=False, title='Thinking', description='Whether to enable reasoning for models that support extended thinking (e.g. ``grok-3-mini``). Use reasoning_effort to control the depth of reasoning.') |
reasoning_effort | Literal['low', 'medium', 'high'] | None | `reasoning_effort` 字段。 | Field(default=None, title='Reasoning Effort', description="Controls the depth of reasoning for models that support extended thinking (e.g. ``grok-3-mini``). Set to ``'low'``, ``'medium'``, or ``'high'`` to enable reasoning with the corresponding effort level. ``None`` disables reasoning.") |
temperature | float | None | `temperature` 字段。 | Field(default=None, title='Temperature', description='The temperature for the LLM output.', ge=0, le=2) |
top_p | float | None | `top_p` 字段。 | Field(default=None, title='Top P', description='The top-p nucleus sampling value.', gt=0, le=1) |
属性详情Attribute Detail
max_tokens
int | None = Field(default=None, title='Max Tokens', description='The maximum number of tokens for the LLM output.', gt=0)最大令牌数字段。声明为 int | None。
The maximum number of tokens for the LLM output.
源码Source
agentscope/model/_xai/_model.py:42thinking_enable
bool = Field(default=False, title='Thinking', description='Whether to enable reasoning for models that support extended thinking (e.g. ``grok-3-mini``). Use reasoning_effort to control the depth of reasoning.')thinking_enable 字段。声明为 bool。
Whether to enable reasoning for models that support extended thinking (e.g.
源码Source
agentscope/model/_xai/_model.py:50reasoning_effort
Literal['low', 'medium', 'high'] | None = Field(default=None, title='Reasoning Effort', description="Controls the depth of reasoning for models that support extended thinking (e.g. ``grok-3-mini``). Set to ``'low'``, ``'medium'``, or ``'high'`` to enable reasoning with the corresponding effort level. ``None`` disables reasoning.")reasoning_effort 字段。声明为 Literal['low', 'medium', 'high'] | None。
Controls the depth of reasoning for models that support extended thinking (e.g.
源码Source
agentscope/model/_xai/_model.py:60temperature
float | None = Field(default=None, title='Temperature', description='The temperature for the LLM output.', ge=0, le=2)temperature 字段。声明为 float | None。
The temperature for the LLM output.
源码Source
agentscope/model/_xai/_model.py:72top_p
float | None = Field(default=None, title='Top P', description='The top-p nucleus sampling value.', gt=0, le=1)top_p 字段。声明为 float | None。
The top-p nucleus sampling value.
源码Source
agentscope/model/_xai/_model.py:81