mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2026-07-25 21:46:08 -04:00
Incomplete and Outdated Features in webapp-conversation Template Project #52
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yjc980121 on GitHub (Nov 20, 2024).
Issue: Incomplete and Outdated Features in
webapp-conversationTemplate ProjectSummary:
The
webapp-conversationtemplate 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:Lack of Streaming Output: The current implementation does not support streaming output. Instead, it outputs all data at once during the
onMessageEndevent. Although thessePostfunction is present in the code, it does not seem to be functioning as expected.Missing Citations and Attributions: The template does not display the source of the documentation (current message and historical messages).
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
ssePostfunction in thewebapp-conversationtemplate project only handles a limited set of events:onDataonCompletedonThoughtonFileonMessageEndonMessageReplaceonWorkflowStartedonWorkflowFinishedonNodeStartedonNodeFinishedonErrorHowever, the latest version of the Dify API includes additional events that are not currently supported in the
webapp-conversationtemplate:onIterationStartonIterationNextonIterationFinishonParallelBranchStartedonParallelBranchFinishedonTextChunkonTTSChunkonTTSEndonTextReplacegetAbortControllerWhile 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_clientlibrary (JavaScript SDK) used in the template project appears to be outdated and not synchronized with the latest Dify API.Recommendations:
Update the
ssePostFunction: Ensure that thessePostfunction in thewebapp-conversationtemplate project supports all relevant events from the latest Dify API.Implement Streaming Output: Modify the implementation to support streaming output, allowing data to be sent incrementally rather than all at once.
Add Citations and Attributions: Implement functionality to display the source of the documentation (current and historical messages).
Include TTS Support: Add support for Text-to-Speech (TTS) using the
onTTSChunkandonTTSEndevents.Synchronize with Latest SDK: Update the
dify_clientlibrary to the latest version and ensure that all features are fully supported in thewebapp-conversationtemplate project.Conclusion:
The
webapp-conversationtemplate 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.
@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 (Jan 13, 2025):
what is the status on this ?