OllamaHttpException
public static class OllamaHttpException extends RuntimeException
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:287–322Ollama HTTP 异常,表示执行过程中的错误。位于 io.agentscope.extensions.model.ollama 包,继承自 RuntimeException。核心成员包括 getStatusCode、getResponseBody、OllamaHttpException。
Exception thrown when Ollama HTTP operations fail.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OllamaHttpException(String message) | 初始化 `OllamaHttpException` 实例。 Creates a new instance. |
public OllamaHttpException(String message, Throwable cause) | 初始化 `OllamaHttpException` 实例。 Creates a new instance. |
public OllamaHttpException(String message, int statusCode, String responseBody) | 初始化 `OllamaHttpException` 实例。 Creates a new instance. |
public OllamaHttpException(String message, String errorCode, String responseBody) | 初始化 `OllamaHttpException` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Integer getStatusCode() | 获取 `getStatusCode`。 Returns the status code. |
public String getResponseBody() | 获取响应正文。 Returns the response body. |
构造器详情Constructor Detail
OllamaHttpException
public OllamaHttpException(String message)
初始化 OllamaHttpException 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:291–295OllamaHttpException
public OllamaHttpException(String message, Throwable cause)
初始化 OllamaHttpException 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
cause | Throwable | cause(类型 `Throwable`)。The cause. |
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:297–301OllamaHttpException
public OllamaHttpException(String message, int statusCode, String responseBody)
初始化 OllamaHttpException 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
statusCode | int | 状态 Code(类型 `int`)。The status code. |
responseBody | String | 响应正文(类型 `String`)。The response body. |
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:303–307OllamaHttpException
public OllamaHttpException(String message, String errorCode, String responseBody)
初始化 OllamaHttpException 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
message | String | 消息(类型 `String`)。The message. |
errorCode | String | 错误 Code(类型 `String`)。The error code. |
responseBody | String | 响应正文(类型 `String`)。The response body. |
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:309–313方法详情Method Detail
getStatusCode
public Integer getStatusCode()
获取 getStatusCode。
Returns the status code.
Integer返回数值结果。Returns a numeric result.
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:315–317getResponseBody
public String getResponseBody()
获取响应正文。
Returns the response body.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/extensions/model/ollama/OllamaHttpClient.java:319–321