public interface IDifyClient
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getAppInfo()
获取应用基础信息
|
String |
getAppMetaInfo()
获取应用元数据
|
String |
getAppParameters()
获取应用参数信息
|
String |
requestJson(DifyRoute route)
request by application/json content-type
|
String |
requestJson(DifyRoute route,
List<PathVariables> pathVariables)
request by application/json content-type
|
String |
requestJson(DifyRoute route,
List<PathVariables> pathVariables,
Map<String,Object> query)
request by application/json content-type
|
String |
requestJson(DifyRoute route,
List<PathVariables> pathVariables,
Map<String,Object> query,
Object params)
request by application/json content-type
|
String |
requestJson(DifyRoute route,
Map<String,Object> query)
request by application/json content-type
|
String |
requestJson(DifyRoute route,
Map<String,Object> query,
Object params)
request by application/json content-type
|
String |
requestJson(String url,
HttpMethod method,
List<PathVariables> pathVariables,
Map<String,Object> query,
Object params)
request by application/json content-type
|
String |
requestJson(String url,
HttpMethod method,
Map<String,Object> query,
Object params)
request by application/json content-type
|
String |
requestMultipart(DifyRoute route,
List<PathVariables> pathVariables,
Map<String,Object> query,
Map<String,Object> params)
request by multipart/form-data content-type
|
String |
requestMultipart(DifyRoute route,
Map<String,Object> query,
Map<String,Object> params)
request by multipart/form-data content-type
|
String |
requestMultipart(String url,
HttpMethod method,
List<PathVariables> pathVariables,
Map<String,Object> query,
Map<String,Object> params)
request by multipart/form-data content-type
|
String |
sendBlocking(DifyRoute route,
Map<String,Object> params)
发送同步接口请求
|
String |
sendBlocking(DifyRoute route,
Map<String,Object> query,
Map<String,Object> params)
发送同步接口请求
|
CompletableFuture<Void> |
sendStreaming(DifyRoute route,
List<PathVariables> pathVariables,
Map<String,Object> query,
Map<String,Object> params,
Consumer<String> consumer)
发送流式接口请求
|
CompletableFuture<Void> |
sendStreaming(DifyRoute route,
Map<String,Object> params,
Consumer<String> consumer)
发送流式接口请求
|
CompletableFuture<Void> |
sendStreaming(DifyRoute route,
Map<String,Object> query,
Map<String,Object> params,
Consumer<String> consumer)
发送流式接口请求
|
DifyFileResult |
uploadFile(File file,
String user)
上传文件
|
String getAppInfo() throws IOException, InterruptedException
IOException - 错误InterruptedExceptionString getAppParameters() throws IOException, InterruptedException
IOException - 错误InterruptedExceptionString getAppMetaInfo() throws IOException, InterruptedException
IOException - 错误InterruptedExceptionDifyFileResult uploadFile(File file, String user) throws DifyException, IOException, InterruptedException
file - 文件对象user - 用户标识DifyException - 错误IOExceptionInterruptedExceptionString sendBlocking(DifyRoute route, Map<String,Object> params) throws DifyException, IOException, InterruptedException
route - DifyRouteparams - Body paramsDifyException - 错误IOExceptionInterruptedExceptionString sendBlocking(DifyRoute route, Map<String,Object> query, Map<String,Object> params) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query paramsparams - Body paramsDifyException - 错误IOExceptionInterruptedExceptionCompletableFuture<Void> sendStreaming(DifyRoute route, Map<String,Object> params, Consumer<String> consumer)
route - DifyRouteparams - Body paramsCompletableFuture<Void> sendStreaming(DifyRoute route, List<PathVariables> pathVariables, Map<String,Object> query, Map<String,Object> params, Consumer<String> consumer)
route - DifyRoutequery - Query paramsparams - Body paramsCompletableFuture<Void> sendStreaming(DifyRoute route, Map<String,Object> query, Map<String,Object> params, Consumer<String> consumer)
route - DifyRoutequery - Query paramsparams - Body paramsString requestJson(DifyRoute route) throws DifyException, IOException, InterruptedException
route - DifyRouteDifyException - 错误IOExceptionInterruptedExceptionString requestJson(DifyRoute route, Map<String,Object> query) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query 查询参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(DifyRoute route, Map<String,Object> query, Object params) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query 查询参数params - Body 参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(DifyRoute route, List<PathVariables> pathVariables) throws DifyException, IOException, InterruptedException
route - DifyRoutepathVariables - 路径参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(DifyRoute route, List<PathVariables> pathVariables, Map<String,Object> query) throws DifyException, IOException, InterruptedException
route - DifyRoutepathVariables - 路径参数query - Query 查询参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(DifyRoute route, List<PathVariables> pathVariables, Map<String,Object> query, Object params) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query 查询参数params - Body 参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(String url, HttpMethod method, Map<String,Object> query, Object params) throws DifyException, IOException, InterruptedException
url - API URLmethod - HTTP请求方法query - Query 查询参数params - Body 参数DifyException - 错误IOExceptionInterruptedExceptionString requestJson(String url, HttpMethod method, List<PathVariables> pathVariables, Map<String,Object> query, Object params) throws DifyException, IOException, InterruptedException
url - API URLmethod - HTTP请求方法query - Query 查询参数params - Body 参数DifyException - 错误IOExceptionInterruptedExceptionString requestMultipart(DifyRoute route, Map<String,Object> query, Map<String,Object> params) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query 查询参数params - Body 参数,文件流需自行在params中传入DifyException - 错误IOExceptionInterruptedExceptionString requestMultipart(DifyRoute route, List<PathVariables> pathVariables, Map<String,Object> query, Map<String,Object> params) throws DifyException, IOException, InterruptedException
route - DifyRoutequery - Query 查询参数params - Body 参数,文件流需自行在params中传入DifyException - 错误IOExceptionInterruptedExceptionString requestMultipart(String url, HttpMethod method, List<PathVariables> pathVariables, Map<String,Object> query, Map<String,Object> params) throws DifyException, IOException, InterruptedException
url - API URLmethod - HTTP请求方法query - Query 查询参数params - Body 参数,文件流需自行在params中传入DifyException - 错误IOExceptionInterruptedExceptionCopyright © 2025. All rights reserved.