AS AgentScopeAPI 手册 / API Reference

ModelHttpException

public interface ModelHttpException
源码Source io/agentscope/core/model/ModelHttpException.java:24–44

定义模型 HTTP 异常契约的接口。位于 io.agentscope.core.model 包。核心成员包括 getStatusCode、isRetryableHttpStatus。

Exception contract for model providers that can expose an HTTP status code.

This keeps retry classification provider-neutral while allowing extension modules to preserve provider-specific exception types.

方法摘要Method Summary

方法Method说明Description
public Integer getStatusCode()
获取 `getStatusCode`。
Returns the HTTP status code associated with the model failure.
default public boolean isRetryableHttpStatus()
default
判断是否 `isRetryableHttpStatus`。
Returns whether this HTTP status is retryable by default.

方法详情Method Detail

getStatusCode

public Integer getStatusCode()

获取 getStatusCode。

Returns the HTTP status code associated with the model failure.

返回Returns Integer
返回数值结果。HTTP status code, or null when no status code is available
源码Source io/agentscope/core/model/ModelHttpException.java:31

isRetryableHttpStatus

default public boolean isRetryableHttpStatus()
default

判断是否 isRetryableHttpStatus。

Returns whether this HTTP status is retryable by default.

返回Returns boolean
返回布尔值,表示判断结果。true if the status code should be retried
源码Source io/agentscope/core/model/ModelHttpException.java:40–43
基于官方固定版本源码静态生成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.