lobehub/lobe-chat

[Request] Dify provider #1563

QIN2DIM posted onGitHub

🥰 需求描述

能否有任何一种方法,可以将 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

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。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

posted by lobehubbot about 1 year ago

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.

posted by lobehubbot about 1 year ago
  1. dify 是否有 OpenAI ChatCompetition 兼容接口?有的话可以当成一个 Provider 来集成,欢迎到 https://github.com/lobehub/lobe-chat/discussions/1284 这里提需求。
  2. 知识库这块在今年的 Roadmap 里,如果只是希望使用知识库的话,可以等等
posted by arvinxx 12 months ago

dify 没有 OpenAI 格式的接口

posted by fatwang2 11 months ago

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


dify does not have an interface in OpenAI format

posted by lobehubbot 11 months ago

✅ @QIN2DIM

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

posted by lobehubbot 9 months ago

Fund this Issue

$0.00
Funded

Pull requests