类class
agentscope.agentModelConfig
class ModelConfig(BaseModel)
源码Source
agentscope/agent/_config.py:415–442模型相关配置。位于 agentscope.agent 包。
The model related configuration. Declared in agentscope.agent.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
model_config | — | 模型配置字段。 | {'arbitrary_types_allowed': True} |
max_retries | int | 最大重试字段。 | Field(default=0, ge=0, description="Number of retries on top of the initial call before falling over to the fallback model. ``0`` means call the model exactly once and immediately move to the fallback on failure. Same semantics as ``ChatModelBase.max_retries``. Defaults to 0 to avoid compounding with the model's own inner retry loop.") |
fallback_model | ChatModelBase | None | 回退模型字段。 | Field(default=None, description='The fallback model used when the main model fails.') |
属性详情Attribute Detail
model_config
= {'arbitrary_types_allowed': True}模型配置字段。
The model config field.
源码Source
agentscope/agent/_config.py:420max_retries
int = Field(default=0, ge=0, description="Number of retries on top of the initial call before falling over to the fallback model. ``0`` means call the model exactly once and immediately move to the fallback on failure. Same semantics as ``ChatModelBase.max_retries``. Defaults to 0 to avoid compounding with the model's own inner retry loop.")最大重试字段。声明为 int。
Number of retries on top of the initial call before falling over to the fallback model.
源码Source
agentscope/agent/_config.py:422fallback_model
ChatModelBase | None = Field(default=None, description='The fallback model used when the main model fails.')回退模型字段。声明为 ChatModelBase | None。
The fallback model used when the main model fails.
源码Source
agentscope/agent/_config.py:437