Skip to content
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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cy948
Copy link
Contributor

@cy948 cy948 commented Oct 18, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | 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

  • 2024/10/18

完成 Model Provider 的实现,初步处理 Dify 响应流
image

Copy link

vercel bot commented Oct 18, 2024

@cy948 is attempting to deploy a commit to the LobeChat Community Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

👍 @cy948

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@arvinxx
Copy link
Contributor

arvinxx commented Oct 18, 2024

建议写个 RFC 把过程做个记录。可以在每一层写一些有坑或者有意思的点

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is recommended to write an RFC to record the process. You can write some pitfalls or interesting points on each layer.

@cy948
Copy link
Contributor Author

cy948 commented Oct 18, 2024

建议写个 RFC 把过程做个记录。可以在每一层写一些有坑或者有意思的点

好,那PR上只保留最后的方案?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is recommended to write an RFC to record the process. You can write some pitfalls or interesting points on each layer.

Okay, then only the final solution will be retained in the PR?

@arvinxx
Copy link
Contributor

arvinxx commented Oct 19, 2024

建议写个 RFC 把过程做个记录。可以在每一层写一些有坑或者有意思的点

好,那PR上只保留最后的方案?

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


It is recommended to write an RFC to record the process. You can write some pitfalls or interesting points on each layer.

Okay, then only the final solution will be retained in the PR?

right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants