lobehub / lobe-midjourney-webui

⛵️ Midjourney WebUI - This plugin can integrate with Midjourney in LobeChat.
https://midjourney-webui.lobehub.com
MIT License
142 stars 41 forks source link

✨ feat: support midjourney-proxy API secret #29

Closed yanghanlin closed 5 months ago

yanghanlin commented 7 months ago

💻 变更类型 | Change Type

🔀 变更说明 | 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 https://github.com/lobehub/lobe-chat/pull/1991 for that. Please review that PR before this. Thanks!

vercel[bot] commented 7 months ago

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 commented 7 months ago

👍 @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.\ 非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。 如果您遇到任何问题,请随时与我们联系。

codecov[bot] commented 7 months ago

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.

:exclamation: 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 :warning:
src/features/Settings.tsx 0.00% 12 Missing and 1 partial :warning:
src/config/server.ts 0.00% 2 Missing :warning:
src/services/midjourney.ts 0.00% 2 Missing :warning:
src/store/global/selectors.ts 0.00% 2 Missing :warning:
src/store/global/initialState.ts 0.00% 1 Missing :warning:
src/store/midjourney/initialState.ts 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #29 +/- ## ====================================== Coverage ? 1.60% ====================================== Files ? 59 Lines ? 2999 Branches ? 69 ====================================== Hits ? 48 Misses ? 2893 Partials ? 58 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Xiaokai6880 commented 6 months ago

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

yanghanlin commented 6 months ago

bump

arvinxx commented 6 months ago

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

Xiaokai6880 commented 6 months ago

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

arvinxx commented 6 months ago

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

yanghanlin commented 6 months ago

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

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

yanghanlin commented 5 months ago

麻烦 @arvinxx 看下还有什么需要改动的地方吗?感谢~

lobehubbot commented 5 months ago

❤️ Great PR @YangHanlin ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.\ 项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx 或 @canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

lobehubbot commented 5 months ago

:tada: This PR is included in version 1.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: