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

[Request] Dify provider #1563

Closed
QIN2DIM opened this issue Mar 14, 2024 · 6 comments
Closed

[Request] Dify provider #1563

QIN2DIM opened this issue Mar 14, 2024 · 6 comments
Labels
🌠 Feature Request New feature or request | 特性与建议 Inactive No response in 30 days | 超过 30 天未活跃

Comments

@QIN2DIM
Copy link

QIN2DIM commented Mar 14, 2024

🥰 需求描述

能否有任何一种方法,可以将 Dify 暴露出来的后端接口集成到 lobe-chat 中。

🧐 解决方案

目前(以 Claude3 为例):

(User) --> (LobeChat) --> (RealProvider)

预期:

(User) --> (LobeChat) --> (DifyAPI) --> (RealProvider)
  • 很久之前有在 lobe-chat 提过知识库的需求,但这个议题早已 inactive 了。

  • Dify 上可以做更多的除 prompt 之外的编排工作。如果可以接入 DifyAPI 的话,相当于曲线套壳,接入了更丰富的生态。

  • 目前 lobe-chat 的软件架构很灵活,公共商店的插件更新和新提供商的集成速度非常快。但也因为灵活性放弃了接入 pg 和 Milvus 之类的知识库基础设施。但类似 Dify,fastgpt 对外暴露了接口可以在其他地方接入知识库的功能。

📝 补充信息

DifyAPI 暴露的操控聊天应用(智能体)的接口并不是兼容性的 OpenAI 接口,返回类型和请求参数都不一样。所以直接改环境变量的 OPENAI_PROXYOPENAI_API_KEY 不起作用。

@QIN2DIM QIN2DIM added the 🌠 Feature Request New feature or request | 特性与建议 label Mar 14, 2024
@lobehubbot
Copy link
Member

👀 @QIN2DIM

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@lobehubbot
Copy link
Member

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


🥰 Description of requirements

Is there any way to integrate the backend interface exposed by Dify into lobe-chat.

🧐 Solution

Currently (taking Claude3 as an example):

(User) --> (LobeChat) --> (RealProvider)

expected:

(User) --> (LobeChat) --> (DifyAPI) --> (RealProvider)
  • The need for a knowledge base was mentioned in lobe-chat a long time ago, but this topic has long been inactive.

  • You can do more arrangement work on Dify besides prompt. If you can access DifyAPI, it is equivalent to a curve shell and has access to a richer ecosystem.

  • The current software architecture of lobe-chat is very flexible, and the public store plugin updates and integration of new providers are very fast. But it also gave up access to knowledge base infrastructure such as pg and Milvus because of flexibility. But similar to Dify, fastgpt exposes the function of interface to access the knowledge base in other places.

📝 Supplementary information

The interface exposed by DifyAPI to control the chat application (agent) is not a compatible OpenAI interface, and the return type and request parameters are different. Therefore, directly changing the environment variables OPENAI_PROXY and OPENAI_API_KEY will not work.

@arvinxx
Copy link
Contributor

arvinxx commented Mar 14, 2024

  1. dify 是否有 OpenAI ChatCompetition 兼容接口?有的话可以当成一个 Provider 来集成,欢迎到 More Model Providers support 更多模型服务商支持 #1284 这里提需求。
  2. 知识库这块在今年的 Roadmap 里,如果只是希望使用知识库的话,可以等等

@fatwang2
Copy link

fatwang2 commented Apr 9, 2024

dify 没有 OpenAI 格式的接口

@lobehubbot
Copy link
Member

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


dify does not have an interface in OpenAI format

@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Jun 9, 2024
@arvinxx arvinxx closed this as completed Jun 24, 2024
@lobehubbot
Copy link
Member

@QIN2DIM

This issue is closed, If you have any questions, you can comment and reply.
此问题已经关闭。如果您有任何问题,可以留言并回复。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议 Inactive No response in 30 days | 超过 30 天未活跃
Projects
None yet
Development

No branches or pull requests

4 participants