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

✨ feat: support midjourney-proxy API secret #29

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

YangHanlin
Copy link

@YangHanlin YangHanlin commented Apr 11, 2024

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • ⚡️ perf
  • 📝 docs

🔀 变更说明 | Description of Change

This PR adds support for configuring the API secret to be passed as Mj-Api-Secret header to midjourney-proxy(-plus).

Users have the flexibility to set the API secret in two ways: on the server side, it can be specified through the MIDJOURNEY_PROXY_API_SECRET environment variable; on the client side, it can be configured via the LobeChat plugin settings or through the settings dialog available in the standalone web UI, similar to the process for configuring the proxy URL.

Closes #14, closes #24, closes #25

📝 补充信息 | Additional Information

I found that LobeChat seems to have a small bug that will prevent the Midjourney plugin from working after this PR is merged, and have proposed a PR lobehub/lobe-chat#1991 for that. Please review that PR before this. Thanks!

Copy link

vercel bot commented Apr 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-midjourney-webui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 27, 2024 4:54pm

@lobehubbot
Copy link
Member

👍 @YangHanlin

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link

codecov bot commented Apr 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 48 lines in your changes are missing coverage. Please review.

Please upload report for BASE (main@2389501). Learn more about missing BASE report.

Current head 59b01a6 differs from pull request most recent head 789e58a

Please upload reports for the commit 789e58a to get more accurate results.

Files Patch % Lines
src/app/api/midjourney/route.ts 0.00% 27 Missing ⚠️
src/features/Settings.tsx 0.00% 12 Missing and 1 partial ⚠️
src/config/server.ts 0.00% 2 Missing ⚠️
src/services/midjourney.ts 0.00% 2 Missing ⚠️
src/store/global/selectors.ts 0.00% 2 Missing ⚠️
src/store/global/initialState.ts 0.00% 1 Missing ⚠️
src/store/midjourney/initialState.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##             main     #29   +/-   ##
======================================
  Coverage        ?   1.60%           
======================================
  Files           ?      59           
  Lines           ?    2999           
  Branches        ?      69           
======================================
  Hits            ?      48           
  Misses          ?    2893           
  Partials        ?      58           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Xiaokai6880
Copy link

我想知道如何使用到可以输入key的 mj

@YangHanlin
Copy link
Author

bump

@arvinxx
Copy link
Contributor

arvinxx commented May 18, 2024

@YangHanlin 构建有报错,我下周看下原因

@Xiaokai6880
Copy link

您好,请问此pr会合并吗> @YangHanlin 构建有报错,我下周看下原因

@arvinxx
Copy link
Contributor

arvinxx commented May 27, 2024

@YangHanlin 麻烦 rebase 一下,我再构建一次

@YangHanlin
Copy link
Author

@YangHanlin 麻烦 rebase 一下,我再构建一次

已 rebase,看起来已经构建成功,这边看起来功能正常 https://lobe-midjourney-webui-git-feature-api-secret-misaka-network.vercel.app?_vercel_share=QFLQNPmahQYffT2IULSnWvtSOY7hRoxt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants