RequestBuilder
@FunctionalInterface public interface RequestBuilder
源码Source
io/agentscope/core/rag/reader/ExternalApiReader.java:269–280定义请求构建器契约的接口。位于 io.agentscope.core.rag.reader 包。核心成员包括 buildRequest。
Request builder functional interface. Allows users to customize how to build HTTP requests.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Request buildRequest(String filePath, OkHttpClient httpClient) throws Exception | 构建请求。 Builds HTTP request based on file path. |
方法详情Method Detail
buildRequest
public Request buildRequest(String filePath, OkHttpClient httpClient) throws Exception
构建请求。
Builds HTTP request based on file path.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
filePath | String | 文件路径(类型 `String`)。File path |
httpClient | OkHttpClient | HTTP 客户端(类型 `OkHttpClient`)。OkHttpClient instance (can be used for complex scenarios like file upload) |
Request返回请求。Built OkHttp Request
Exception可能抛出 `Exception`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/core/rag/reader/ExternalApiReader.java:279