-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🚧 wip: Dify integration & Agnet code refactor #4404
base: main
Are you sure you want to change the base?
Conversation
@cy948 is attempting to deploy a commit to the LobeChat Community Team on Vercel. A member of the Team first needs to authorize it. |
👍 @cy948 Thank you for raising your pull request and contributing to our Community |
建议写个 RFC 把过程做个记录。可以在每一层写一些有坑或者有意思的点 |
It is recommended to write an RFC to record the process. You can write some pitfalls or interesting points on each layer. |
好,那PR上只保留最后的方案? |
Okay, then only the final solution will be retained in the PR? |
对 |
right |
💻 变更类型 | Change Type
🔀 变更说明 | Description of Change
对 Dify 的接入需要对以下方面进行重构
1. 助手层面
允许自定义 conversation list 获取,并且不存储
自定义 根据 conversation_id 的 chat message 获取,并且不存储
2. Model Provider
增加一个处理Dify响应流的 model provider
对 convesation context 的追踪由前端传入的 conversation id追踪,而非先前的整个 messages 历史
目前方案
src/libs/agent-runtime/dify/index.ts
3. Dify 响应流的处理
read first key concepts | dify
message
处理node event
处理workflow
处理目前方案
src/libs/agent-runtime/utils/streams/dify.ts
📝 补充信息 | Additional Information
进度track
完成 Model Provider 的实现,初步处理 Dify 响应流