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] 暴露出一个接口,可以提供任何应用调用 #1557

Closed
XiaoMo-Donald opened this issue Mar 13, 2024 · 10 comments
Closed

[Request] 暴露出一个接口,可以提供任何应用调用 #1557

XiaoMo-Donald opened this issue Mar 13, 2024 · 10 comments
Labels
🌠 Feature Request New feature or request | 特性与建议

Comments

@XiaoMo-Donald
Copy link

🥰 需求描述

我想在其他的应用上调用这个接口来提供同样的聊天的能力

🧐 解决方案

能否在这个应用基础上暴露出一个接口,方便提供给其他应用程序使用呢?(因为这个可以部署在vercel上就已经不需要魔法了,然后通过绑定的域名再把接口转发给我自己的应用进行调用)。

当然我知道这个做起来的话 可能需要考虑到接口授权问题,不然的话任何人只要知道了你的接口都可以使用。

但是还是很想要这样的一个功能,或者不知道大佬们有没有什么其他的解决方案或者其他开源的项目可以不需要魔法部署就可以实现任何应用(包括网站、app)调用openai的接口。

当然啦,还是因为这个开源项目已经集成了比较多类型的模型,一个接口,方便任意切换任何模型而不需要改动和适配其他应用端的接口

📝 补充信息

No response

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

👀 @XiaoMo-Donald

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

I want to call this interface on other applications to provide the same chat capabilities

🧐 Solution

Can an interface be exposed based on this application so that it can be easily used by other applications? (Because this can be deployed on vercel, no magic is required, and then the interface is forwarded to my own application for calling through the bound domain name).

Of course, I know that if you do this, you may need to consider the interface authorization issue, otherwise anyone can use it as long as they know your interface.

But I still really want such a function, or I don’t know if the big guys have any other solutions or other open source projects that can implement any application (including websites and apps) to call the openai interface without magic deployment.

Of course, this is because this open source project has integrated many types of models and one interface, making it easy to switch any model at will without changing or adapting the interfaces of other applications.

📝 Supplementary information

No response

@XiaoMo-Donald XiaoMo-Donald changed the title [Request] [Request] 暴露出一个接口,可以提供任何应用调用 Mar 13, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Mar 13, 2024

现在已经有 /api/chat/[provider] 这个接口了,但这个目前还主要是给lobe-chat 本身自己用的。还没考虑开放api问题。

但你需要的话为啥不用 oneapi 这种呢?

@lobehubbot
Copy link
Member

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


There is already the interface /api/chat/[provider], but this is currently mainly used by lobe-chat itself. I haven't considered opening the API yet.

But if you need it, why not use oneapi?

@ckt1031
Copy link

ckt1031 commented Mar 13, 2024

有更大風險給予其他人直接調用LobeChat公益站

ChatUI應該做他該做的, 而不是做OneAPI/FastGPT

@lobehubbot
Copy link
Member

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


There is a greater risk for others to directly call the LobeChat charity station

ChatUI should do what it should do, not OneAPI/FastGPT

@DayDreammy
Copy link

我也有类似的需求。说一下为什么。因为lobechat有海量的插件,而oneapi是没用的,相对而言fastGPT又有一点厚重,且插件不是很多。
个人觉得开放一个端口供其他应用调用是很好的。

@lobehubbot
Copy link
Member

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


I have similar needs. Tell me why. Because lobechat has a large number of plug-ins, but oneapi is useless. Relatively speaking, fastGPT is a bit heavy and there are not many plug-ins.
Personally, I think it is good to open a port for other applications to call.

@arvinxx arvinxx closed this as completed Jun 20, 2024
@arvinxx arvinxx closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2024
@lobehubbot
Copy link
Member

@XiaoMo-Donald

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

1 similar comment
@lobehubbot
Copy link
Member

@XiaoMo-Donald

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 | 特性与建议
Projects
None yet
Development

No branches or pull requests

5 participants