Incomplete and Outdated Features in webapp-conversation Template Project #52

Closed
opened 2026-02-16 10:15:56 -05:00 by yindo · 2 comments
Owner

Originally created by @yjc980121 on GitHub (Nov 20, 2024).

Issue: Incomplete and Outdated Features in webapp-conversation Template Project

Summary:

The webapp-conversation template project appears to be missing several key features and is not fully synchronized with the latest version of the Dify API and SDK. Specifically, the following issues have been identified:

  1. Lack of Streaming Output: The current implementation does not support streaming output. Instead, it outputs all data at once during the onMessageEnd event. Although the ssePost function is present in the code, it does not seem to be functioning as expected.

  2. Missing Citations and Attributions: The template does not display the source of the documentation (current message and historical messages).

  3. No TTS (Text-to-Speech) Support: The template lacks support for TTS, which is a feature available in the latest Dify API.

Detailed Analysis:

Upon investigation, it was found that the ssePost function in the webapp-conversation template project only handles a limited set of events:

  • onData
  • onCompleted
  • onThought
  • onFile
  • onMessageEnd
  • onMessageReplace
  • onWorkflowStarted
  • onWorkflowFinished
  • onNodeStarted
  • onNodeFinished
  • onError

However, the latest version of the Dify API includes additional events that are not currently supported in the webapp-conversation template:

  • onIterationStart
  • onIterationNext
  • onIterationFinish
  • onParallelBranchStarted
  • onParallelBranchFinished
  • onTextChunk
  • onTTSChunk
  • onTTSEnd
  • onTextReplace
  • getAbortController

While some of these events may not be applicable to conversational applications, many of them are essential for fully utilizing the capabilities of the Dify API.

Additionally, the dify_client library (JavaScript SDK) used in the template project appears to be outdated and not synchronized with the latest Dify API.

Recommendations:

  1. Update the ssePost Function: Ensure that the ssePost function in the webapp-conversation template project supports all relevant events from the latest Dify API.

  2. Implement Streaming Output: Modify the implementation to support streaming output, allowing data to be sent incrementally rather than all at once.

  3. Add Citations and Attributions: Implement functionality to display the source of the documentation (current and historical messages).

  4. Include TTS Support: Add support for Text-to-Speech (TTS) using the onTTSChunk and onTTSEnd events.

  5. Synchronize with Latest SDK: Update the dify_client library to the latest version and ensure that all features are fully supported in the webapp-conversation template project.

Conclusion:

The webapp-conversation template project is currently missing several key features and is not aligned with the latest Dify API and SDK. To fully leverage the capabilities of Dify, it is essential to update the template project to support all relevant events and features, including streaming output, citations and attributions, and TTS.


Note: This issue is intended to highlight the discrepancies and suggest improvements. No immediate action is expected, but it is recommended to address these issues in future updates.

Originally created by @yjc980121 on GitHub (Nov 20, 2024). ### Issue: Incomplete and Outdated Features in `webapp-conversation` Template Project #### Summary: The `webapp-conversation` template project appears to be missing several key features and is not fully synchronized with the latest version of the Dify API and SDK. Specifically, the following issues have been identified: 1. **Lack of Streaming Output**: The current implementation does not support streaming output. Instead, it outputs all data at once during the `onMessageEnd` event. Although the `ssePost` function is present in the code, it does not seem to be functioning as expected. 2. **Missing Citations and Attributions**: The template does not display the source of the documentation (current message and historical messages). 3. **No TTS (Text-to-Speech) Support**: The template lacks support for TTS, which is a feature available in the latest Dify API. #### Detailed Analysis: Upon investigation, it was found that the `ssePost` function in the `webapp-conversation` template project only handles a limited set of events: - `onData` - `onCompleted` - `onThought` - `onFile` - `onMessageEnd` - `onMessageReplace` - `onWorkflowStarted` - `onWorkflowFinished` - `onNodeStarted` - `onNodeFinished` - `onError` However, the latest version of the Dify API includes additional events that are not currently supported in the `webapp-conversation` template: - `onIterationStart` - `onIterationNext` - `onIterationFinish` - `onParallelBranchStarted` - `onParallelBranchFinished` - `onTextChunk` - `onTTSChunk` - `onTTSEnd` - `onTextReplace` - `getAbortController` While some of these events may not be applicable to conversational applications, many of them are essential for fully utilizing the capabilities of the Dify API. Additionally, the `dify_client` library (JavaScript SDK) used in the template project appears to be outdated and not synchronized with the latest Dify API. #### Recommendations: 1. **Update the `ssePost` Function**: Ensure that the `ssePost` function in the `webapp-conversation` template project supports all relevant events from the latest Dify API. 2. **Implement Streaming Output**: Modify the implementation to support streaming output, allowing data to be sent incrementally rather than all at once. 3. **Add Citations and Attributions**: Implement functionality to display the source of the documentation (current and historical messages). 4. **Include TTS Support**: Add support for Text-to-Speech (TTS) using the `onTTSChunk` and `onTTSEnd` events. 5. **Synchronize with Latest SDK**: Update the `dify_client` library to the latest version and ensure that all features are fully supported in the `webapp-conversation` template project. #### Conclusion: The `webapp-conversation` template project is currently missing several key features and is not aligned with the latest Dify API and SDK. To fully leverage the capabilities of Dify, it is essential to update the template project to support all relevant events and features, including streaming output, citations and attributions, and TTS. --- **Note**: This issue is intended to highlight the discrepancies and suggest improvements. No immediate action is expected, but it is recommended to address these issues in future updates.
yindo closed this issue 2026-02-16 10:15:56 -05:00
Author
Owner

@remisharrock commented on GitHub (Nov 22, 2024):

Thank your for this detailed issue, mine is less detailed but I had the same questions : https://github.com/langgenius/webapp-conversation/issues/107

@remisharrock commented on GitHub (Nov 22, 2024): Thank your for this detailed issue, mine is less detailed but I had the same questions : https://github.com/langgenius/webapp-conversation/issues/107
Author
Owner

@remisharrock commented on GitHub (Jan 13, 2025):

what is the status on this ?

@remisharrock commented on GitHub (Jan 13, 2025): what is the status on this ?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/webapp-conversation#52