lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design LLMs/AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Bedrock / Azure / Mistral / Perplexity ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT chat application.
https://chat-preview.lobehub.com
Other
34.75k stars 8.16k forks source link

[Bug] MIDJOURNEY_PROXY_URL 在Docker中不生效 #3013

Open htdohk opened 1 week ago

htdohk commented 1 week ago

📦 部署环境

Docker

📌 软件版本

v1.1.7

💻 系统环境

macOS

🌐 浏览器

Chrome

🐛 问题描述

使用Docker部署时,想为midjourney插件设置环境变量,在composer里面填写 PLUGIN_SETTINGS: "midjourney:MIDJOURNEY_PROXY_URL=https://xxx.yyy.zzz" 但客户端报错,似乎不能正确识别代理URL。该URL已在midjourney-webui.lobehub.com验证可用。请问这条环境变量应该怎么书写呢?

📷 复现步骤

No response

🚦 期望结果

No response

📝 补充信息

No response

lobehubbot commented 1 week ago

👀 @htdohk

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 commented 1 week ago

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


📦 Deployment environment

Docker

📌 Software version

v1.1.7

💻 System environment

macOS

🌐 Browser

Chrome

🐛 Problem description

When deploying using Docker, if you want to set environment variables for the midjourney plug-in, fill them in composer PLUGIN_SETTINGS: "midjourney:MIDJOURNEY_PROXY_URL=https://xxx.yyy.zzz" But the client reports an error and seems to be unable to correctly identify the proxy URL. The URL has been verified to be available at midjourney-webui.lobehub.com. How should this environment variable be written?

📷 Steps to reproduce

No response

🚦 Expected results

No response

📝 Supplementary information

No response

htdohk commented 6 days ago

捕获

Vercel中的环境变量为: PLUGIN_SETTINGS search1api:SEARCH1API_KEY=7A661883-xxxx-yyyy-zzzz-0FEDF80E555D,midjourney:MIDJOURNEY_PROXY_URL=https://mj-proxy.xxxx.xx

@arvinxx 请帮忙支持,谢谢

arvinxx commented 6 days ago

plugin settings 是服务端环境变量,它没法发到前端。(否则像serpapi key这种就会暴露)

目前 mj 插件的走的是 standardalone 的 iframe 嵌入,而 lobechat主体和插件的通信是前端 postMessage 的方案。所以目前还不支持这种环境变量的透传。

未来可能会想一个方案允许这种变量发到前端,然后再在前端进行通信

lobehubbot commented 6 days ago

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


Plugin settings are server-side environment variables, which cannot be sent to the front-end. (Otherwise things like serpapi key will be exposed)

At present, the mj plug-in uses standardalone's iframe embedding, and the communication between the lobechat main body and the plug-in is the front-end postMessage solution. Therefore, transparent transmission of such environment variables is not currently supported.

In the future, we may think of a solution that allows such variables to be sent to the front end, and then communicated at the front end.

htdohk commented 6 days ago

感谢回复,期待解决~

lobehubbot commented 6 days ago

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


Thanks for the reply, looking forward to solving it~