Releases: imfangs/dify-java-client
Releases · imfangs/dify-java-client
Release list
v1.6.0
Changes
- Add Service API for Knowledge Pipeline (RAG Pipeline) — 4 new endpoints on
DifyDatasetsClientList<DatasourcePluginResponse> listPipelineDatasourcePlugins(String datasetId, Boolean isPublished)—GET /datasets/{id}/pipeline/datasource-pluginsvoid runPipelineDatasourceNodeStream(...)—POST /datasets/{id}/pipeline/datasource/nodes/{node_id}/run, SSE stream of node execution eventsMap<String,Object> runPipeline(String datasetId, PipelineRunRequest request)—POST /datasets/{id}/pipeline/runin blocking modevoid runPipelineStream(String datasetId, PipelineRunRequest request, WorkflowStreamCallback callback)— same route in streaming modePipelineFileUploadResponse uploadPipelineFile(File file)/uploadPipelineFile(InputStream, String, String)—POST /datasets/pipeline/file-upload
- New models:
DatasourcePluginResponse(with nestedCredentialInfo),DatasourceNodeRunRequest,PipelineRunRequest,PipelineFileUploadResponse - Internal refactor: promoted streaming (SSE) helpers (
executeStreamRequest,executeGetStreamRequest,processStreamLine,LineProcessor,EventProcessor) fromDefaultDifyClienttoAbstractDifyClient. Non-breaking; enablesDefaultDifyDatasetsClientto consume SSE streams and simplifies future dataset streaming endpoints
Installation
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.6.0</version>
</dependency>v1.5.0
Changes
- 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/zipbinary stream (InputStream + metadata) - New model:
DocumentBatchDownloadRequest
- New method on
- 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
- New method on
- Add support for the
reasoning_chunkstreaming event (Chatflow apps with LLM nodereasoning_format=separated)- New enum:
EventType.REASONING_CHUNK - New event model:
ReasoningChunkEvent(with nesteddata: message_id, reasoning, node_id, is_final) - New callback hook on
ChatflowStreamCallbackandWorkflowStreamCallback:onReasoningChunk - Enables rendering the model's chain-of-thought stream in parallel with the answer, without mixing
<think>into the message body
- New enum:
Installation
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.5.0</version>
</dependency>v1.4.0
Changes
- 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_byas an end-user ID, resolveexternal_user_id/session_id
- New method on
- 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 definitionvoid submitHumanInputForm(String formToken, HumanInputFormSubmitRequest request)—POST /form/human_input/{form_token}, submit inputs + selected action + user to resume the workflow- Methods live on
DifyBaseClientso 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=truereplays a status summary of already-executed nodes;continue_on_pause=truekeeps the stream open across multiple pauses
- New method on
- Introduce reusable GET-SSE helper (
executeGetStreamRequest) for future streaming endpoints
Installation
<dependency>
<groupId>io.github.imfangs</groupId>
<artifactId>dify-java-client</artifactId>
<version>1.4.0</version>
</dependency>v1.3.0
Changes
- 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
WorkflowStreamCallbackandChatflowStreamCallback:onHumanInputRequired,onWorkflowPaused,onHumanInputFormFilled,onHumanInputFormTimeout
- New events:
v1.2.7
Changes
- Optimize streaming response handling by introducing terminal event constants for different app types (#161)
- Chat/Completion streams now terminate on
message_endorerror - Chatflow/Workflow streams now terminate on
workflow_finishedorerror - Fixes issue where Chatflow events after
message_endwere being lost
- Chat/Completion streams now terminate on
- Add missing fields to
DetailedDocumentResponse:doc_type,doc_metadata,summary_index_status,need_summary(#160)