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

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

Open
htdohk opened this issue Jun 24, 2024 · 7 comments
Open

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

htdohk opened this issue Jun 24, 2024 · 7 comments
Labels
🐛 Bug Something isn't working | 缺陷

Comments

@htdohk
Copy link

htdohk commented Jun 24, 2024

📦 部署环境

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

@htdohk htdohk added the 🐛 Bug Something isn't working | 缺陷 label Jun 24, 2024
@lobehubbot
Copy link
Member

👀 @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
Copy link
Member

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 htdohk changed the title [Bug] [Bug] MIDJOURNEY_PROXY_URL 在Docker中不生效 Jun 26, 2024
@htdohk
Copy link
Author

htdohk commented Jun 28, 2024

捕获

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

@arvinxx 请帮忙支持,谢谢

@arvinxx
Copy link
Contributor

arvinxx commented Jun 29, 2024

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

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

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

@lobehubbot
Copy link
Member

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
Copy link
Author

htdohk commented Jun 29, 2024

感谢回复,期待解决~

@lobehubbot
Copy link
Member

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


Thanks for the reply, looking forward to solving it~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working | 缺陷
Projects
Status: Roadmap - Chat 1.x
Development

No branches or pull requests

3 participants