Tags: imfangs/dify-java-client
Tags
v1.6.0
- Add Service API for **Knowledge Pipeline (RAG Pipeline)** — 4 new endpoints on `DifyDatasetsClient`
- `List<DatasourcePluginResponse> listPipelineDatasourcePlugins(String datasetId, Boolean isPublished)` — `GET /datasets/{id}/pipeline/datasource-plugins`
- `void runPipelineDatasourceNodeStream(...)` — `POST /datasets/{id}/pipeline/datasource/nodes/{node_id}/run`, SSE stream of node execution events
- `Map<String,Object> runPipeline(String datasetId, PipelineRunRequest request)` — `POST /datasets/{id}/pipeline/run` in **blocking** mode
- `void runPipelineStream(String datasetId, PipelineRunRequest request, WorkflowStreamCallback callback)` — same route in **streaming** mode
- `PipelineFileUploadResponse uploadPipelineFile(File file)` / `uploadPipelineFile(InputStream, String, String)` — `POST /datasets/pipeline/file-upload`
- New models: `DatasourcePluginResponse` (with nested `CredentialInfo`), `DatasourceNodeRunRequest`, `PipelineRunRequest`, `PipelineFileUploadResponse`
- **Internal refactor**: promoted streaming (SSE) helpers (`executeStreamRequest`, `executeGetStreamRequest`, `processStreamLine`, `LineProcessor`, `EventProcessor`) from `DefaultDifyClient` to `AbstractDifyClient`. Non-breaking; enables `DefaultDifyDatasetsClient` to consume SSE streams and simplifies future dataset streaming endpoints
```xml
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.6.0</version>
</dependency>
```
v1.5.0
- Add Service API for **batch document download** as ZIP (`POST /datasets/{dataset_id}/documents/download-zip`)
- New method on `DifyDatasetsClient`: `FilePreviewResponse downloadDocumentsAsZip(String datasetId, DocumentBatchDownloadRequest request)`
- Up to 100 document IDs per call; returns `application/zip` binary stream (InputStream + metadata)
- New model: `DocumentBatchDownloadRequest`
- Add Service API for **single document signed download URL** (`GET /datasets/{dataset_id}/documents/{document_id}/download`)
- New method on `DifyDatasetsClient`: `DocumentDownloadUrlResponse getDocumentDownloadUrl(String datasetId, String documentId)`
- Returns a short-lived signed URL for the original uploaded file
- New model: `DocumentDownloadUrlResponse`
- Add support for the **`reasoning_chunk`** streaming event (Chatflow apps with LLM node `reasoning_format=separated`)
- New enum: `EventType.REASONING_CHUNK`
- New event model: `ReasoningChunkEvent` (with nested `data`: message_id, reasoning, node_id, is_final)
- New callback hook on `ChatflowStreamCallback` and `WorkflowStreamCallback`: `onReasoningChunk`
- Enables rendering the model's chain-of-thought stream in parallel with the answer, without mixing `<think>` into the message body
```xml
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.5.0</version>
</dependency>
```
v1.4.0
- Add Service API for **End User** lookup (`GET /end-users/{end_user_id}`)
- New method on `DifyBaseClient` (available on chat/chatflow/workflow/completion clients): `EndUserResponse getEndUser(String endUserId)`
- New model: `EndUserResponse` (id, tenant_id, app_id, type, external_user_id, name, is_anonymous, session_id, created_at, updated_at)
- Use case: when other APIs return `created_by` as an end-user ID, resolve `external_user_id` / `session_id`
- Add Service API for **Human Input Form** (companion to the Human Input events shipped in 1.3.0)
- `HumanInputFormResponse getHumanInputForm(String formToken)` — `GET /form/human_input/{form_token}`, fetch a paused form definition
- `void submitHumanInputForm(String formToken, HumanInputFormSubmitRequest request)` — `POST /form/human_input/{form_token}`, submit inputs + selected action + user to resume the workflow
- Methods live on `DifyBaseClient` so both workflow and chatflow apps can call them
- New models: `HumanInputFormResponse`, `HumanInputFormSubmitRequest`
- Add Service API for **Workflow Resume Events** stream (`GET /workflow/{workflow_run_id}/events`)
- New method on `DifyWorkflowClient`: `void streamWorkflowEvents(String workflowRunId, String user, Boolean includeStateSnapshot, Boolean continueOnPause, WorkflowStreamCallback callback)`
- After submitting a human-input form, use this endpoint to re-subscribe to the resumed workflow's events (SSE)
- `include_state_snapshot=true` replays a status summary of already-executed nodes; `continue_on_pause=true` keeps the stream open across multiple pauses
- Introduce reusable GET-SSE helper (`executeGetStreamRequest`) for future streaming endpoints
```xml
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.4.0</version>
</dependency>
```
v1.3.0 - Add Human Input (HITL) workflow event support for Dify 1.14.2+ (#162) - New events: `human_input_required`, `workflow_paused`, `human_input_form_filled`, `human_input_form_timeout` - New event models: `HumanInputRequiredEvent`, `WorkflowPausedEvent`, `HumanInputFormFilledEvent`, `HumanInputFormTimeoutEvent` - New callback hooks on `WorkflowStreamCallback` and `ChatflowStreamCallback`: `onHumanInputRequired`, `onWorkflowPaused`, `onHumanInputFormFilled`, `onHumanInputFormTimeout`
v1.2.7 - Optimize streaming response handling by introducing terminal event constants for different app types (#161) - Chat/Completion streams now terminate on `message_end` or `error` - Chatflow/Workflow streams now terminate on `workflow_finished` or `error` - Fixes issue where Chatflow events after `message_end` were being lost - Add missing fields to `DetailedDocumentResponse`: `doc_type`, `doc_metadata`, `summary_index_status`, `need_summary` (#160)
v1.2.5 - Add `workflow_id` support for Chatflow requests to adapt multi-version workflow configuration (#151) - Improve compatibility for workflow events by supporting `workflow_id` at the event root level (when present) - Build: update Lombok to support newer JDKs and ensure annotation processing works in Maven builds
v1.2.2
v1.2.2 发布说明
数据集(Datasets)
- 将 getDatasetTags 从 POST 改为 GET(路径:/datasets/{datasetId}/tags)
- getChildChunks 增加查询参数:keyword、page、limit(返回分页信息)
- 文档元数据列表字段映射修正:将 useCount 标注为 @JsonProperty("count")
- 标记 getUploadFile 为 Deprecated(服务端无对应路由)
- 创建知识库请求新增:embedding_model、embedding_model_provider、retrieval_model
- 更新知识库请求新增:external_retrieval_model、external_knowledge_id、external_knowledge_api_id
- 文本/文件方式的文档更新请求新增:retrieval_model
应用(App / Chat)
- 新增获取应用反馈:GET /app/feedbacks
- 新增更新对话变量:PUT /conversations/{c_id}/variables/{variable_id}
- 去除 getConversationVariables 中服务端未解析的冗余查询参数 variable_name
工作流(Workflow)
- 新增按 workflow_id 运行:POST /workflows/{workflow_id}/run
- 工作流日志过滤项补齐:created_at__before/after、created_by_end_user_session_id、created_by_account
其他
- 本次为补丁版本(patch),不包含破坏性修改
- getUploadFile 仅标记为弃用(Deprecated),暂不移除;若项目中使用,请评估替代逻辑或移除依赖
- 其余新增字段均为向后兼容,默认保持与后端一致的缺省行为
PreviousNext