@lobehub/lobehub 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +4 -3
- package/.github/workflows/release-desktop-stable.yml +1 -1
- package/CHANGELOG.md +50 -0
- package/Dockerfile +6 -4
- package/README.md +3 -4
- package/README.zh-CN.md +3 -4
- package/apps/desktop/src/main/controllers/McpInstallCtr.ts +10 -10
- package/apps/desktop/src/main/controllers/NetworkProxyCtr.ts +6 -6
- package/apps/desktop/src/main/controllers/RemoteServerSyncCtr.ts +2 -2
- package/changelog/v2.json +14 -0
- package/docs/changelog/2025-03-02-new-models.mdx +1 -1
- package/docs/changelog/2025-03-02-new-models.zh-CN.mdx +1 -1
- package/docs/changelog/2025-04-06-exports.mdx +1 -1
- package/docs/changelog/2025-04-06-exports.zh-CN.mdx +1 -1
- package/docs/changelog/2025-05-08-desktop-app.mdx +2 -2
- package/docs/changelog/2025-05-08-desktop-app.zh-CN.mdx +2 -2
- package/docs/changelog/2025-06-08-claude-4.mdx +1 -1
- package/docs/changelog/2025-06-08-claude-4.zh-CN.mdx +1 -1
- package/docs/changelog/2025-07-08-mcp-market.mdx +1 -1
- package/docs/changelog/2025-07-08-mcp-market.zh-CN.mdx +1 -1
- package/docs/changelog/2025-08-08-image-generation.mdx +1 -1
- package/docs/changelog/2025-08-08-image-generation.zh-CN.mdx +1 -1
- package/docs/changelog/2025-09-08-gemini.mdx +1 -1
- package/docs/changelog/2025-09-08-gemini.zh-CN.mdx +1 -1
- package/docs/changelog/2025-10-08-python.mdx +1 -1
- package/docs/changelog/2025-10-08-python.zh-CN.mdx +1 -1
- package/docs/changelog/2025-11-08-comfy-ui.mdx +1 -1
- package/docs/changelog/2025-11-08-comfy-ui.zh-CN.mdx +1 -1
- package/docs/changelog/2025-12-20-mcp.mdx +1 -1
- package/docs/changelog/2025-12-20-mcp.zh-CN.mdx +1 -1
- package/docs/development/basic/add-new-authentication-providers.zh-CN.mdx +1 -1
- package/docs/development/basic/add-new-image-model.mdx +3 -3
- package/docs/development/basic/add-new-image-model.zh-CN.mdx +3 -3
- package/docs/development/basic/chat-api.mdx +10 -10
- package/docs/development/basic/chat-api.zh-CN.mdx +10 -10
- package/docs/development/basic/feature-development.mdx +4 -4
- package/docs/development/basic/feature-development.zh-CN.mdx +4 -4
- package/docs/development/basic/setup-development.mdx +4 -4
- package/docs/development/basic/setup-development.zh-CN.mdx +4 -4
- package/docs/development/internationalization/add-new-locale.mdx +1 -1
- package/docs/development/internationalization/add-new-locale.zh-CN.mdx +1 -1
- package/docs/development/internationalization/internationalization-implementation.mdx +5 -5
- package/docs/development/internationalization/internationalization-implementation.zh-CN.mdx +5 -5
- package/docs/development/others/lighthouse.mdx +8 -8
- package/docs/development/others/lighthouse.zh-CN.mdx +8 -8
- package/docs/development/start.mdx +3 -3
- package/docs/development/start.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/feature-flags.mdx +1 -1
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/knowledge-base.mdx +2 -2
- package/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx +2 -2
- package/docs/self-hosting/advanced/online-search.mdx +1 -1
- package/docs/self-hosting/advanced/online-search.zh-CN.mdx +1 -1
- package/docs/self-hosting/advanced/redis/upstash.mdx +3 -3
- package/docs/self-hosting/advanced/redis/upstash.zh-CN.mdx +3 -3
- package/docs/self-hosting/advanced/redis.mdx +6 -6
- package/docs/self-hosting/advanced/redis.zh-CN.mdx +6 -6
- package/docs/self-hosting/advanced/s3/rustfs.mdx +116 -116
- package/docs/self-hosting/advanced/s3/rustfs.zh-CN.mdx +116 -117
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -5
- package/docs/self-hosting/auth/email.mdx +70 -0
- package/docs/self-hosting/auth/email.zh-CN.mdx +70 -0
- package/docs/self-hosting/{advanced/auth → auth}/legacy.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/legacy.zh-CN.mdx +5 -5
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.zh-CN.mdx +3 -3
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced/auth → auth}/providers/apple.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/apple.zh-CN.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/auth0.zh-CN.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authelia.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/authentik.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/casdoor.mdx +8 -8
- package/docs/self-hosting/{advanced/auth → auth}/providers/casdoor.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/cloudflare-zero-trust.zh-CN.mdx +6 -6
- package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/cognito.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/feishu.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/generic-oidc.zh-CN.mdx +12 -12
- package/docs/self-hosting/{advanced/auth → auth}/providers/github.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/github.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/google.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/google.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/keycloak.zh-CN.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/logto.mdx +8 -8
- package/docs/self-hosting/{advanced/auth → auth}/providers/logto.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/microsoft.zh-CN.mdx +11 -11
- package/docs/self-hosting/{advanced/auth → auth}/providers/okta.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/okta.zh-CN.mdx +13 -13
- package/docs/self-hosting/auth/providers/password.mdx +112 -0
- package/docs/self-hosting/auth/providers/password.zh-CN.mdx +103 -0
- package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/wechat.zh-CN.mdx +10 -10
- package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.mdx +13 -13
- package/docs/self-hosting/{advanced/auth → auth}/providers/zitadel.zh-CN.mdx +13 -13
- package/docs/self-hosting/{advanced/auth.mdx → auth.mdx} +24 -81
- package/docs/self-hosting/{advanced/auth.zh-CN.mdx → auth.zh-CN.mdx} +23 -80
- package/docs/self-hosting/environment-variables/auth.mdx +7 -0
- package/docs/self-hosting/environment-variables/auth.zh-CN.mdx +7 -0
- package/docs/self-hosting/environment-variables/basic.mdx +0 -7
- package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -7
- package/docs/self-hosting/environment-variables/redis.mdx +1 -1
- package/docs/self-hosting/environment-variables/redis.zh-CN.mdx +1 -1
- package/docs/self-hosting/environment-variables.mdx +1 -1
- package/docs/self-hosting/examples/azure-openai.mdx +0 -1
- package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +0 -1
- package/docs/self-hosting/faq/no-v1-suffix.mdx +3 -3
- package/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx +3 -3
- package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.mdx +7 -7
- package/docs/self-hosting/{advanced → migration/v2}/auth/clerk-to-betterauth.zh-CN.mdx +7 -7
- package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.mdx +2 -2
- package/docs/self-hosting/{advanced → migration/v2}/auth/migration-internals.zh-CN.mdx +2 -2
- package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.mdx +11 -11
- package/docs/self-hosting/{advanced → migration/v2}/auth/nextauth-to-betterauth.zh-CN.mdx +11 -11
- package/docs/self-hosting/migration/v2/breaking-changes.mdx +1 -1
- package/docs/self-hosting/migration/v2/breaking-changes.zh-CN.mdx +1 -1
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +4 -4
- package/docs/self-hosting/platform/docker.mdx +5 -5
- package/docs/self-hosting/platform/docker.zh-CN.mdx +10 -10
- package/docs/self-hosting/platform/dokploy.mdx +1 -1
- package/docs/self-hosting/platform/dokploy.zh-CN.mdx +5 -5
- package/docs/self-hosting/platform/sealos.mdx +12 -12
- package/docs/self-hosting/platform/sealos.zh-CN.mdx +17 -17
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +4 -4
- package/docs/self-hosting/start.mdx +3 -3
- package/docs/self-hosting/start.zh-CN.mdx +4 -4
- package/locales/en-US/auth.json +2 -1
- package/locales/en-US/authError.json +1 -0
- package/locales/en-US/metadata.json +1 -1
- package/locales/zh-CN/auth.json +1 -0
- package/locales/zh-CN/authError.json +1 -0
- package/netlify.toml +0 -1
- package/package.json +1 -1
- package/packages/types/src/serverConfig.ts +1 -0
- package/src/app/[variants]/(auth)/auth-error/page.tsx +4 -2
- package/src/app/[variants]/(auth)/signin/SignInEmailStep.tsx +57 -50
- package/src/app/[variants]/(auth)/signin/SignInPasswordStep.tsx +1 -1
- package/src/app/[variants]/(auth)/signin/page.tsx +2 -0
- package/src/app/[variants]/(auth)/signin/useSignIn.ts +2 -0
- package/src/app/[variants]/(auth)/signup/[[...signup]]/page.tsx +7 -0
- package/src/envs/app.ts +0 -2
- package/src/envs/auth.ts +3 -0
- package/src/libs/better-auth/define-config.ts +1 -1
- package/src/libs/better-auth/sso/providers/feishu.ts +15 -14
- package/src/libs/better-auth/sso/providers/wechat.ts +6 -3
- package/src/libs/next/proxy/define-config.ts +1 -1
- package/src/locales/default/auth.ts +3 -1
- package/src/locales/default/authError.ts +2 -0
- package/src/locales/default/metadata.ts +1 -1
- package/src/server/globalConfig/index.ts +1 -0
- package/src/server/ld.ts +1 -1
- package/src/store/chat/slices/topic/action.ts +1 -1
- package/src/store/electron/actions/settings.ts +7 -7
- package/src/store/electron/actions/sync.ts +11 -11
- package/src/store/global/actions/general.ts +12 -12
- package/src/store/global/initialState.ts +11 -11
- package/src/store/global/selectors/clientDB.ts +1 -1
- package/src/store/global/selectors/systemStatus.ts +1 -1
- package/src/store/image/slices/generationConfig/action.ts +12 -12
- package/src/store/image/utils/size.ts +11 -11
- package/src/store/library/slices/ragEval/actions/dataset.ts +1 -1
- package/src/store/serverConfig/selectors.ts +1 -0
- package/src/store/session/slices/session/initialState.ts +6 -6
- package/src/store/session/slices/session/reducers.ts +1 -1
- package/src/store/session/slices/sessionGroup/initialState.ts +2 -2
- package/src/store/tool/slices/customPlugin/action.ts +2 -2
- package/src/store/tool/slices/oldStore/action.ts +5 -5
- package/src/store/userMemory/slices/preference/action.ts +6 -6
- /package/docs/self-hosting/{advanced/auth → auth}/clerk.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/clerk.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/auth0.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authelia.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/authentik.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/casdoor.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/cloudflare-zero-trust.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/github.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/google.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/keycloak.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/logto.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/microsoft-entra-id.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/okta.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/wechat.zh-CN.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.mdx +0 -0
- /package/docs/self-hosting/{advanced/auth → auth}/next-auth/zitadel.zh-CN.mdx +0 -0
package/.env.example
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
# add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array.
|
|
2
|
-
# ACCESS_CODE=lobe66
|
|
3
|
-
|
|
4
1
|
# Specify your API Key selection method, currently supporting `random` and `turn`.
|
|
5
2
|
# API_KEY_SELECT_MODE=random
|
|
6
3
|
|
|
@@ -295,6 +292,10 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
|
|
295
292
|
# Leave empty to allow all emails
|
|
296
293
|
# AUTH_ALLOWED_EMAILS=example.com,admin@other.com
|
|
297
294
|
|
|
295
|
+
# Disable email/password authentication (SSO-only mode)
|
|
296
|
+
# Set to '1' to disable email/password sign-in and registration, only allowing SSO login
|
|
297
|
+
# AUTH_DISABLE_EMAIL_PASSWORD=0
|
|
298
|
+
|
|
298
299
|
# Google OAuth Configuration (for Better-Auth)
|
|
299
300
|
# Get credentials from: https://console.cloud.google.com/apis/credentials
|
|
300
301
|
# Authorized redirect URIs:
|
|
@@ -148,7 +148,7 @@ jobs:
|
|
|
148
148
|
# 使用 GitHub Hosted Runner
|
|
149
149
|
if [[ "${{ github.event_name }}" != "workflow_dispatch" ]] || [[ "${{ inputs.build_mac }}" == "true" ]]; then
|
|
150
150
|
echo "Using GitHub-Hosted Runner for macOS ARM64"
|
|
151
|
-
arm_entry='{"os": "macos-
|
|
151
|
+
arm_entry='{"os": "macos-15", "name": "macos-arm64"}'
|
|
152
152
|
static_matrix=$(echo "$static_matrix" | jq -c --argjson entry "$arm_entry" '. + [$entry]')
|
|
153
153
|
fi
|
|
154
154
|
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
### [Version 2.1.3](https://github.com/lobehub/lobe-chat/compare/v2.1.2...v2.1.3)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-31**</sup>
|
|
8
|
+
|
|
9
|
+
#### 🐛 Bug Fixes
|
|
10
|
+
|
|
11
|
+
- **auth**: Add AUTH_DISABLE_EMAIL_PASSWORD env to enable SSO-only mode.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### What's fixed
|
|
19
|
+
|
|
20
|
+
- **auth**: Add AUTH_DISABLE_EMAIL_PASSWORD env to enable SSO-only mode, closes [#12009](https://github.com/lobehub/lobe-chat/issues/12009) ([f3210a3](https://github.com/lobehub/lobe-chat/commit/f3210a3))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
### [Version 2.1.2](https://github.com/lobehub/lobe-chat/compare/v2.1.1...v2.1.2)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2026-01-30**</sup>
|
|
33
|
+
|
|
34
|
+
#### 🐛 Bug Fixes
|
|
35
|
+
|
|
36
|
+
- **misc**: Fix feishu sso provider.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's fixed
|
|
44
|
+
|
|
45
|
+
- **misc**: Fix feishu sso provider, closes [#11970](https://github.com/lobehub/lobe-chat/issues/11970) ([ffd9fff](https://github.com/lobehub/lobe-chat/commit/ffd9fff))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
### [Version 2.1.1](https://github.com/lobehub/lobe-chat/compare/v2.1.0...v2.1.1)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2026-01-30**</sup>
|
package/Dockerfile
CHANGED
|
@@ -158,14 +158,12 @@ ENV HOSTNAME="0.0.0.0" \
|
|
|
158
158
|
PORT="3210"
|
|
159
159
|
|
|
160
160
|
# General Variables
|
|
161
|
-
ENV
|
|
162
|
-
APP_URL="" \
|
|
161
|
+
ENV APP_URL="" \
|
|
163
162
|
API_KEY_SELECT_MODE="" \
|
|
164
163
|
DEFAULT_AGENT_CONFIG="" \
|
|
165
164
|
SYSTEM_AGENT="" \
|
|
166
165
|
FEATURE_FLAGS="" \
|
|
167
|
-
PROXY_URL=""
|
|
168
|
-
ENABLE_AUTH_PROTECTION=""
|
|
166
|
+
PROXY_URL=""
|
|
169
167
|
|
|
170
168
|
# Database
|
|
171
169
|
ENV KEY_VAULTS_SECRET="" \
|
|
@@ -176,6 +174,10 @@ ENV KEY_VAULTS_SECRET="" \
|
|
|
176
174
|
ENV AUTH_SECRET="" \
|
|
177
175
|
AUTH_SSO_PROVIDERS="" \
|
|
178
176
|
AUTH_ALLOWED_EMAILS="" \
|
|
177
|
+
AUTH_TRUSTED_ORIGINS="" \
|
|
178
|
+
AUTH_DISABLE_EMAIL_PASSWORD="" \
|
|
179
|
+
AUTH_EMAIL_VERIFICATION="" \
|
|
180
|
+
AUTH_ENABLE_MAGIC_LINK="" \
|
|
179
181
|
# Google
|
|
180
182
|
AUTH_GOOGLE_ID="" \
|
|
181
183
|
AUTH_GOOGLE_SECRET="" \
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ We’re building the world’s largest human–agent co-evolving network.
|
|
|
37
37
|
[![][share-mastodon-shield]][share-mastodon-link]
|
|
38
38
|
[![][share-linkedin-shield]][share-linkedin-link]
|
|
39
39
|
|
|
40
|
-
<sup>Agent
|
|
40
|
+
<sup>Agent teammates that grow with you</sup>
|
|
41
41
|
|
|
42
42
|
[![][github-trending-shield]][github-trending-url]
|
|
43
43
|
|
|
@@ -581,7 +581,7 @@ LobeHub provides Self-Hosted Version with Vercel, Alibaba Cloud, and [Docker Ima
|
|
|
581
581
|
"If you want to deploy this service yourself on Vercel, Zeabur or Alibaba Cloud, you can follow these steps:
|
|
582
582
|
|
|
583
583
|
- Prepare your [OpenAI API Key](https://platform.openai.com/account/api-keys).
|
|
584
|
-
- Click the button below to start deployment: Log in directly with your GitHub account, and remember to fill in the `OPENAI_API_KEY`(required)
|
|
584
|
+
- Click the button below to start deployment: Log in directly with your GitHub account, and remember to fill in the `OPENAI_API_KEY`(required) on the environment variable section.
|
|
585
585
|
- After deployment, you can start using it.
|
|
586
586
|
- Bind a custom domain (optional): The DNS of the domain assigned by Vercel is polluted in some areas; binding a custom domain can connect directly.
|
|
587
587
|
|
|
@@ -647,7 +647,6 @@ This project provides some additional configuration items set with environment v
|
|
|
647
647
|
| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
648
648
|
| `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` |
|
|
649
649
|
| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn` or `https://aihubmix.com/v1` <br/>The default value is<br/>`https://api.openai.com/v1` |
|
|
650
|
-
| `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array. | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
|
|
651
650
|
| `OPENAI_MODEL_LIST` | No | Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas. | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
|
|
652
651
|
|
|
653
652
|
> \[!NOTE]
|
|
@@ -829,7 +828,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
|
|
|
829
828
|
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
|
|
830
829
|
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
|
831
830
|
[deploy-button-image]: https://vercel.com/button
|
|
832
|
-
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY
|
|
831
|
+
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
|
|
833
832
|
[deploy-on-alibaba-cloud-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
|
|
834
833
|
[deploy-on-alibaba-cloud-link]: https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=LobeHub%E7%A4%BE%E5%8C%BA%E7%89%88
|
|
835
834
|
[deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg
|
package/README.zh-CN.md
CHANGED
|
@@ -35,7 +35,7 @@ LobeHub 是一个工作与生活空间,用于发现、构建并与会随着您
|
|
|
35
35
|
[![][share-weibo-shield]][share-weibo-link]
|
|
36
36
|
[![][share-mastodon-shield]][share-mastodon-link]
|
|
37
37
|
|
|
38
|
-
<sup>Agent
|
|
38
|
+
<sup>Agent teammates that grow with you</sup>
|
|
39
39
|
|
|
40
40
|
[![][github-trending-shield]][github-trending-url]
|
|
41
41
|
[![][github-hello-shield]][github-hello-url]
|
|
@@ -555,7 +555,7 @@ LobeHub 提供了 Vercel 的 自托管版本 和 [Docker 镜像][docker-release-
|
|
|
555
555
|
如果想在 Vercel 、 Zeabur 或 阿里云 上部署该服务,可以按照以下步骤进行操作:
|
|
556
556
|
|
|
557
557
|
- 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys) 。
|
|
558
|
-
- 点击下方按钮开始部署: 直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY`
|
|
558
|
+
- 点击下方按钮开始部署: 直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY` (必填);
|
|
559
559
|
- 部署完毕后,即可开始使用;
|
|
560
560
|
- 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。
|
|
561
561
|
|
|
@@ -621,7 +621,6 @@ docker compose up -d
|
|
|
621
621
|
| ------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
622
622
|
| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` |
|
|
623
623
|
| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`<br/>默认值:<br/>`https://api.openai.com/v1` |
|
|
624
|
-
| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` |
|
|
625
624
|
| `OPENAI_MODEL_LIST` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
|
|
626
625
|
|
|
627
626
|
> \[!NOTE]
|
|
@@ -843,7 +842,7 @@ This project is [LobeHub Community License](./LICENSE) licensed.
|
|
|
843
842
|
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
|
|
844
843
|
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
|
845
844
|
[deploy-button-image]: https://vercel.com/button
|
|
846
|
-
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY
|
|
845
|
+
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
|
|
847
846
|
[deploy-on-alibaba-cloud-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
|
|
848
847
|
[deploy-on-alibaba-cloud-link]: https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=LobeHub%E7%A4%BE%E5%8C%BA%E7%89%88
|
|
849
848
|
[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
|
|
@@ -59,14 +59,14 @@ interface McpInstallParams {
|
|
|
59
59
|
*/
|
|
60
60
|
export default class McpInstallController extends ControllerModule {
|
|
61
61
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @param parsedData
|
|
64
|
-
* @returns
|
|
62
|
+
* Handle MCP plugin installation request
|
|
63
|
+
* @param parsedData Parsed protocol data
|
|
64
|
+
* @returns Whether processing succeeded
|
|
65
65
|
*/
|
|
66
66
|
@protocolHandler('install')
|
|
67
67
|
public async handleInstallRequest(parsedData: McpInstallParams): Promise<boolean> {
|
|
68
68
|
try {
|
|
69
|
-
//
|
|
69
|
+
// Extract required fields from parameters
|
|
70
70
|
const { id, schema: schemaParam, marketId } = parsedData;
|
|
71
71
|
|
|
72
72
|
if (!id) {
|
|
@@ -76,11 +76,11 @@ export default class McpInstallController extends ControllerModule {
|
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
|
-
//
|
|
79
|
+
// Map protocol source
|
|
80
80
|
|
|
81
81
|
const isOfficialMarket = marketId === 'lobehub';
|
|
82
82
|
|
|
83
|
-
//
|
|
83
|
+
// For official marketplace, schema is optional; for third-party marketplace, schema is required
|
|
84
84
|
if (!isOfficialMarket && !schemaParam) {
|
|
85
85
|
logger.warn(`🔧 [McpInstall] Schema is required for third-party marketplace:`, {
|
|
86
86
|
marketId,
|
|
@@ -90,7 +90,7 @@ export default class McpInstallController extends ControllerModule {
|
|
|
90
90
|
|
|
91
91
|
let mcpSchema: McpSchema | undefined;
|
|
92
92
|
|
|
93
|
-
//
|
|
93
|
+
// If schema parameter is provided, parse and validate
|
|
94
94
|
if (schemaParam) {
|
|
95
95
|
try {
|
|
96
96
|
mcpSchema = JSON.parse(schemaParam);
|
|
@@ -104,7 +104,7 @@ export default class McpInstallController extends ControllerModule {
|
|
|
104
104
|
return false;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
//
|
|
107
|
+
// Verify identifier matches id parameter
|
|
108
108
|
if (mcpSchema.identifier !== id) {
|
|
109
109
|
logger.error(`🔧 [McpInstall] Schema identifier does not match URL id parameter:`, {
|
|
110
110
|
schemaId: mcpSchema.identifier,
|
|
@@ -122,7 +122,7 @@ export default class McpInstallController extends ControllerModule {
|
|
|
122
122
|
pluginVersion: mcpSchema?.version || 'Unknown',
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
//
|
|
125
|
+
// Broadcast installation request to frontend
|
|
126
126
|
const installRequest = {
|
|
127
127
|
marketId,
|
|
128
128
|
pluginId: id,
|
|
@@ -136,7 +136,7 @@ export default class McpInstallController extends ControllerModule {
|
|
|
136
136
|
pluginName: installRequest.schema?.name || 'Unknown',
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
-
//
|
|
139
|
+
// Broadcast to frontend via app instance
|
|
140
140
|
if (this.app?.browserManager) {
|
|
141
141
|
this.app.browserManager.broadcastToWindow('app', 'mcpInstallRequest', installRequest);
|
|
142
142
|
logger.debug(`🔧 [McpInstall] Install request broadcasted successfully`);
|
|
@@ -88,7 +88,7 @@ export default class NetworkProxyCtr extends ControllerModule {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Test proxy connection
|
|
92
92
|
*/
|
|
93
93
|
@IpcMethod()
|
|
94
94
|
async testProxyConnection(url: string): Promise<{ message?: string; success: boolean }> {
|
|
@@ -108,7 +108,7 @@ export default class NetworkProxyCtr extends ControllerModule {
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
*
|
|
111
|
+
* Test specified proxy configuration
|
|
112
112
|
*/
|
|
113
113
|
@IpcMethod()
|
|
114
114
|
async testProxyConfig({
|
|
@@ -131,17 +131,17 @@ export default class NetworkProxyCtr extends ControllerModule {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
134
|
+
* Apply initial proxy settings
|
|
135
135
|
*/
|
|
136
136
|
async beforeAppReady(): Promise<void> {
|
|
137
137
|
try {
|
|
138
|
-
//
|
|
138
|
+
// Get stored proxy settings
|
|
139
139
|
const networkProxy = this.app.storeManager.get(
|
|
140
140
|
'networkProxy',
|
|
141
141
|
defaultProxySettings,
|
|
142
142
|
) as NetworkProxySettings;
|
|
143
143
|
|
|
144
|
-
//
|
|
144
|
+
// Validate configuration
|
|
145
145
|
const validation = ProxyConfigValidator.validate(networkProxy);
|
|
146
146
|
if (!validation.isValid) {
|
|
147
147
|
logger.warn('Invalid stored proxy configuration, using defaults:', validation.errors);
|
|
@@ -158,7 +158,7 @@ export default class NetworkProxyCtr extends ControllerModule {
|
|
|
158
158
|
});
|
|
159
159
|
} catch (error) {
|
|
160
160
|
logger.error('Failed to apply initial proxy settings:', error);
|
|
161
|
-
//
|
|
161
|
+
// Use default settings on error
|
|
162
162
|
try {
|
|
163
163
|
await ProxyDispatcherManager.applyProxySettings(defaultProxySettings);
|
|
164
164
|
logger.info('Fallback to default proxy settings');
|
|
@@ -162,7 +162,7 @@ export default class RemoteServerSyncCtr extends ControllerModule {
|
|
|
162
162
|
});
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
-
// 5.
|
|
165
|
+
// 5. Listen for request errors (e.g., DNS resolution failure)
|
|
166
166
|
clientReq.on('error', (error) => {
|
|
167
167
|
logger.error(`${logPrefix} Error forwarding request:`, error);
|
|
168
168
|
if (sender.isDestroyed()) return;
|
|
@@ -196,7 +196,7 @@ export default class RemoteServerSyncCtr extends ControllerModule {
|
|
|
196
196
|
delete requestHeaders['connection']; // Often causes issues
|
|
197
197
|
// delete requestHeaders['content-length']; // Let node handle it based on body
|
|
198
198
|
|
|
199
|
-
//
|
|
199
|
+
// Read proxy configuration
|
|
200
200
|
const proxyConfig = this.app.storeManager.get('networkProxy', defaultProxySettings);
|
|
201
201
|
|
|
202
202
|
let agent;
|
package/changelog/v2.json
CHANGED
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Seamless DeepSeek R1 Integration, Unlock a New Chain-of-Thought Experience
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
LobeHub completed its largest AI ecosystem expansion ever in February, delivering a more powerful and flexible AI chat experience.
|
|
13
13
|
|
|
14
14
|
## 🌟 Major Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Seamless DeepSeek R1 Integration, Unlock a New Chain-of-Thought Experience
|
|
11
11
|
|
|
12
|
-
In March,
|
|
12
|
+
In March, LobeHub continued to refine the user experience—adding practical features like customizable hotkeys and data export, while further expanding the AI provider ecosystem.
|
|
13
13
|
|
|
14
14
|
## 🌟 Key Updates
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Brand-New Design Style and Desktop App Release ✨
|
|
3
|
-
description:
|
|
3
|
+
description: LobeHub officially launches the desktop app, delivering a more modern and smoother experience.
|
|
4
4
|
tags:
|
|
5
5
|
- Desktop App
|
|
6
6
|
- LobeHub
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Brand-New Design Style and Desktop App Release ✨
|
|
11
11
|
|
|
12
|
-
In April,
|
|
12
|
+
In April, LobeHub shipped a major visual upgrade with the brand-new Lobe UI v2 design system, and officially released the desktop app—bringing a more modern and fluid experience.
|
|
13
13
|
|
|
14
14
|
## 🌟 Major Updates
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: 全新设计风格与桌面端发布 ✨
|
|
3
|
-
description:
|
|
3
|
+
description: LobeHub 正式发布桌面端应用,带来更现代、更流畅的使用体验
|
|
4
4
|
tags:
|
|
5
5
|
- 桌面端
|
|
6
6
|
- LobeHub
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# 全新设计风格与桌面端发布 ✨
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
LobeHub 在四月完成重大视觉升级,推出全新 Lobe UI v2 设计系统,并正式发布桌面端应用,带来更现代、更流畅的使用体验。
|
|
13
13
|
|
|
14
14
|
## 🌟 重大更新
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Prompt Variables and Claude 4 Reasoning Model Support 🚀
|
|
11
11
|
|
|
12
|
-
From May to June,
|
|
12
|
+
From May to June, LobeHub continued to refine core capabilities—introducing a prompt-variables system, adding support for Claude 4 reasoning models, and expanding search and crawling across multiple AI providers.
|
|
13
13
|
|
|
14
14
|
## 🌟 Key Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# MCP Marketplace and Search Provider Expansion 🔍
|
|
11
11
|
|
|
12
|
-
From June to July,
|
|
12
|
+
From June to July, LobeHub launched the MCP plugin marketplace, added support for multiple search providers, and integrated Amazon Cognito and Google SSO—continuing to improve both user experience and the developer ecosystem.
|
|
13
13
|
|
|
14
14
|
## 🌟 Major Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# AI Image Generation and Desktop Enhancements 🎨
|
|
11
11
|
|
|
12
|
-
From July to August,
|
|
12
|
+
From July to August, LobeHub introduced AI image generation, added support for multiple providers, and continued improving the desktop experience and authentication system.
|
|
13
13
|
|
|
14
14
|
## 🌟 Major Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Gemini Image Generation and Non-Streaming Mode Support 🎨
|
|
11
11
|
|
|
12
|
-
From August to September,
|
|
12
|
+
From August to September, LobeHub added Gemini 2.5 Flash Image generation, introduced non-streaming response mode support, and expanded provider and model support across the ecosystem.
|
|
13
13
|
|
|
14
14
|
## 🌟 Major Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# Claude Sonnet 4.5 and Built-in Python Plugin 🐍
|
|
11
11
|
|
|
12
|
-
From September to October,
|
|
12
|
+
From September to October, LobeHub added support for Claude Sonnet 4.5, introduced a built-in Python plugin, and improved chat list navigation and rich text editing.
|
|
13
13
|
|
|
14
14
|
## 🌟 Key Updates
|
|
15
15
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# ComfyUI Integration and Knowledge Base Improvements ⭐
|
|
11
11
|
|
|
12
|
-
From October to November,
|
|
12
|
+
From October to November, LobeHub integrated ComfyUI workflows, added support for multiple AI providers and models, and continued to improve the knowledge base and overall user experience.
|
|
13
13
|
|
|
14
14
|
## 🌟 Key Updates
|
|
15
15
|
|
|
@@ -10,7 +10,7 @@ tags:
|
|
|
10
10
|
|
|
11
11
|
# MCP Cloud Endpoints and Model Library Expansion 🔌
|
|
12
12
|
|
|
13
|
-
In November,
|
|
13
|
+
In November, LobeHub continued to improve model support and user experience by adding multiple AI providers and enhancing knowledge base capabilities.
|
|
14
14
|
|
|
15
15
|
## 🌟 Key Updates
|
|
16
16
|
|
|
@@ -12,7 +12,7 @@ tags:
|
|
|
12
12
|
|
|
13
13
|
LobeHub 使用 [Auth.js v5](https://authjs.dev/) 作为外部身份验证服务。Auth.js 是一个开源的身份验证库,它提供了一种简单的方式来实现身份验证和授权功能。本文档将介绍如何使用 Auth.js 来实现新的身份验证方式。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
LobeHub 使用 [Better Auth](https://www.better-auth.com) 作为身份验证服务。本文档介绍如何添加新的 SSO 身份验证提供商。
|
|
16
16
|
|
|
17
17
|
为了在 LobeHub 中添加新的身份验证提供者(例如添加 Okta),你需要完成以下步骤:
|
|
18
18
|
|
|
@@ -11,7 +11,7 @@ tags:
|
|
|
11
11
|
|
|
12
12
|
# Adding New Image Models
|
|
13
13
|
|
|
14
|
-
> Learn more about the AI image generation modal design in the [AI Image Generation Modal Design Discussion](https://github.com/lobehub/
|
|
14
|
+
> Learn more about the AI image generation modal design in the [AI Image Generation Modal Design Discussion](https://github.com/lobehub/lobehub/discussions/7442)
|
|
15
15
|
|
|
16
16
|
## Parameter Standardization
|
|
17
17
|
|
|
@@ -65,7 +65,7 @@ For image generation models that are not compatible with OpenAI format, you need
|
|
|
65
65
|
|
|
66
66
|
### Method 1: Using OpenAI Compatible Factory
|
|
67
67
|
|
|
68
|
-
Most Providers use `openaiCompatibleFactory` for OpenAI compatibility. You can pass in a custom `createImage` function (reference [PR #8534](https://github.com/lobehub/
|
|
68
|
+
Most Providers use `openaiCompatibleFactory` for OpenAI compatibility. You can pass in a custom `createImage` function (reference [PR #8534](https://github.com/lobehub/lobehub/pull/8534)).
|
|
69
69
|
|
|
70
70
|
**Implementation Steps**:
|
|
71
71
|
|
|
@@ -124,7 +124,7 @@ export const LobeProviderAI = openaiCompatibleFactory({
|
|
|
124
124
|
|
|
125
125
|
### Method 2: Direct Implementation in Provider Class
|
|
126
126
|
|
|
127
|
-
If your Provider has an independent class implementation, you can directly add the `createImage` method in the class (reference [PR #8503](https://github.com/lobehub/
|
|
127
|
+
If your Provider has an independent class implementation, you can directly add the `createImage` method in the class (reference [PR #8503](https://github.com/lobehub/lobehub/pull/8503)).
|
|
128
128
|
|
|
129
129
|
**Implementation Steps**:
|
|
130
130
|
|
|
@@ -9,7 +9,7 @@ tags:
|
|
|
9
9
|
|
|
10
10
|
# 添加新的图像模型
|
|
11
11
|
|
|
12
|
-
> 了解更多关于 AI 绘画模态的设计,请参考 [AI 绘画模态设计讨论](https://github.com/lobehub/
|
|
12
|
+
> 了解更多关于 AI 绘画模态的设计,请参考 [AI 绘画模态设计讨论](https://github.com/lobehub/lobehub/discussions/7442)
|
|
13
13
|
|
|
14
14
|
## 参数标准化
|
|
15
15
|
|
|
@@ -63,7 +63,7 @@ const zhipuImageModels: AIImageModelCard[] = [
|
|
|
63
63
|
|
|
64
64
|
### 方式一:使用 OpenAI Compatible Factory
|
|
65
65
|
|
|
66
|
-
大部分 Provider 都使用 `openaiCompatibleFactory` 来兼容 OpenAI,可以通过传入自定义的 `createImage` 函数(参考 [PR #8534](https://github.com/lobehub/
|
|
66
|
+
大部分 Provider 都使用 `openaiCompatibleFactory` 来兼容 OpenAI,可以通过传入自定义的 `createImage` 函数(参考 [PR #8534](https://github.com/lobehub/lobehub/pull/8534))。
|
|
67
67
|
|
|
68
68
|
**实现步骤**:
|
|
69
69
|
|
|
@@ -122,7 +122,7 @@ export const LobeProviderAI = openaiCompatibleFactory({
|
|
|
122
122
|
|
|
123
123
|
### 方式二:在 Provider 类中直接实现
|
|
124
124
|
|
|
125
|
-
如果你的 Provider 有独立的类实现,可以直接在类中添加 `createImage` 方法(参考 [PR #8503](https://github.com/lobehub/
|
|
125
|
+
如果你的 Provider 有独立的类实现,可以直接在类中添加 `createImage` 方法(参考 [PR #8503](https://github.com/lobehub/lobehub/pull/8503))。
|
|
126
126
|
|
|
127
127
|
**实现步骤**:
|
|
128
128
|
|