diff --git a/.env.example b/.env.example index 9d986c02b873..f1b8bdf21794 100644 --- a/.env.example +++ b/.env.example @@ -104,6 +104,14 @@ OPENAI_API_KEY=sk-xxxxxxxxx # MINIMAX_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx +### DeepSeek AI #### + +# DEEPSEEK_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### Qwen AI #### + +# QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + ######################################## ############ Market Service ############ ######################################## @@ -121,3 +129,55 @@ OPENAI_API_KEY=sk-xxxxxxxxx # set the plugin settings # the format is `plugin-identifier:key1=value1;key2=value2`, multiple settings fields are separated by semicolons `;`, multiple plugin settings are separated by commas `,`. # PLUGIN_SETTINGS=search-engine:SERPAPI_API_KEY=xxxxx + + +######################################## +##### S3 Object Storage Service ######## +######################################## + +# S3 keys +#S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +#S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# Bucket name +#S3_BUCKET=lobechat + +# Bucket request endpoint +#S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com + +# Public access domain for the bucket +#NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com + +# Bucket region, such as us-west-1, generally not needed to add +# but some service providers may require configuration +# S3_REGION=us-west-1 + + +######################################## +############ Auth Service ############## +######################################## + + +# Clerk related configurations + +# Clerk public key and secret key +#NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +#CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx + +# you need to config the clerk webhook secret key if you want to use the clerk with database +#CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx + + +######################################## +########## Server Database ############# +######################################## + +# Specify the service mode as server if you want to use the server database +#NEXT_PUBLIC_SERVICE_MODE=server + +# Postgres database URL +#DATABASE_URL=postgres://username:password@host:port/database + +# use `openssl rand -base64 32` to generate a key for the encryption of the database +# we use this key to encrypt the user api key +#KEY_VAULTS_SECRET=xxxxx/xxxxxxxxxxxxxx= diff --git a/.eslintignore b/.eslintignore index b24520330465..a0afbcb77f1b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -10,9 +10,8 @@ coverage # test jest* -_test_ -__test__ *.test.ts +*.test.tsx # umi .umi diff --git a/.github/ISSUE_TEMPLATE/1_bug_report.yml b/.github/ISSUE_TEMPLATE/1_bug_report.yml index 54502db117e0..da46729467f9 100644 --- a/.github/ISSUE_TEMPLATE/1_bug_report.yml +++ b/.github/ISSUE_TEMPLATE/1_bug_report.yml @@ -5,53 +5,64 @@ labels: ['🐛 Bug'] body: - type: dropdown attributes: - label: '💻 Operating System' + label: '📦 Environment' + multiple: true options: - - Windows - - macOS - - Ubuntu - - Other Linux - - iOS - - Android - - Other + - 'Official Preview' + - 'Vercel' + - 'Zeabur' + - 'Sealos' + - 'Netlify' + - 'Docker' + - 'Other' + validations: + required: true + - type: input + attributes: + label: '📌 Version' validations: required: true + - type: dropdown attributes: - label: '📦 Environment' + label: '💻 Operating System' + multiple: true options: - - Official Preview - - Vercel / Zeabur / Sealos - - Docker - - Other + - 'Windows' + - 'macOS' + - 'Ubuntu' + - 'Other Linux' + - 'iOS' + - 'Android' + - 'Other' validations: required: true - - type: dropdown attributes: label: '🌐 Browser' + multiple: true options: - - Chrome - - Edge - - Safari - - Firefox - - Other + - 'Chrome' + - 'Edge' + - 'Safari' + - 'Firefox' + - 'Other' validations: required: true - type: textarea attributes: label: '🐛 Bug Description' - description: A clear and concise description of the bug. + description: A clear and concise description of the bug, if the above option is `Other`, please also explain in detail. validations: required: true - - type: textarea - attributes: - label: '🚦 Expected Behavior' - description: A clear and concise description of what you expected to happen. - type: textarea attributes: label: '📷 Recurrence Steps' description: A clear and concise description of how to recurrence. + - type: textarea + attributes: + label: '🚦 Expected Behavior' + description: A clear and concise description of what you expected to happen. - type: textarea attributes: label: '📝 Additional Information' diff --git a/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml b/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml index d16427e4f4b6..3580c854254b 100644 --- a/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml +++ b/.github/ISSUE_TEMPLATE/1_bug_report_cn.yml @@ -5,54 +5,64 @@ labels: ['🐛 Bug'] body: - type: dropdown attributes: - label: '💻 系统环境' + label: '📦 部署环境' + multiple: true options: - - Windows - - macOS - - Ubuntu - - Other Linux - - iOS - - Android - - Other + - 'Official Preview' + - 'Vercel' + - 'Zeabur' + - 'Sealos' + - 'Netlify' + - 'Docker' + - 'Other' + validations: + required: true + - type: input + attributes: + label: '📌 软件版本' validations: required: true - type: dropdown attributes: - label: '📦 部署环境' + label: '💻 系统环境' + multiple: true options: - - Official Preview - - Vercel / Zeabur / Sealos - - Docker - - Other + - 'Windows' + - 'macOS' + - 'Ubuntu' + - 'Other Linux' + - 'iOS' + - 'Android' + - 'Other' validations: required: true - - type: dropdown attributes: label: '🌐 浏览器' + multiple: true options: - - Chrome - - Edge - - Safari - - Firefox - - Other + - 'Chrome' + - 'Edge' + - 'Safari' + - 'Firefox' + - 'Other' validations: required: true - type: textarea attributes: label: '🐛 问题描述' - description: 请提供一个清晰且简洁的问题描述。 + description: 请提供一个清晰且简洁的问题描述,若上述选项为`Other`,也请详细说明。 validations: required: true - - type: textarea - attributes: - label: '🚦 期望结果' - description: 请提供一个清晰且简洁的描述,说明您期望发生什么。 - type: textarea attributes: label: '📷 复现步骤' description: 请提供一个清晰且简洁的描述,说明如何复现问题。 + - type: textarea + attributes: + label: '🚦 期望结果' + description: 请提供一个清晰且简洁的描述,说明您期望发生什么。 - type: textarea attributes: label: '📝 补充信息' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b7ab5da31e15..86db21bf0544 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,17 @@ jobs: release: name: Release runs-on: ubuntu-latest + + services: + postgres: + image: postgres:16 + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 5432:5432 + steps: - uses: actions/checkout@v4 @@ -22,8 +33,16 @@ jobs: - name: Lint run: bun run lint - - name: Test - run: bun run test + - name: Test Server Coverage + run: bun run test-server:coverage + env: + DATABASE_TEST_URL: postgresql://postgres:postgres@localhost:5432/postgres + DATABASE_DRIVER: node + NEXT_PUBLIC_SERVICE_MODE: server + KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s= + + - name: Test App Coverage + run: bun run test-app:coverage - name: Release run: bun run release diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c1e15054e0b2..abc93f81ba01 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -7,7 +7,7 @@ permissions: on: schedule: - - cron: '0 * * * *' # every hour + - cron: '0 */6 * * *' # every 6 hours workflow_dispatch: jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c3a674676cd4..f67c4123b7d7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,9 +1,23 @@ name: Test CI + on: [push, pull_request] + jobs: test: runs-on: ubuntu-latest + services: + postgres: + image: postgres:16 + env: + POSTGRES_PASSWORD: postgres + options: >- + --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + + + ports: + - 5432:5432 + steps: - uses: actions/checkout@v4 @@ -18,10 +32,27 @@ jobs: - name: Lint run: bun run lint - - name: Test and coverage - run: bun run test:coverage + - name: Test Server Coverage + run: bun run test-server:coverage + env: + DATABASE_TEST_URL: postgresql://postgres:postgres@localhost:5432/postgres + DATABASE_DRIVER: node + NEXT_PUBLIC_SERVICE_MODE: server + KEY_VAULTS_SECRET: LA7n9k3JdEcbSgml2sxfw+4TV1AzaaFU5+R176aQz4s= + + - name: Upload Server coverage to Codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/server/lcov.info + flags: server + + - name: Test App Coverage + run: bun run test-app:coverage - - name: Upload coverage to Codecov + - name: Upload App Coverage to Codecov uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} # required + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage/app/lcov.info + flags: app diff --git a/CHANGELOG.md b/CHANGELOG.md index ce459bb57a78..960298bcc71c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,2827 @@ # Changelog +### [Version 1.1.6](https://github.com/lobehub/lobe-chat/compare/v1.1.5...v1.1.6) + +Released on **2024-06-23** + +#### ♻ Code Refactoring + +- **misc**: Refactor the server db implement. + +#### 🐛 Bug Fixes + +- **misc**: Fix incorrect baseURL for Groq in client mode. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the server db implement, closes [#2991](https://github.com/lobehub/lobe-chat/issues/2991) ([fa78599](https://github.com/lobehub/lobe-chat/commit/fa78599)) + +#### What's fixed + +- **misc**: Fix incorrect baseURL for Groq in client mode, closes [#2747](https://github.com/lobehub/lobe-chat/issues/2747) ([af14225](https://github.com/lobehub/lobe-chat/commit/af14225)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.5](https://github.com/lobehub/lobe-chat/compare/v1.1.4...v1.1.5) + +Released on **2024-06-23** + +#### ♻ Code Refactoring + +- **misc**: Remove deprecated env. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Remove deprecated env, closes [#2983](https://github.com/lobehub/lobe-chat/issues/2983) ([15a681f](https://github.com/lobehub/lobe-chat/commit/15a681f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.4](https://github.com/lobehub/lobe-chat/compare/v1.1.3...v1.1.4) + +Released on **2024-06-22** + +#### 🐛 Bug Fixes + +- **misc**: Create first-time user on server db. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Create first-time user on server db, closes [#2977](https://github.com/lobehub/lobe-chat/issues/2977) ([6f53f35](https://github.com/lobehub/lobe-chat/commit/6f53f35)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.3](https://github.com/lobehub/lobe-chat/compare/v1.1.2...v1.1.3) + +Released on **2024-06-21** + +#### 🐛 Bug Fixes + +- **misc**: Ollama not enabled client fetch by default. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Ollama not enabled client fetch by default, closes [#2961](https://github.com/lobehub/lobe-chat/issues/2961) ([90db48e](https://github.com/lobehub/lobe-chat/commit/90db48e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.2](https://github.com/lobehub/lobe-chat/compare/v1.1.1...v1.1.2) + +Released on **2024-06-20** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.1](https://github.com/lobehub/lobe-chat/compare/v1.1.0...v1.1.1) + +Released on **2024-06-20** + +#### 💄 Styles + +- **misc**: Fixed System Agent missing in mobile layout. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fixed System Agent missing in mobile layout, closes [#2954](https://github.com/lobehub/lobe-chat/issues/2954) ([596b9c8](https://github.com/lobehub/lobe-chat/commit/596b9c8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.1.0](https://github.com/lobehub/lobe-chat/compare/v1.0.14...v1.1.0) + +Released on **2024-06-20** + +#### ✨ Features + +- **misc**: Supoort Claude 3.5 Sonnet. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Supoort Claude 3.5 Sonnet, closes [#2955](https://github.com/lobehub/lobe-chat/issues/2955) ([aa1d7b7](https://github.com/lobehub/lobe-chat/commit/aa1d7b7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.14](https://github.com/lobehub/lobe-chat/compare/v1.0.13...v1.0.14) + +Released on **2024-06-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix to send image without text. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix to send image without text, closes [#2952](https://github.com/lobehub/lobe-chat/issues/2952) ([b3e915e](https://github.com/lobehub/lobe-chat/commit/b3e915e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.13](https://github.com/lobehub/lobe-chat/compare/v1.0.12...v1.0.13) + +Released on **2024-06-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix and improve tool calling. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix and improve tool calling, closes [#2941](https://github.com/lobehub/lobe-chat/issues/2941) ([ea06536](https://github.com/lobehub/lobe-chat/commit/ea06536)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.12](https://github.com/lobehub/lobe-chat/compare/v1.0.11...v1.0.12) + +Released on **2024-06-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix auto avatar. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auto avatar, closes [#2939](https://github.com/lobehub/lobe-chat/issues/2939) ([f40300c](https://github.com/lobehub/lobe-chat/commit/f40300c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.11](https://github.com/lobehub/lobe-chat/compare/v1.0.10...v1.0.11) + +Released on **2024-06-19** + +#### 💄 Styles + +- **misc**: Fix phi3 icon display under OpenRouter. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix phi3 icon display under OpenRouter, closes [#2877](https://github.com/lobehub/lobe-chat/issues/2877) ([4173015](https://github.com/lobehub/lobe-chat/commit/4173015)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.10](https://github.com/lobehub/lobe-chat/compare/v1.0.9...v1.0.10) + +Released on **2024-06-19** + +#### 🐛 Bug Fixes + +- **misc**: Typo in reset settings. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Typo in reset settings, closes [#2926](https://github.com/lobehub/lobe-chat/issues/2926) ([93d460a](https://github.com/lobehub/lobe-chat/commit/93d460a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.9](https://github.com/lobehub/lobe-chat/compare/v1.0.8...v1.0.9) + +Released on **2024-06-19** + +#### 💄 Styles + +- **model**: Update `deepseek-coder` model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **model**: Update `deepseek-coder` model, closes [#2927](https://github.com/lobehub/lobe-chat/issues/2927) ([c8d45e4](https://github.com/lobehub/lobe-chat/commit/c8d45e4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.8](https://github.com/lobehub/lobe-chat/compare/v1.0.7...v1.0.8) + +Released on **2024-06-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix hydration mismatch on macOS. + +#### 💄 Styles + +- **misc**: Update brand and improve docs. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix hydration mismatch on macOS, closes [#2913](https://github.com/lobehub/lobe-chat/issues/2913) ([cd9a143](https://github.com/lobehub/lobe-chat/commit/cd9a143)) + +#### Styles + +- **misc**: Update brand and improve docs, closes [#2917](https://github.com/lobehub/lobe-chat/issues/2917) ([2b54cae](https://github.com/lobehub/lobe-chat/commit/2b54cae)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.7](https://github.com/lobehub/lobe-chat/compare/v1.0.6...v1.0.7) + +Released on **2024-06-18** + +#### ♻ Code Refactoring + +- **misc**: Remove some i18n text. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Remove some i18n text, closes [#2862](https://github.com/lobehub/lobe-chat/issues/2862) ([1fd7d76](https://github.com/lobehub/lobe-chat/commit/1fd7d76)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.6](https://github.com/lobehub/lobe-chat/compare/v1.0.5...v1.0.6) + +Released on **2024-06-17** + +#### 💄 Styles + +- **misc**: Fix footer being cut on wide screen. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix footer being cut on wide screen, closes [#2905](https://github.com/lobehub/lobe-chat/issues/2905) ([3a1e0cf](https://github.com/lobehub/lobe-chat/commit/3a1e0cf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.5](https://github.com/lobehub/lobe-chat/compare/v1.0.4...v1.0.5) + +Released on **2024-06-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix onboard and auth for community version. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix onboard and auth for community version, closes [#2908](https://github.com/lobehub/lobe-chat/issues/2908) ([b02020d](https://github.com/lobehub/lobe-chat/commit/b02020d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.4](https://github.com/lobehub/lobe-chat/compare/v1.0.3...v1.0.4) + +Released on **2024-06-17** + +#### 💄 Styles + +- **misc**: Add stepfun as a new provider. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add stepfun as a new provider, closes [#2803](https://github.com/lobehub/lobe-chat/issues/2803) ([e1989a1](https://github.com/lobehub/lobe-chat/commit/e1989a1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.3](https://github.com/lobehub/lobe-chat/compare/v1.0.2...v1.0.3) + +Released on **2024-06-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix clerk `UNAUTHORIZED` auth error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix clerk `UNAUTHORIZED` auth error, closes [#2907](https://github.com/lobehub/lobe-chat/issues/2907) ([bb33ba4](https://github.com/lobehub/lobe-chat/commit/bb33ba4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.2](https://github.com/lobehub/lobe-chat/compare/v1.0.1...v1.0.2) + +Released on **2024-06-17** + +#### 🐛 Bug Fixes + +- **misc**: Openai key and openai proxy are invalid in feature flags. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Openai key and openai proxy are invalid in feature flags, closes [#2886](https://github.com/lobehub/lobe-chat/issues/2886) ([ec4f481](https://github.com/lobehub/lobe-chat/commit/ec4f481)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.0.1](https://github.com/lobehub/lobe-chat/compare/v1.0.0...v1.0.1) + +Released on **2024-06-17** + +#### 💄 Styles + +- **misc**: Remove r2 cdn url. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Remove r2 cdn url, closes [#2878](https://github.com/lobehub/lobe-chat/issues/2878) ([19fd4d5](https://github.com/lobehub/lobe-chat/commit/19fd4d5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.164.0](https://github.com/lobehub/lobe-chat/compare/v0.163.0...v0.164.0) + +Released on **2024-06-17** + +#### ✨ Features + +- **misc**: Release LobeChat 1.0. + +#### 🔧 Chores + +- **misc**: Bump version. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Release LobeChat 1.0, closes [#2897](https://github.com/lobehub/lobe-chat/issues/2897) ([97bb377](https://github.com/lobehub/lobe-chat/commit/97bb377)) + +#### Chores + +- **misc**: Bump version, closes [#2896](https://github.com/lobehub/lobe-chat/issues/2896) ([6e2d03b](https://github.com/lobehub/lobe-chat/commit/6e2d03b)) + +
+ +#### 💥 BREAKING CHANGES + +- **misc**: Update LICENSE to Apache 2.0 +- **misc**: update to 1.0.0 + +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.163.0](https://github.com/lobehub/lobe-chat/compare/v0.162.25...v0.163.0) + +Released on **2024-06-17** + +#### ✨ Features + +- **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support server db mode with Postgres / Drizzle ORM / tRPC, closes [#2556](https://github.com/lobehub/lobe-chat/issues/2556) ([b26afbf](https://github.com/lobehub/lobe-chat/commit/b26afbf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.25](https://github.com/lobehub/lobe-chat/compare/v0.162.24...v0.162.25) + +Released on **2024-06-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix issues for client fetch. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix issues for client fetch, closes [#2753](https://github.com/lobehub/lobe-chat/issues/2753) ([6f5be5d](https://github.com/lobehub/lobe-chat/commit/6f5be5d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.24](https://github.com/lobehub/lobe-chat/compare/v0.162.23...v0.162.24) + +Released on **2024-06-14** + +#### 💄 Styles + +- **misc**: Update error card style, Update settings footer style and about page. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update error card style, closes [#2868](https://github.com/lobehub/lobe-chat/issues/2868) ([a9d678b](https://github.com/lobehub/lobe-chat/commit/a9d678b)) +- **misc**: Update settings footer style and about page, closes [#2846](https://github.com/lobehub/lobe-chat/issues/2846) ([d815109](https://github.com/lobehub/lobe-chat/commit/d815109)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.23](https://github.com/lobehub/lobe-chat/compare/v0.162.22...v0.162.23) + +Released on **2024-06-12** + +#### 💄 Styles + +- **misc**: Add Qwen2 models, Add Zhipu new models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add Qwen2 models, closes [#2832](https://github.com/lobehub/lobe-chat/issues/2832) ([fb97be9](https://github.com/lobehub/lobe-chat/commit/fb97be9)) +- **misc**: Add Zhipu new models, closes [#2830](https://github.com/lobehub/lobe-chat/issues/2830) ([5be43f0](https://github.com/lobehub/lobe-chat/commit/5be43f0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.22](https://github.com/lobehub/lobe-chat/compare/v0.162.21...v0.162.22) + +Released on **2024-06-11** + +#### 💄 Styles + +- **misc**: Expand `Clear` tooltip maxWidth. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Expand `Clear` tooltip maxWidth, closes [#2822](https://github.com/lobehub/lobe-chat/issues/2822) ([a5c3d6f](https://github.com/lobehub/lobe-chat/commit/a5c3d6f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.21](https://github.com/lobehub/lobe-chat/compare/v0.162.20...v0.162.21) + +Released on **2024-06-09** + +#### 💄 Styles + +- **misc**: Do not show noDescription in new sesstion. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Do not show noDescription in new sesstion, closes [#2749](https://github.com/lobehub/lobe-chat/issues/2749) ([30b00aa](https://github.com/lobehub/lobe-chat/commit/30b00aa)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.20](https://github.com/lobehub/lobe-chat/compare/v0.162.19...v0.162.20) + +Released on **2024-06-08** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.19](https://github.com/lobehub/lobe-chat/compare/v0.162.18...v0.162.19) + +Released on **2024-06-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix OpenAi BaseURL in api form. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix OpenAi BaseURL in api form, closes [#2806](https://github.com/lobehub/lobe-chat/issues/2806) ([1392957](https://github.com/lobehub/lobe-chat/commit/1392957)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.18](https://github.com/lobehub/lobe-chat/compare/v0.162.17...v0.162.18) + +Released on **2024-06-06** + +#### ♻ Code Refactoring + +- **misc**: Refactor model provider implement. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor model provider implement, closes [#2801](https://github.com/lobehub/lobe-chat/issues/2801) ([7bb4fec](https://github.com/lobehub/lobe-chat/commit/7bb4fec)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.17](https://github.com/lobehub/lobe-chat/compare/v0.162.16...v0.162.17) + +Released on **2024-06-04** + +#### 🐛 Bug Fixes + +- **misc**: Fix `response.undefined` error with some provider. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `response.undefined` error with some provider, closes [#2782](https://github.com/lobehub/lobe-chat/issues/2782) ([5676899](https://github.com/lobehub/lobe-chat/commit/5676899)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.16](https://github.com/lobehub/lobe-chat/compare/v0.162.15...v0.162.16) + +Released on **2024-06-04** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.15](https://github.com/lobehub/lobe-chat/compare/v0.162.14...v0.162.15) + +Released on **2024-06-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix send button loading on only add user message. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix send button loading on only add user message, closes [#2774](https://github.com/lobehub/lobe-chat/issues/2774) ([a7f2982](https://github.com/lobehub/lobe-chat/commit/a7f2982)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.14](https://github.com/lobehub/lobe-chat/compare/v0.162.13...v0.162.14) + +Released on **2024-06-03** + +#### 💄 Styles + +- **misc**: Improve loading state. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve loading state, closes [#2767](https://github.com/lobehub/lobe-chat/issues/2767) ([fbdfde9](https://github.com/lobehub/lobe-chat/commit/fbdfde9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.13](https://github.com/lobehub/lobe-chat/compare/v0.162.12...v0.162.13) + +Released on **2024-06-01** + +#### 💄 Styles + +- **misc**: Improve config upload modal. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve config upload modal, closes [#2745](https://github.com/lobehub/lobe-chat/issues/2745) ([af9af9f](https://github.com/lobehub/lobe-chat/commit/af9af9f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.12](https://github.com/lobehub/lobe-chat/compare/v0.162.11...v0.162.12) + +Released on **2024-05-31** + +#### ♻ Code Refactoring + +- **misc**: Refactor session meta method. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor session meta method, closes [#2737](https://github.com/lobehub/lobe-chat/issues/2737) ([b103c3c](https://github.com/lobehub/lobe-chat/commit/b103c3c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.11](https://github.com/lobehub/lobe-chat/compare/v0.162.10...v0.162.11) + +Released on **2024-05-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix import config. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix import config, closes [#2720](https://github.com/lobehub/lobe-chat/issues/2720) ([a5ddd9a](https://github.com/lobehub/lobe-chat/commit/a5ddd9a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.10](https://github.com/lobehub/lobe-chat/compare/v0.162.9...v0.162.10) + +Released on **2024-05-29** + +#### ♻ Code Refactoring + +- **misc**: Refactor the config import for server import. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the config import for server import, closes [#2718](https://github.com/lobehub/lobe-chat/issues/2718) ([d4ee64b](https://github.com/lobehub/lobe-chat/commit/d4ee64b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.9](https://github.com/lobehub/lobe-chat/compare/v0.162.8...v0.162.9) + +Released on **2024-05-29** + +#### ♻ Code Refactoring + +- **misc**: Refactor the settings to add optimistic updating. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the settings to add optimistic updating, closes [#2709](https://github.com/lobehub/lobe-chat/issues/2709) ([fade53e](https://github.com/lobehub/lobe-chat/commit/fade53e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.8](https://github.com/lobehub/lobe-chat/compare/v0.162.7...v0.162.8) + +Released on **2024-05-28** + +#### 💄 Styles + +- **misc**: Add optimistic loading for image uploading. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add optimistic loading for image uploading, closes [#2700](https://github.com/lobehub/lobe-chat/issues/2700) ([f99c9ce](https://github.com/lobehub/lobe-chat/commit/f99c9ce)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.7](https://github.com/lobehub/lobe-chat/compare/v0.162.6...v0.162.7) + +Released on **2024-05-28** + +#### 💄 Styles + +- **misc**: Improve display of `set limited history messages`, `randomness` and `voice input`. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve display of `set limited history messages`, `randomness` and `voice input`, closes [#2586](https://github.com/lobehub/lobe-chat/issues/2586) ([22c9b9c](https://github.com/lobehub/lobe-chat/commit/22c9b9c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.6](https://github.com/lobehub/lobe-chat/compare/v0.162.5...v0.162.6) + +Released on **2024-05-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix the default agent not work correctly on new device. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the default agent not work correctly on new device, closes [#2699](https://github.com/lobehub/lobe-chat/issues/2699) ([e4c7536](https://github.com/lobehub/lobe-chat/commit/e4c7536)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.5](https://github.com/lobehub/lobe-chat/compare/v0.162.4...v0.162.5) + +Released on **2024-05-28** + +#### 💄 Styles + +- **misc**: Add `SYSTEM_AGENT` env. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add `SYSTEM_AGENT` env, closes [#2694](https://github.com/lobehub/lobe-chat/issues/2694) ([0dfcf8d](https://github.com/lobehub/lobe-chat/commit/0dfcf8d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.4](https://github.com/lobehub/lobe-chat/compare/v0.162.3...v0.162.4) + +Released on **2024-05-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix auto focus issues. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auto focus issues, closes [#2697](https://github.com/lobehub/lobe-chat/issues/2697) ([8df856e](https://github.com/lobehub/lobe-chat/commit/8df856e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.3](https://github.com/lobehub/lobe-chat/compare/v0.162.2...v0.162.3) + +Released on **2024-05-28** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.2](https://github.com/lobehub/lobe-chat/compare/v0.162.1...v0.162.2) + +Released on **2024-05-28** + +#### ♻ Code Refactoring + +- **misc**: Refactor agent store data. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor agent store data, closes [#2690](https://github.com/lobehub/lobe-chat/issues/2690) ([e201937](https://github.com/lobehub/lobe-chat/commit/e201937)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.162.1](https://github.com/lobehub/lobe-chat/compare/v0.162.0...v0.162.1) + +Released on **2024-05-27** + +#### 💄 Styles + +- **misc**: Improve the display effect of plug-in API name and description. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve the display effect of plug-in API name and description, closes [#2678](https://github.com/lobehub/lobe-chat/issues/2678) ([19cd0b9](https://github.com/lobehub/lobe-chat/commit/19cd0b9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.162.0](https://github.com/lobehub/lobe-chat/compare/v0.161.25...v0.162.0) + +Released on **2024-05-27** + +#### ✨ Features + +- **misc**: Support topic agent. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support topic agent, closes [#2683](https://github.com/lobehub/lobe-chat/issues/2683) ([56865fe](https://github.com/lobehub/lobe-chat/commit/56865fe)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.25](https://github.com/lobehub/lobe-chat/compare/v0.161.24...v0.161.25) + +Released on **2024-05-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix trpc/edge path error when setting `NEXT_PUBLIC_BASE_PATH`. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix trpc/edge path error when setting `NEXT_PUBLIC_BASE_PATH`, closes [#2681](https://github.com/lobehub/lobe-chat/issues/2681) ([622b390](https://github.com/lobehub/lobe-chat/commit/622b390)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.24](https://github.com/lobehub/lobe-chat/compare/v0.161.23...v0.161.24) + +Released on **2024-05-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix the missing user id in chat compeletition and fix remove unstarred topic not working. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the missing user id in chat compeletition and fix remove unstarred topic not working, closes [#2677](https://github.com/lobehub/lobe-chat/issues/2677) ([c9fb2de](https://github.com/lobehub/lobe-chat/commit/c9fb2de)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.23](https://github.com/lobehub/lobe-chat/compare/v0.161.22...v0.161.23) + +Released on **2024-05-27** + +#### ♻ Code Refactoring + +- **misc**: Refactor `keyVaults` and rename `endpoint` to `baseURL`. + +#### 💄 Styles + +- **misc**: Fix PluginStore layout. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor `keyVaults` and rename `endpoint` to `baseURL`, closes [#2673](https://github.com/lobehub/lobe-chat/issues/2673) ([4049bc7](https://github.com/lobehub/lobe-chat/commit/4049bc7)) + +#### Styles + +- **misc**: Fix PluginStore layout, closes [#2590](https://github.com/lobehub/lobe-chat/issues/2590) [#2511](https://github.com/lobehub/lobe-chat/issues/2511) ([e1ae39b](https://github.com/lobehub/lobe-chat/commit/e1ae39b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.22](https://github.com/lobehub/lobe-chat/compare/v0.161.21...v0.161.22) + +Released on **2024-05-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix connection checker. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix connection checker, closes [#2672](https://github.com/lobehub/lobe-chat/issues/2672) ([bef8926](https://github.com/lobehub/lobe-chat/commit/bef8926)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.21](https://github.com/lobehub/lobe-chat/compare/v0.161.20...v0.161.21) + +Released on **2024-05-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix the batch import error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the batch import error, closes [#2671](https://github.com/lobehub/lobe-chat/issues/2671) ([db8f2c6](https://github.com/lobehub/lobe-chat/commit/db8f2c6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.20](https://github.com/lobehub/lobe-chat/compare/v0.161.19...v0.161.20) + +Released on **2024-05-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix vercel build. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix vercel build, closes [#2666](https://github.com/lobehub/lobe-chat/issues/2666) ([cb70e4a](https://github.com/lobehub/lobe-chat/commit/cb70e4a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.19](https://github.com/lobehub/lobe-chat/compare/v0.161.18...v0.161.19) + +Released on **2024-05-25** + +#### 💄 Styles + +- **misc**: Update token tag popover style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update token tag popover style, closes [#2631](https://github.com/lobehub/lobe-chat/issues/2631) ([7635129](https://github.com/lobehub/lobe-chat/commit/7635129)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.18](https://github.com/lobehub/lobe-chat/compare/v0.161.17...v0.161.18) + +Released on **2024-05-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix aws log. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix aws log ([58f3ed1](https://github.com/lobehub/lobe-chat/commit/58f3ed1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.17](https://github.com/lobehub/lobe-chat/compare/v0.161.16...v0.161.17) + +Released on **2024-05-25** + +#### ♻ Code Refactoring + +- **misc**: Migrate some agent config to `chatConfig`. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Migrate some agent config to `chatConfig`, closes [#2646](https://github.com/lobehub/lobe-chat/issues/2646) ([2f311dc](https://github.com/lobehub/lobe-chat/commit/2f311dc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.16](https://github.com/lobehub/lobe-chat/compare/v0.161.15...v0.161.16) + +Released on **2024-05-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix bedrock show by default on vercel. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix bedrock show by default on vercel, closes [#2634](https://github.com/lobehub/lobe-chat/issues/2634) ([7ad3af2](https://github.com/lobehub/lobe-chat/commit/7ad3af2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.15](https://github.com/lobehub/lobe-chat/compare/v0.161.14...v0.161.15) + +Released on **2024-05-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix avatar missing on client DB mode. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix avatar missing on client DB mode, closes [#2645](https://github.com/lobehub/lobe-chat/issues/2645) ([12726c2](https://github.com/lobehub/lobe-chat/commit/12726c2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.14](https://github.com/lobehub/lobe-chat/compare/v0.161.13...v0.161.14) + +Released on **2024-05-24** + +#### ♻ Code Refactoring + +- **misc**: Refactor the global app status and fix PWA installer. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the global app status and fix PWA installer, closes [#2637](https://github.com/lobehub/lobe-chat/issues/2637) ([1f70305](https://github.com/lobehub/lobe-chat/commit/1f70305)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.13](https://github.com/lobehub/lobe-chat/compare/v0.161.12...v0.161.13) + +Released on **2024-05-24** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.12](https://github.com/lobehub/lobe-chat/compare/v0.161.11...v0.161.12) + +Released on **2024-05-23** + +#### ♻ Code Refactoring + +- **misc**: Refactor the home redirect implement. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the home redirect implement, closes [#2626](https://github.com/lobehub/lobe-chat/issues/2626) ([ab4216e](https://github.com/lobehub/lobe-chat/commit/ab4216e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.11](https://github.com/lobehub/lobe-chat/compare/v0.161.10...v0.161.11) + +Released on **2024-05-23** + +#### 💄 Styles + +- **misc**: Improve PWA install guide. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve PWA install guide, closes [#2617](https://github.com/lobehub/lobe-chat/issues/2617) ([7fee545](https://github.com/lobehub/lobe-chat/commit/7fee545)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.10](https://github.com/lobehub/lobe-chat/compare/v0.161.9...v0.161.10) + +Released on **2024-05-23** + +#### 🐛 Bug Fixes + +- **misc**: Refactor user store and fix custom model list form. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Refactor user store and fix custom model list form, closes [#2620](https://github.com/lobehub/lobe-chat/issues/2620) ([81ea886](https://github.com/lobehub/lobe-chat/commit/81ea886)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.9](https://github.com/lobehub/lobe-chat/compare/v0.161.8...v0.161.9) + +Released on **2024-05-23** + +#### 💄 Styles + +- **misc**: Fix image style and improve drag upload box. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix image style and improve drag upload box, closes [#2610](https://github.com/lobehub/lobe-chat/issues/2610) ([5e1a4d6](https://github.com/lobehub/lobe-chat/commit/5e1a4d6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.8](https://github.com/lobehub/lobe-chat/compare/v0.161.7...v0.161.8) + +Released on **2024-05-22** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.7](https://github.com/lobehub/lobe-chat/compare/v0.161.6...v0.161.7) + +Released on **2024-05-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor to serverDB ENV. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to serverDB ENV, closes [#2612](https://github.com/lobehub/lobe-chat/issues/2612) ([fa1409e](https://github.com/lobehub/lobe-chat/commit/fa1409e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.6](https://github.com/lobehub/lobe-chat/compare/v0.161.5...v0.161.6) + +Released on **2024-05-22** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.5](https://github.com/lobehub/lobe-chat/compare/v0.161.4...v0.161.5) + +Released on **2024-05-22** + +#### ♻ Code Refactoring + +- **misc**: Move feature flags ENV. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move feature flags ENV, closes [#2605](https://github.com/lobehub/lobe-chat/issues/2605) ([054a404](https://github.com/lobehub/lobe-chat/commit/054a404)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.4](https://github.com/lobehub/lobe-chat/compare/v0.161.3...v0.161.4) + +Released on **2024-05-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor the app ENV. + +#### 🐛 Bug Fixes + +- **misc**: Fix market and plugin cache. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the app ENV, closes [#2604](https://github.com/lobehub/lobe-chat/issues/2604) ([acc0fdc](https://github.com/lobehub/lobe-chat/commit/acc0fdc)) + +#### What's fixed + +- **misc**: Fix market and plugin cache, closes [#2608](https://github.com/lobehub/lobe-chat/issues/2608) ([a3f161e](https://github.com/lobehub/lobe-chat/commit/a3f161e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.3](https://github.com/lobehub/lobe-chat/compare/v0.161.2...v0.161.3) + +Released on **2024-05-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor the langfuse env. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the langfuse env, closes [#2602](https://github.com/lobehub/lobe-chat/issues/2602) ([cbebfbc](https://github.com/lobehub/lobe-chat/commit/cbebfbc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.2](https://github.com/lobehub/lobe-chat/compare/v0.161.1...v0.161.2) + +Released on **2024-05-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor the llm env. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the llm env, closes [#2592](https://github.com/lobehub/lobe-chat/issues/2592) ([5eb225a](https://github.com/lobehub/lobe-chat/commit/5eb225a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.161.1](https://github.com/lobehub/lobe-chat/compare/v0.161.0...v0.161.1) + +Released on **2024-05-22** + +#### 💄 Styles + +- **misc**: Fix setting modal style problem. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix setting modal style problem, closes [#2599](https://github.com/lobehub/lobe-chat/issues/2599) ([1a3f8f3](https://github.com/lobehub/lobe-chat/commit/1a3f8f3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.161.0](https://github.com/lobehub/lobe-chat/compare/v0.160.8...v0.161.0) + +Released on **2024-05-21** + +#### ✨ Features + +- **misc**: Add system agent to select another model provider for translation. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add system agent to select another model provider for translation, closes [#1902](https://github.com/lobehub/lobe-chat/issues/1902) ([3945387](https://github.com/lobehub/lobe-chat/commit/3945387)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.8](https://github.com/lobehub/lobe-chat/compare/v0.160.7...v0.160.8) + +Released on **2024-05-21** + +#### 💄 Styles + +- **misc**: `Tooltip` should not be selected & Model selector overlaps with reset button. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: `Tooltip` should not be selected & Model selector overlaps with reset button, closes [#2500](https://github.com/lobehub/lobe-chat/issues/2500) [#2511](https://github.com/lobehub/lobe-chat/issues/2511) [#2581](https://github.com/lobehub/lobe-chat/issues/2581) ([0c62fb7](https://github.com/lobehub/lobe-chat/commit/0c62fb7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.7](https://github.com/lobehub/lobe-chat/compare/v0.160.6...v0.160.7) + +Released on **2024-05-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix duplicate model panel key. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix duplicate model panel key, closes [#2591](https://github.com/lobehub/lobe-chat/issues/2591) ([c733fcf](https://github.com/lobehub/lobe-chat/commit/c733fcf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.6](https://github.com/lobehub/lobe-chat/compare/v0.160.5...v0.160.6) + +Released on **2024-05-21** + +#### ♻ Code Refactoring + +- **misc**: Refactor a Notification component, refactor code, refactor message action, refactor the type, refactor user preference. + +#### 💄 Styles + +- **misc**: Add ENABLED_OPENAI env, add fetch error notification, improve openai fetch client switch, improve redirect when login. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor a Notification component ([28db3d5](https://github.com/lobehub/lobe-chat/commit/28db3d5)) +- **misc**: Refactor code, closes [#2584](https://github.com/lobehub/lobe-chat/issues/2584) ([086244c](https://github.com/lobehub/lobe-chat/commit/086244c)) +- **misc**: Refactor message action ([224bd67](https://github.com/lobehub/lobe-chat/commit/224bd67)) +- **misc**: Refactor the type ([ddf1abf](https://github.com/lobehub/lobe-chat/commit/ddf1abf)) +- **misc**: Refactor user preference ([1823b0d](https://github.com/lobehub/lobe-chat/commit/1823b0d)) + +#### Styles + +- **misc**: Add ENABLED_OPENAI env ([35f6230](https://github.com/lobehub/lobe-chat/commit/35f6230)) +- **misc**: Add fetch error notification ([0186b4b](https://github.com/lobehub/lobe-chat/commit/0186b4b)) +- **misc**: Improve openai fetch client switch ([3cad470](https://github.com/lobehub/lobe-chat/commit/3cad470)) +- **misc**: Improve redirect when login ([cb26655](https://github.com/lobehub/lobe-chat/commit/cb26655)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.5](https://github.com/lobehub/lobe-chat/compare/v0.160.4...v0.160.5) + +Released on **2024-05-20** + +#### ♻ Code Refactoring + +- **misc**: Refactor analytics env. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor analytics env, closes [#2570](https://github.com/lobehub/lobe-chat/issues/2570) ([d809d3f](https://github.com/lobehub/lobe-chat/commit/d809d3f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.4](https://github.com/lobehub/lobe-chat/compare/v0.160.3...v0.160.4) + +Released on **2024-05-20** + +#### 💄 Styles + +- **misc**: Modify bedrock provided model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Modify bedrock provided model, closes [#2473](https://github.com/lobehub/lobe-chat/issues/2473) ([a1fabf6](https://github.com/lobehub/lobe-chat/commit/a1fabf6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.3](https://github.com/lobehub/lobe-chat/compare/v0.160.2...v0.160.3) + +Released on **2024-05-19** + +#### 💄 Styles + +- **misc**: Add two feature flags: check_updates 、welcome_suggest. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add two feature flags: check_updates 、welcome_suggest, closes [#2555](https://github.com/lobehub/lobe-chat/issues/2555) ([84c69c9](https://github.com/lobehub/lobe-chat/commit/84c69c9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.2](https://github.com/lobehub/lobe-chat/compare/v0.160.1...v0.160.2) + +Released on **2024-05-19** + +#### 🐛 Bug Fixes + +- **misc**: Upgrade antd and fix lint type. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Upgrade antd and fix lint type, closes [#2567](https://github.com/lobehub/lobe-chat/issues/2567) ([efe28da](https://github.com/lobehub/lobe-chat/commit/efe28da)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.160.1](https://github.com/lobehub/lobe-chat/compare/v0.160.0...v0.160.1) + +Released on **2024-05-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix enable ollama env. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix enable ollama env ([9c3f5a8](https://github.com/lobehub/lobe-chat/commit/9c3f5a8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.160.0](https://github.com/lobehub/lobe-chat/compare/v0.159.12...v0.160.0) + +Released on **2024-05-18** + +#### ✨ Features + +- **misc**: Bump version and add enable ollama env. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Bump version and add enable ollama env, closes [#2554](https://github.com/lobehub/lobe-chat/issues/2554) ([f5ce7c9](https://github.com/lobehub/lobe-chat/commit/f5ce7c9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.12](https://github.com/lobehub/lobe-chat/compare/v0.159.11...v0.159.12) + +Released on **2024-05-15** + +#### ♻ Code Refactoring + +- **misc**: Refactor the create message flow to fix some bugs. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the create message flow to fix some bugs, closes [#2521](https://github.com/lobehub/lobe-chat/issues/2521) ([7263a33](https://github.com/lobehub/lobe-chat/commit/7263a33)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.11](https://github.com/lobehub/lobe-chat/compare/v0.159.10...v0.159.11) + +Released on **2024-05-15** + +#### 💄 Styles + +- **misc**: Add Gemini 1.5 Flash model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add Gemini 1.5 Flash model, closes [#2507](https://github.com/lobehub/lobe-chat/issues/2507) ([5568472](https://github.com/lobehub/lobe-chat/commit/5568472)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.10](https://github.com/lobehub/lobe-chat/compare/v0.159.9...v0.159.10) + +Released on **2024-05-15** + +#### 💄 Styles + +- **misc**: Fix setting modal on responsive and some other style problem. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix setting modal on responsive and some other style problem, closes [#2512](https://github.com/lobehub/lobe-chat/issues/2512) ([f6b4ca4](https://github.com/lobehub/lobe-chat/commit/f6b4ca4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.9](https://github.com/lobehub/lobe-chat/compare/v0.159.8...v0.159.9) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent config on page init. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent config on page init, closes [#2506](https://github.com/lobehub/lobe-chat/issues/2506) ([90e742d](https://github.com/lobehub/lobe-chat/commit/90e742d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.8](https://github.com/lobehub/lobe-chat/compare/v0.159.7...v0.159.8) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix retry issue when hide page. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix retry issue when hide page, closes [#2503](https://github.com/lobehub/lobe-chat/issues/2503) ([24489bc](https://github.com/lobehub/lobe-chat/commit/24489bc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.7](https://github.com/lobehub/lobe-chat/compare/v0.159.6...v0.159.7) + +Released on **2024-05-14** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.6](https://github.com/lobehub/lobe-chat/compare/v0.159.5...v0.159.6) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Login button not show on user panel. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Login button not show on user panel, closes [#2496](https://github.com/lobehub/lobe-chat/issues/2496) ([39637fb](https://github.com/lobehub/lobe-chat/commit/39637fb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.5](https://github.com/lobehub/lobe-chat/compare/v0.159.4...v0.159.5) + +Released on **2024-05-14** + +#### 💄 Styles + +- **misc**: Fix scroll and expand. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix scroll and expand, closes [#2470](https://github.com/lobehub/lobe-chat/issues/2470) ([8b1202a](https://github.com/lobehub/lobe-chat/commit/8b1202a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.4](https://github.com/lobehub/lobe-chat/compare/v0.159.3...v0.159.4) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Refresh model config form & mobile footer button lost. + +#### 💄 Styles + +- **misc**: Add GPT-4o model, update perplexity models, updates 01.AI model list. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Refresh model config form & mobile footer button lost, closes [#2318](https://github.com/lobehub/lobe-chat/issues/2318) [#2319](https://github.com/lobehub/lobe-chat/issues/2319) [#1811](https://github.com/lobehub/lobe-chat/issues/1811) ([eadcefc](https://github.com/lobehub/lobe-chat/commit/eadcefc)) + +#### Styles + +- **misc**: Add GPT-4o model, closes [#2481](https://github.com/lobehub/lobe-chat/issues/2481) ([ae6a03f](https://github.com/lobehub/lobe-chat/commit/ae6a03f)) +- **misc**: Update perplexity models, closes [#2469](https://github.com/lobehub/lobe-chat/issues/2469) ([488cde7](https://github.com/lobehub/lobe-chat/commit/488cde7)) +- **misc**: Updates 01.AI model list, closes [#2471](https://github.com/lobehub/lobe-chat/issues/2471) ([f28711a](https://github.com/lobehub/lobe-chat/commit/f28711a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.3](https://github.com/lobehub/lobe-chat/compare/v0.159.2...v0.159.3) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix DeepSeek using wrong model ID. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix DeepSeek using wrong model ID, closes [#2484](https://github.com/lobehub/lobe-chat/issues/2484) ([465dbfc](https://github.com/lobehub/lobe-chat/commit/465dbfc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.2](https://github.com/lobehub/lobe-chat/compare/v0.159.1...v0.159.2) + +Released on **2024-05-14** + +#### 🐛 Bug Fixes + +- **misc**: Dragging text mistakenly as image. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Dragging text mistakenly as image, closes [#2111](https://github.com/lobehub/lobe-chat/issues/2111) ([3c047ef](https://github.com/lobehub/lobe-chat/commit/3c047ef)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.159.1](https://github.com/lobehub/lobe-chat/compare/v0.159.0...v0.159.1) + +Released on **2024-05-14** + +#### ♻ Code Refactoring + +- **misc**: Move next-auth hooks to user store actions. + +#### 🐛 Bug Fixes + +- **misc**: Pin `antd@5.17.0` to fix build error. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move next-auth hooks to user store actions, closes [#2364](https://github.com/lobehub/lobe-chat/issues/2364) ([6dbcd70](https://github.com/lobehub/lobe-chat/commit/6dbcd70)) + +#### What's fixed + +- **misc**: Pin `antd@5.17.0` to fix build error, closes [#2483](https://github.com/lobehub/lobe-chat/issues/2483) ([aa03833](https://github.com/lobehub/lobe-chat/commit/aa03833)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.159.0](https://github.com/lobehub/lobe-chat/compare/v0.158.2...v0.159.0) + +Released on **2024-05-14** + +#### ✨ Features + +- **misc**: Support DeepSeek as new model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support DeepSeek as new model provider, closes [#2446](https://github.com/lobehub/lobe-chat/issues/2446) ([18028f3](https://github.com/lobehub/lobe-chat/commit/18028f3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.158.2](https://github.com/lobehub/lobe-chat/compare/v0.158.1...v0.158.2) + +Released on **2024-05-13** + +#### 💄 Styles + +- **misc**: Fix TelemetryNotification zindex. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix TelemetryNotification zindex, closes [#2476](https://github.com/lobehub/lobe-chat/issues/2476) ([54524ab](https://github.com/lobehub/lobe-chat/commit/54524ab)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.158.1](https://github.com/lobehub/lobe-chat/compare/v0.158.0...v0.158.1) + +Released on **2024-05-13** + +#### 💄 Styles + +- **misc**: Add PWA install and metadata & ld generate. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add PWA install and metadata & ld generate, closes [#2438](https://github.com/lobehub/lobe-chat/issues/2438) ([6e9c69a](https://github.com/lobehub/lobe-chat/commit/6e9c69a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.158.0](https://github.com/lobehub/lobe-chat/compare/v0.157.2...v0.158.0) + +Released on **2024-05-13** + +#### ✨ Features + +- **misc**: Add user profile page. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add user profile page, closes [#2433](https://github.com/lobehub/lobe-chat/issues/2433) ([91f7294](https://github.com/lobehub/lobe-chat/commit/91f7294)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.157.2](https://github.com/lobehub/lobe-chat/compare/v0.157.1...v0.157.2) + +Released on **2024-05-13** + +#### 🐛 Bug Fixes + +- **misc**: Fix azure openai stream. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix azure openai stream, closes [#2465](https://github.com/lobehub/lobe-chat/issues/2465) ([760fe67](https://github.com/lobehub/lobe-chat/commit/760fe67)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.157.1](https://github.com/lobehub/lobe-chat/compare/v0.157.0...v0.157.1) + +Released on **2024-05-12** + +#### 🐛 Bug Fixes + +- **misc**: Fix dalle error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix dalle error ([7c493de](https://github.com/lobehub/lobe-chat/commit/7c493de)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.157.0](https://github.com/lobehub/lobe-chat/compare/v0.156.2...v0.157.0) + +Released on **2024-05-11** + +#### ✨ Features + +- **misc**: upgrade to the new `tool calls` mode. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: upgrade to the new `tool calls` mode, closes [#2414](https://github.com/lobehub/lobe-chat/issues/2414) ([7404f3b](https://github.com/lobehub/lobe-chat/commit/7404f3b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.156.2](https://github.com/lobehub/lobe-chat/compare/v0.156.1...v0.156.2) + +Released on **2024-05-10** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.156.1](https://github.com/lobehub/lobe-chat/compare/v0.156.0...v0.156.1) + +Released on **2024-05-10** + +#### 🐛 Bug Fixes + +- **misc**: Azure OpenAI Vision models issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Azure OpenAI Vision models issue, closes [#2429](https://github.com/lobehub/lobe-chat/issues/2429) ([9b8a4b1](https://github.com/lobehub/lobe-chat/commit/9b8a4b1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.156.0](https://github.com/lobehub/lobe-chat/compare/v0.155.9...v0.156.0) + +Released on **2024-05-09** + +#### ♻ Code Refactoring + +- **misc**: Refactor to improve provider locale. + +#### ✨ Features + +- **misc**: Support perplexity proxy url. + +#### 🐛 Bug Fixes + +- **misc**: Fix anthropic messages need pairs, fix parameter conditions for perplexity, fix Perplexity duplicate token. + +#### 💄 Styles + +- **misc**: Improve groq location error, improve location error, improve model provider ux, support groq proxy url. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to improve provider locale ([538b7bc](https://github.com/lobehub/lobe-chat/commit/538b7bc)) + +#### What's improved + +- **misc**: Support perplexity proxy url ([30bbe61](https://github.com/lobehub/lobe-chat/commit/30bbe61)) + +#### What's fixed + +- **misc**: Fix anthropic messages need pairs ([0e01db0](https://github.com/lobehub/lobe-chat/commit/0e01db0)) +- **misc**: Fix parameter conditions for perplexity ([156cf5f](https://github.com/lobehub/lobe-chat/commit/156cf5f)) +- **misc**: Fix Perplexity duplicate token ([6695c4b](https://github.com/lobehub/lobe-chat/commit/6695c4b)) + +#### Styles + +- **misc**: Improve groq location error ([023c21b](https://github.com/lobehub/lobe-chat/commit/023c21b)) +- **misc**: Improve location error ([862c0ae](https://github.com/lobehub/lobe-chat/commit/862c0ae)) +- **misc**: Improve model provider ux, closes [#2439](https://github.com/lobehub/lobe-chat/issues/2439) ([0deb079](https://github.com/lobehub/lobe-chat/commit/0deb079)) +- **misc**: Support groq proxy url ([ba1ba2a](https://github.com/lobehub/lobe-chat/commit/ba1ba2a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.9](https://github.com/lobehub/lobe-chat/compare/v0.155.8...v0.155.9) + +Released on **2024-05-09** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.8](https://github.com/lobehub/lobe-chat/compare/v0.155.7...v0.155.8) + +Released on **2024-05-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix mobile session style. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix mobile session style ([998a191](https://github.com/lobehub/lobe-chat/commit/998a191)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.7](https://github.com/lobehub/lobe-chat/compare/v0.155.6...v0.155.7) + +Released on **2024-05-08** + +#### 🐛 Bug Fixes + +- **misc**: Fix panel expand. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix panel expand ([5e78089](https://github.com/lobehub/lobe-chat/commit/5e78089)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.6](https://github.com/lobehub/lobe-chat/compare/v0.155.5...v0.155.6) + +Released on **2024-05-08** + +#### 🐛 Bug Fixes + +- **misc**: Fix editing long message issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix editing long message issue, closes [#2431](https://github.com/lobehub/lobe-chat/issues/2431) ([380d8da](https://github.com/lobehub/lobe-chat/commit/380d8da)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.5](https://github.com/lobehub/lobe-chat/compare/v0.155.4...v0.155.5) + +Released on **2024-05-08** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.4](https://github.com/lobehub/lobe-chat/compare/v0.155.3...v0.155.4) + +Released on **2024-05-08** + +#### 🐛 Bug Fixes + +- **misc**: Fix Agent Settings Form. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Agent Settings Form ([12c62a0](https://github.com/lobehub/lobe-chat/commit/12c62a0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ ### [Version 0.155.3](https://github.com/lobehub/lobe-chat/compare/v0.155.2...v0.155.3) Released on **2024-05-08** diff --git a/Dockerfile b/Dockerfile index 0f3bd32a20fb..6ace0247d4cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,8 +44,11 @@ ENV NEXT_PUBLIC_ANALYTICS_UMAMI "" ENV NEXT_PUBLIC_UMAMI_SCRIPT_URL "" ENV NEXT_PUBLIC_UMAMI_WEBSITE_ID "" +# Node +ENV NODE_OPTIONS "--max-old-space-size=8192" -RUN pnpm run build:docker # run build standalone for docker version +# run build standalone for docker version +RUN npm run build:docker ## Production image, copy all the files and run next FROM base AS runner @@ -126,4 +129,10 @@ ENV TOGETHERAI_API_KEY "" # Minimax ENV MINIMAX_API_KEY "" +# DeepSeek +ENV DEEPSEEK_API_KEY "" + +# Qwen +ENV QWEN_API_KEY "" + CMD ["node", "server.js"] diff --git a/LICENSE b/LICENSE index 3d6b955bf5ee..4704b86e70a5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,38 @@ -MIT License - -Copyright (c) 2023 - current LobeHub - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +Apache License Version 2.0 + +Copyright (c) 2024/06/17 - current LobeHub LLC. All rights reserved. + +---------- + +From 1.0, LobeChat is licensed under the Apache License 2.0, with the following additional conditions: + +1. The commercial usage of LobeChat: + + a. LobeChat may be utilized commercially, including as a frontend and backend service without modifying the source code. + + b. a commercial license must be obtained from the producer if you want to develop and distribute a derivative work based on LobeChat. + +Please contact hello@lobehub.com by email to inquire about licensing matters. + + +2. As a contributor, you should agree that: + + a. The producer can adjust the open-source agreement to be more strict or relaxed as deemed necessary. + + b. Your contributed code may be used for commercial purposes, including but not limited to its cloud edition. + +Apart from the specific conditions mentioned above, all other rights and restrictions follow the Apache License 2.0. Detailed information about the Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. + +---------- + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md index c4a96a82902f..f28f37c8e8bc 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ An open-source, modern-design ChatGPT/LLMs UI/Framework.
Supports speech-synthesis, multi-modal, and extensible ([function call][docs-functionc-call]) plugin system.
One-click **FREE** deployment of your private OpenAI ChatGPT/Claude/Gemini/Groq/Ollama chat application. -**English** · [简体中文](./README.zh-CN.md) · [Changelog](./CHANGELOG.md) · [Documents][docs] · [Report Bug][github-issues-link] · [Request Feature][github-issues-link] +**English** · [简体中文](./README.zh-CN.md) · [Official Site][official-site] · [Changelog](./CHANGELOG.md) · [Documents][docs] · [Blog][blog] · [Feedback][github-issues-link] @@ -59,9 +59,11 @@ One-click **FREE** deployment of your private OpenAI ChatGPT/Claude/Gemini/Groq/ - [`5` Text to Image Generation](#5-text-to-image-generation) - [`6` Plugin System (Function Calling)](#6-plugin-system-function-calling) - [`7` Agent Market (GPTs)](#7-agent-market-gpts) - - [`8` Progressive Web App (PWA)](#8-progressive-web-app-pwa) - - [`9` Mobile Device Adaptation](#9-mobile-device-adaptation) - - [`10` Custom Themes](#10-custom-themes) + - [`8` Support Local / Remote Database](#8-support-local--remote-database) + - [`9` Support Multi-User Management](#9-support-multi-user-management) + - [`10` Progressive Web App (PWA)](#10-progressive-web-app-pwa) + - [`11` Mobile Device Adaptation](#11-mobile-device-adaptation) + - [`12` Custom Themes](#12-custom-themes) - [`*` What's more](#-whats-more) - [⚡️ Performance](#️-performance) - [🛳 Self Hosting](#-self-hosting) @@ -130,6 +132,8 @@ We have implemented support for the following model service providers: - **ChatGLM**: Added the **ChatGLM** series models from Zhipuai (GLM-4/GLM-4-vision/GLM-3-turbo), providing users with another efficient conversation model choice. [Learn more](https://www.zhipuai.cn/) - **Moonshot AI (Dark Side of the Moon)**: Integrated with the Moonshot series models, an innovative AI startup from China, aiming to provide deeper conversation understanding. [Learn more](https://www.moonshot.cn/) - **Minimax**: Integrated the Minimax models, including the MoE model **abab6**, offers a broader range of choices. [Learn more](https://www.minimaxi.com/) +- **DeepSeek**: Integrated with the DeepSeek series models, an innovative AI startup from China, The product has been designed to provide a model that balances performance with price. [Learn more](https://www.deepseek.com/) +- **Qwen**: Integrated the Qwen series models, including the latest **qwen-turbo**, **qwen-plus** and **qwen-max**. [Lean more](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction) At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284). @@ -222,14 +226,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext -| Recent Submits | Description | -| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | Search aggregation service, specifically designed for LLMs
`web` `search` | -| [Social Search](https://chat-preview.lobehub.com/settings/agent)
By **say-apps** on **2024-05-02** | The Social Search provides access to tweets, users, followers, images, media and more.
`social` `twitter` `x` `search` | -| [Search Google via Serper](https://chat-preview.lobehub.com/settings/agent)
By **Barry** on **2024-04-30** | Google search engine via Serper.dev free API (2500x🆓/month)
`web` `search` | -| [NFT Guru](https://chat-preview.lobehub.com/settings/agent)
By **swap** on **2024-04-03** | Discover current prices of NFTs across major platforms and keep track of the rapidly changing marketplace with real-time
`crypto` `nft` | +| Recent Submits | Description | +| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| [Social Search](https://chat-preview.lobehub.com/settings/agent)
By **say-apps** on **2024-06-02** | The Social Search provides access to tweets, users, followers, images, media and more.
`social` `twitter` `x` `search` | +| [Space](https://chat-preview.lobehub.com/settings/agent)
By **automateyournetwork** on **2024-05-12** | Space data including NASA.
`space` `nasa` | +| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | Search aggregation service, specifically designed for LLMs
`web` `search` | +| [Search Google via Serper](https://chat-preview.lobehub.com/settings/agent)
By **Barry** on **2024-04-30** | Google search engine via Serper.dev free API (2500x🆓/month)
`web` `search` | -> 📊 Total plugins: [**57**](https://github.com/lobehub/lobe-chat-plugins) +> 📊 Total plugins: [**52**](https://github.com/lobehub/lobe-chat-plugins) @@ -261,14 +265,14 @@ Our marketplace is not just a showcase platform but also a collaborative space. -| Recent Submits | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [Video to Blog Post Assistant](https://chat-preview.lobehub.com/market?agent=video-2-blog-assistant)
By **[yayoinoyume](https://github.com/yayoinoyume)** on **2024-05-06** | Helps you quickly organize messy subtitles into beautiful blog posts
`subtitle-organization` `blog-post-formatting` `video-to-blog` | -| [Art Evaluation Tutor](https://chat-preview.lobehub.com/market?agent=wanwusheng-art)
By **[dingyufei615](https://github.com/dingyufei615)** on **2024-05-06** | Specializes in teaching children's art, meticulously evaluates works, pays attention to details, and adapts to students of different age groups.
`art-education` `evaluation` `creativity` `teaching` `painting` | -| [iOS Code Artist](https://chat-preview.lobehub.com/market?agent=ios-develop)
By **[Alcu1n](https://github.com/Alcu1n)** on **2024-05-03** | iOS development expert with 15 years of experience, proficient in Swift, SwiftUI, Flutter. Clear logic in code, precise debugging, providing project frameworks from 0 to 1.
`i-os-development` `coding` `debugging` `project-planning` `logical-thinking` | -| [Sales Description Specialist](https://chat-preview.lobehub.com/market?agent=verkauf-kleinanzeigen)
By **[highseen](https://github.com/highseen)** on **2024-04-30** | Assists in the sale of used items through research, pricing, description, and title creation.
`product-sales` `research` `description` | +| Recent Submits | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Fastapi Project Development Assistant](https://chat-preview.lobehub.com/market?agent=fastapi-development)
By **[xwxw098](https://github.com/xwxw098)** on **2024-06-19** | Proficient in Python modular development, skilled in using FastAPI, PostgreSQL, Tortoise-ORM, and other technologies, able to provide clear code structure and detailed comments for large projects.
`fast-api` `python` `modular-development` | +| [IT Systems Architect](https://chat-preview.lobehub.com/market?agent=it-system-architect)
By **[a562314](https://github.com/a562314)** on **2024-06-19** | Senior IT architect specializing in requirements analysis, system design, technology selection, and cross-platform system optimization. With over 5 years of experience, proficient in Windows, macOS, and Linux operating systems, skilled in troubleshooting, and security protection.
`it-architecture-design` `problem-solving` `agile-development` `system-optimization` `cross-platform-skills` `teamwork` | +| [Linux Kernel Expert](https://chat-preview.lobehub.com/market?agent=linux-kernel)
By **[wming126](https://github.com/wming126)** on **2024-06-19** | Role Description: I am an expert in Linux kernel, with a deep understanding and analytical ability of the latest kernel source code (as of June 2024). I can provide users with detailed and accurate information about the Linux kernel.
`linux` `kernel` | +| [NovelAI Drawing Assistant](https://chat-preview.lobehub.com/market?agent=novel-ai-pormpt-helper)
By **[WallBreakerNO4](https://github.com/WallBreakerNO4)** on **2024-06-18** | I can turn the scenes you describe into prompts for NovelAI
`deep-learning` `image-generation` `algorithm` `prompt` | -> 📊 Total agents: [**247** ](https://github.com/lobehub/lobe-chat-agents) +> 📊 Total agents: [**292** ](https://github.com/lobehub/lobe-chat-agents) @@ -278,9 +282,44 @@ Our marketplace is not just a showcase platform but also a collaborative space. +[![][image-feat-database]][docs-feat-database] + +### `8` [Support Local / Remote Database][docs-feat-database] + +LobeChat supports the use of both server-side and local databases. Depending on your needs, you can choose the appropriate deployment solution: + +- **Local database**: suitable for users who want more control over their data and privacy protection. LobeChat uses CRDT (Conflict-Free Replicated Data Type) technology to achieve multi-device synchronization. This is an experimental feature aimed at providing a seamless data synchronization experience. +- **Server-side database**: suitable for users who want a more convenient user experience. LobeChat supports PostgreSQL as a server-side database. For detailed documentation on how to configure the server-side database, please visit [Configure Server-side Database](https://lobehub.com/docs/self-hosting/advanced/server-database). + +Regardless of which database you choose, LobeChat can provide you with an excellent user experience. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-auth]][docs-feat-auth] + +### `9` [Support Multi-User Management][docs-feat-auth] + +LobeChat supports multi-user management and provides two main user authentication and management solutions to meet different needs: + +- **next-auth**: LobeChat integrates `next-auth`, a flexible and powerful identity verification library that supports multiple authentication methods, including OAuth, email login, credential login, etc. With `next-auth`, you can easily implement user registration, login, session management, social login, and other functions to ensure the security and privacy of user data. + +- **Clerk**: For users who need more advanced user management features, LobeChat also supports `Clerk`, a modern user management platform. `Clerk` provides richer functions, such as multi-factor authentication (MFA), user profile management, login activity monitoring, etc. With `Clerk`, you can get higher security and flexibility, and easily cope with complex user management needs. + +Regardless of which user management solution you choose, LobeChat can provide you with an excellent user experience and powerful functional support. + +
+ +[![][back-to-top]](#readme-top) + +
+ [![][image-feat-pwa]][docs-feat-pwa] -### `8` [Progressive Web App (PWA)][docs-feat-pwa] +### `10` [Progressive Web App (PWA)][docs-feat-pwa] We deeply understand the importance of providing a seamless experience for users in today's multi-device environment. Therefore, we have adopted Progressive Web Application ([PWA](https://support.google.com/chrome/answer/9658361)) technology, @@ -307,7 +346,7 @@ providing smooth animations, responsive layouts, and adapting to different devic [![][image-feat-mobile]][docs-feat-mobile] -### `9` [Mobile Device Adaptation][docs-feat-mobile] +### `11` [Mobile Device Adaptation][docs-feat-mobile] We have carried out a series of optimization designs for mobile devices to enhance the user's mobile experience. Currently, we are iterating on the mobile user experience to achieve smoother and more intuitive interactions. If you have any suggestions or ideas, we welcome you to provide feedback through GitHub Issues or Pull Requests. @@ -319,7 +358,7 @@ We have carried out a series of optimization designs for mobile devices to enhan [![][image-feat-theme]][docs-feat-theme] -### `10` [Custom Themes][docs-feat-theme] +### `12` [Custom Themes][docs-feat-theme] As a design-engineering-oriented application, LobeChat places great emphasis on users' personalized experiences, hence introducing flexible and diverse theme modes, including a light mode for daytime and a dark mode for nighttime. @@ -627,11 +666,12 @@ Every bit counts and your one-time donation sparkles in our galaxy of support! Y Copyright © 2024 [LobeHub][profile-link].
-This project is [MIT](./LICENSE) licensed. +This project is [Apache 2.0](./LICENSE) licensed. [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square +[blog]: https://lobehub.com/blog [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg @@ -658,11 +698,13 @@ This project is [MIT](./LICENSE) licensed. [docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square -[docs]: https://lobehub.com/docs +[docs]: https://lobehub.com/docs/usage/start [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index [docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market +[docs-feat-auth]: https://lobehub.com/docs/usage/features/auth +[docs-feat-database]: https://lobehub.com/docs/usage/features/database [docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm [docs-feat-mobile]: https://lobehub.com/docs/usage/features/mobile [docs-feat-plugin]: https://lobehub.com/docs/usage/features/plugin-system @@ -672,7 +714,7 @@ This project is [MIT](./LICENSE) licensed. [docs-feat-theme]: https://lobehub.com/docs/usage/features/theme [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision -[docs-functionc-call]: https://platform.openai.com/docs/guides/function-calling +[docs-functionc-call]: https://lobehub.com/blog/openai-function-call [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start @@ -692,7 +734,7 @@ This project is [MIT](./LICENSE) licensed. [github-issues-link]: https://github.com/lobehub/lobe-chat/issues [github-issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat?color=ff80eb&labelColor=black&style=flat-square [github-license-link]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE -[github-license-shield]: https://img.shields.io/github/license/lobehub/lobe-chat?color=white&labelColor=black&style=flat-square +[github-license-shield]: https://img.shields.io/badge/license-apache%202.0-white?labelColor=black&style=flat-square [github-project-link]: https://github.com/lobehub/lobe-chat/projects [github-release-link]: https://github.com/lobehub/lobe-chat/releases [github-release-shield]: https://img.shields.io/github/v/release/lobehub/lobe-chat?color=369eff&labelColor=black&logo=github&style=flat-square @@ -704,6 +746,8 @@ This project is [MIT](./LICENSE) licensed. [github-trending-url]: https://trendshift.io/repositories/2256 [image-banner]: https://github.com/lobehub/lobe-chat/assets/28616219/9f155dff-4737-429f-9cad-a70a1a860c5f [image-feat-agent]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png +[image-feat-auth]: https://github.com/lobehub/lobe-chat/assets/17870709/8ce70e15-40df-451e-b700-66090fe5b8c2 +[image-feat-database]: https://github.com/lobehub/lobe-chat/assets/17870709/c27a0234-a4e9-40e5-8bcb-42d5ce7e40f9 [image-feat-local]: https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c [image-feat-mobile]: https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp [image-feat-plugin]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png @@ -713,7 +757,7 @@ This project is [MIT](./LICENSE) licensed. [image-feat-theme]: https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp [image-feat-tts]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072124-c9853d8d-f1b5-44a8-a305-45ebc0f6d19a.png [image-feat-vision]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png -[image-overview]: https://github.com/lobehub/lobe-chat/assets/28616219/8b04c3c9-3d71-4fb4-bd9b-a4f415c5876d +[image-overview]: https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf [image-star]: https://github.com/lobehub/lobe-chat/assets/17870709/cb06b748-513f-47c2-8740-d876858d7855 [issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat [lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins @@ -733,6 +777,7 @@ This project is [MIT](./LICENSE) licensed. [lobe-ui-github]: https://github.com/lobehub/lobe-ui [lobe-ui-link]: https://www.npmjs.com/package/@lobehub/ui [lobe-ui-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[official-site]: https://lobehub.com [pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls [pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge [profile-link]: https://github.com/lobehub @@ -757,5 +802,5 @@ This project is [MIT](./LICENSE) licensed. [submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins [submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-95f3d9?labelColor=black&style=for-the-badge [vercel-link]: https://chat-preview.lobehub.com -[vercel-shield]: https://img.shields.io/website?down_message=offline&label=vercel&labelColor=black&logo=vercel&style=flat-square&up_message=online&url=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fchat-preview.lobehub.com -[vercel-shield-badge]: https://img.shields.io/website?down_message=offline&label=try%20lobechat&labelColor=black&logo=vercel&style=for-the-badge&up_message=online&url=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fchat-preview.lobehub.com +[vercel-shield]: https://img.shields.io/badge/vercel-online-55b467?labelColor=black&logo=vercel&style=flat-square +[vercel-shield-badge]: https://img.shields.io/badge/TRY%20LOBECHAT-ONLINE-55b467?labelColor=black&logo=vercel&style=for-the-badge diff --git a/README.zh-CN.md b/README.zh-CN.md index c06efe148e2e..d536eaa13ae2 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -8,7 +8,7 @@ 支持语音合成、多模态、可扩展的([function call][docs-functionc-call])插件系统
一键**免费**拥有你自己的 ChatGPT/Gemini/Claude/Ollama 应用 -[English](./README.md) · **简体中文** · [更新日志](./CHANGELOG.md) · [文档][github-document-link] · [报告问题][github-issues-link] · [请求功能][github-issues-link] +[English](./README.md) · **简体中文** · [官网][official-site] · [更新日志](./CHANGELOG.md) · [文档][docs] · [博客][blog] · [反馈问题][github-issues-link] @@ -58,9 +58,11 @@ - [`5` Text to Image 文生图](#5-text-to-image-文生图) - [`6` 插件系统 (Function Calling)](#6-插件系统-function-calling) - [`7` 助手市场 (GPTs)](#7-助手市场-gpts) - - [`8` 渐进式 Web 应用 (PWA)](#8-渐进式-web-应用-pwa) - - [`9` 移动设备适配](#9-移动设备适配) - - [`10` 自定义主题](#10-自定义主题) + - [`8` 支持本地 / 远程数据库](#8-支持本地--远程数据库) + - [`9` 支持多用户管理](#9-支持多用户管理) + - [`10` 渐进式 Web 应用 (PWA)](#10-渐进式-web-应用-pwa) + - [`11` 移动设备适配](#11-移动设备适配) + - [`12` 自定义主题](#12-自定义主题) - [更多特性](#更多特性) - [⚡️ 性能测试](#️-性能测试) - [🛳 开箱即用](#-开箱即用) @@ -129,6 +131,8 @@ - **Groq**:接入了 Groq 的 AI 模型,高效处理消息序列,生成回应,胜任多轮对话及单次交互任务。[了解更多](https://groq.com/) - **OpenRouter**:其支持包括 **Claude 3**,**Gemma**,**Mistral**,**Llama2**和**Cohere**等模型路由,支持智能路由优化,提升使用效率,开放且灵活。[了解更多](https://openrouter.ai/) - **Minimax**: 接入了 Minimax 的 AI 模型,包括 MoE 模型 **abab6**,提供了更多的选择空间。[了解更多](https://www.minimaxi.com/) +- **DeepSeek**: 接入了 DeepSeek 的 AI 模型,包括最新的 **DeepSeek-V2**,提供兼顾性能与价格的模型。[了解更多](https://www.deepseek.com/) +- **Qwen**: 接入了 Qwen 的 AI 模型,包括最新的 **qwen-turbo**,**qwen-plus** 和 **qwen-max** 等模型。[了解更多](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction) 同时,我们也在计划支持更多的模型服务商,如 Replicate 和 Perplexity 等,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的[社区讨论](https://github.com/lobehub/lobe-chat/discussions/1284)。 @@ -214,14 +218,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 -| 最近新增 | 插件描述 | -| ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- | -| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | 搜索聚合服务,专为 LLMs 设计
`web` `search` | -| [社交搜索](https://chat-preview.lobehub.com/settings/agent)
By **say-apps** on **2024-05-02** | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。
`社交` `推特` `x` `搜索` | -| [通过 Serper 搜索 Google](https://chat-preview.lobehub.com/settings/agent)
By **Barry** on **2024-04-30** | 通过 Serper.dev 免费 API 进行 Google 搜索引擎(每月 2500 次🆓)
`网络` `搜索` | -| [NFT Guru](https://chat-preview.lobehub.com/settings/agent)
By **swap** on **2024-04-03** | 发现主要平台上 NFT 的当前价格,并通过实时跟踪快速变化的市场了解情况
`加密货币` `nft` | +| 最近新增 | 插件描述 | +| ------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------- | +| [社交搜索](https://chat-preview.lobehub.com/settings/agent)
By **say-apps** on **2024-06-02** | 社交搜索提供访问推文、用户、关注者、图片、媒体等功能。
`社交` `推特` `x` `搜索` | +| [空间](https://chat-preview.lobehub.com/settings/agent)
By **automateyournetwork** on **2024-05-12** | 包括 NASA 的空间数据。
`空间` `nasa` | +| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | 搜索聚合服务,专为 LLMs 设计
`web` `search` | +| [通过 Serper 搜索 Google](https://chat-preview.lobehub.com/settings/agent)
By **Barry** on **2024-04-30** | 通过 Serper.dev 免费 API 进行 Google 搜索引擎(每月 2500 次🆓)
`网络` `搜索` | -> 📊 Total plugins: [**57**](https://github.com/lobehub/lobe-chat-plugins) +> 📊 Total plugins: [**52**](https://github.com/lobehub/lobe-chat-plugins) @@ -249,14 +253,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 -| 最近新增 | 助手说明 | -| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [视频转博客文章助手](https://chat-preview.lobehub.com/market?agent=video-2-blog-assistant)
By **[yayoinoyume](https://github.com/yayoinoyume)** on **2024-05-06** | 帮你快速整理缭乱的字幕,变成精美的博客文章
`字幕整理` `博文格式` `视频变博客` | -| [美术评价导师](https://chat-preview.lobehub.com/market?agent=wanwusheng-art)
By **[dingyufei615](https://github.com/dingyufei615)** on **2024-05-06** | 擅长少儿美术教学,细致评价作品,关注细节,适应不同年龄段学生。
`美术教育` `评价` `创意` `教学` `绘画` | -| [iOS 代码艺术家](https://chat-preview.lobehub.com/market?agent=ios-develop)
By **[Alcu1n](https://github.com/Alcu1n)** on **2024-05-03** | iOS 开发专家,15 年经验,精通 Swift、SwiftUI、Flutter。逻辑清晰的代码,精准 debug,提供 0 到 1 的项目框架。
`i-os开发` `编码` `调试` `项目规划` `逻辑思维` | -| [销售描述专家](https://chat-preview.lobehub.com/market?agent=verkauf-kleinanzeigen)
By **[highseen](https://github.com/highseen)** on **2024-04-30** | 通过研究、定价、描述和标题设计帮助销售二手物品。
`产品销售` `研究` `描述` | +| 最近新增 | 助手说明 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Fastapi 项目开发助手](https://chat-preview.lobehub.com/market?agent=fastapi-development)
By **[xwxw098](https://github.com/xwxw098)** on **2024-06-19** | 擅长 Python 模块化开发,熟练运用 FastAPI、PostgreSQL、Tortoise-ORM 等技术栈,能为大型项目提供清晰的代码结构并添加详细注释。
`fast-api` `python` `模块化开发` | +| [IT 系统架构师](https://chat-preview.lobehub.com/market?agent=it-system-architect)
By **[a562314](https://github.com/a562314)** on **2024-06-19** | 资深 IT 架构师,擅长需求分析、系统设计、技术选型和跨平台系统优化。5 年以上经验,精通 Windows、macOS 和 Linux 三大操作系统,具备故障排除和安全防护能力
`it架构设计` `问题解决` `敏捷开发` `系统优化` `跨平台技能` | +| [Linux 内核专家](https://chat-preview.lobehub.com/market?agent=linux-kernel)
By **[wming126](https://github.com/wming126)** on **2024-06-19** | 角色描述: 我是一位精通 Linux 内核的专家,对最新内核源代码(截至 2024 年 6 月)有着深入的理解和分析能力。我可以为用户提供关于 Linux 内核的详细、准确的信息。
`linux` `kernel` | +| [NovelAI 绘画助手](https://chat-preview.lobehub.com/market?agent=novel-ai-pormpt-helper)
By **[WallBreakerNO4](https://github.com/WallBreakerNO4)** on **2024-06-18** | 我能将你描述的场景转成 NovelAI 的 prompt
`深度学习` `图像生成` `算法` `提示符` | -> 📊 Total agents: [**247** ](https://github.com/lobehub/lobe-chat-agents) +> 📊 Total agents: [**292** ](https://github.com/lobehub/lobe-chat-agents) @@ -266,9 +270,44 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 +[![][image-feat-database]][docs-feat-database] + +### `8` [支持本地 / 远程数据库][docs-feat-database] + +LobeChat 支持同时使用服务端数据库和本地数据库。根据您的需求,您可以选择合适的部署方案: + +- 本地数据库:适合希望对数据有更多掌控感和隐私保护的用户。LobeChat 采用了 CRDT (Conflict-Free Replicated Data Type) 技术,实现了多端同步功能。这是一项实验性功能,旨在提供无缝的数据同步体验。 +- 服务端数据库:适合希望更便捷使用体验的用户。LobeChat 支持 PostgreSQL 作为服务端数据库。关于如何配置服务端数据库的详细文档,请前往 [配置服务端数据库](https://lobehub.com/zh/docs/self-hosting/advanced/server-database)。 + +无论您选择哪种数据库,LobeChat 都能为您提供卓越的用户体验。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-auth]][docs-feat-auth] + +### `9` [支持多用户管理][docs-feat-auth] + +LobeChat 支持多用户管理,提供了两种主要的用户认证和管理方案,以满足不同需求: + +- **next-auth**:LobeChat 集成了 `next-auth`,一个灵活且强大的身份验证库,支持多种身份验证方式,包括 OAuth、邮件登录、凭证登录等。通过 `next-auth`,您可以轻松实现用户的注册、登录、会话管理以及社交登录等功能,确保用户数据的安全性和隐私性。 + +- **Clerk**:对于需要更高级用户管理功能的用户,LobeChat 还支持 `Clerk`,一个现代化的用户管理平台。`Clerk` 提供了更丰富的功能,如多因素认证 (MFA)、白名单、用户管理、登录活动监控等。通过 `Clerk`,您可以获得更高的安全性和灵活性,轻松应对生产级的用户管理需求。 + +您可以根据自己的需求,选择合适的用户管理方案。 + +
+ +[![][back-to-top]](#readme-top) + +
+ [![][image-feat-pwa]][docs-feat-pwa] -### `8` [渐进式 Web 应用 (PWA)][docs-feat-pwa] +### `10` [渐进式 Web 应用 (PWA)][docs-feat-pwa] 我们深知在当今多设备环境下为用户提供无缝体验的重要性。为此,我们采用了渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术, 这是一种能够将网页应用提升至接近原生应用体验的现代 Web 技术。通过 PWA,LobeChat 能够在桌面和移动设备上提供高度优化的用户体验,同时保持轻量级和高性能的特点。 @@ -291,7 +330,7 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 [![][image-feat-mobile]][docs-feat-mobile] -### `9` [移动设备适配][docs-feat-mobile] +### `11` [移动设备适配][docs-feat-mobile] 针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。 @@ -303,7 +342,7 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 [![][image-feat-theme]][docs-feat-theme] -### `10` [自定义主题][docs-feat-theme] +### `12` [自定义主题][docs-feat-theme] 作为设计工程师出身,LobeChat 在界面设计上充分考虑用户的个性化体验,因此引入了灵活多变的主题模式,其中包括日间的亮色模式和夜间的深色模式。 除了主题模式的切换,还提供了一系列的颜色定制选项,允许用户根据自己的喜好来调整应用的主题色彩。无论是想要沉稳的深蓝,还是希望活泼的桃粉,或者是专业的灰白,用户都能够在 LobeChat 中找到匹配自己风格的颜色选择。 @@ -648,11 +687,12 @@ $ pnpm run dev Copyright © 2023 [LobeHub][profile-link].
-This project is [MIT](./LICENSE) licensed. +This project is [Apache 2.0](./LICENSE) licensed. [back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square +[blog]: https://lobehub.com/zh/blog [chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg [chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html [chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg @@ -679,10 +719,13 @@ This project is [MIT](./LICENSE) licensed. [docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square [docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat [docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square +[docs]: https://lobehub.com/zh/docs/usage/start [docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index [docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker [docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables [docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market +[docs-feat-auth]: https://lobehub.com/docs/usage/features/auth +[docs-feat-database]: https://lobehub.com/docs/usage/features/database [docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm [docs-feat-mobile]: https://lobehub.com/docs/usage/features/mobile [docs-feat-plugin]: https://lobehub.com/docs/usage/features/plugin-system @@ -692,7 +735,7 @@ This project is [MIT](./LICENSE) licensed. [docs-feat-theme]: https://lobehub.com/docs/usage/features/theme [docs-feat-tts]: https://lobehub.com/docs/usage/features/tts [docs-feat-vision]: https://lobehub.com/docs/usage/features/vision -[docs-functionc-call]: https://platform.openai.com/docs/guides/function-calling +[docs-functionc-call]: https://lobehub.com/zh/blog/openai-function-call [docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN [docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development [docs-self-hosting]: https://lobehub.com/docs/self-hosting/start @@ -707,13 +750,12 @@ This project is [MIT](./LICENSE) licensed. [github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square [github-contributors-link]: https://github.com/lobehub/lobe-chat/graphs/contributors [github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat?color=c4f042&labelColor=black&style=flat-square -[github-document-link]: https://lobehub.com/docs [github-forks-link]: https://github.com/lobehub/lobe-chat/network/members [github-forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat?color=8ae8ff&labelColor=black&style=flat-square [github-issues-link]: https://github.com/lobehub/lobe-chat/issues [github-issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat?color=ff80eb&labelColor=black&style=flat-square [github-license-link]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE -[github-license-shield]: https://img.shields.io/github/license/lobehub/lobe-chat?color=white&labelColor=black&style=flat-square +[github-license-shield]: https://img.shields.io/badge/license-apache%202.0-white?labelColor=black&style=flat-square [github-project-link]: https://github.com/lobehub/lobe-chat/projects [github-release-link]: https://github.com/lobehub/lobe-chat/releases [github-release-shield]: https://img.shields.io/github/v/release/lobehub/lobe-chat?color=369eff&labelColor=black&logo=github&style=flat-square @@ -725,6 +767,8 @@ This project is [MIT](./LICENSE) licensed. [github-trending-url]: https://trendshift.io/repositories/2256 [image-banner]: https://github.com/lobehub/lobe-chat/assets/28616219/9f155dff-4737-429f-9cad-a70a1a860c5f [image-feat-agent]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png +[image-feat-auth]: https://github.com/lobehub/lobe-chat/assets/17870709/8ce70e15-40df-451e-b700-66090fe5b8c2 +[image-feat-database]: https://github.com/lobehub/lobe-chat/assets/17870709/c27a0234-a4e9-40e5-8bcb-42d5ce7e40f9 [image-feat-local]: https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c [image-feat-mobile]: https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp [image-feat-plugin]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png @@ -734,7 +778,7 @@ This project is [MIT](./LICENSE) licensed. [image-feat-theme]: https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp [image-feat-tts]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072124-c9853d8d-f1b5-44a8-a305-45ebc0f6d19a.png [image-feat-vision]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png -[image-overview]: https://github.com/lobehub/lobe-chat/assets/28616219/8b04c3c9-3d71-4fb4-bd9b-a4f415c5876d +[image-overview]: https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf [image-star]: https://github.com/lobehub/lobe-chat/assets/17870709/cb06b748-513f-47c2-8740-d876858d7855 [issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat [lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins @@ -754,6 +798,7 @@ This project is [MIT](./LICENSE) licensed. [lobe-ui-github]: https://github.com/lobehub/lobe-ui [lobe-ui-link]: https://www.npmjs.com/package/@lobehub/ui [lobe-ui-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[official-site]: https://lobehub.com [pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls [pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge [profile-link]: https://github.com/lobehub @@ -776,5 +821,5 @@ This project is [MIT](./LICENSE) licensed. [submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins [submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-95f3d9?labelColor=black&style=for-the-badge [vercel-link]: https://chat-preview.lobehub.com -[vercel-shield]: https://img.shields.io/website?down_message=offline&label=vercel&labelColor=black&logo=vercel&style=flat-square&up_message=online&url=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fchat-preview.lobehub.com -[vercel-shield-badge]: https://img.shields.io/website?down_message=offline&label=try%20lobechat&labelColor=black&logo=vercel&style=for-the-badge&up_message=online&url=https%3A%2F%2Fsummer-heart-0930.chufeiyun1688.workers.dev%3A443%2Fhttps%2Fchat-preview.lobehub.com +[vercel-shield]: https://img.shields.io/badge/vercel-online-55b467?labelColor=black&logo=vercel&style=flat-square +[vercel-shield-badge]: https://img.shields.io/badge/TRY%20LOBECHAT-ONLINE-55b467?labelColor=black&logo=vercel&style=for-the-badge diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 000000000000..5fb59f6206cb --- /dev/null +++ b/codecov.yml @@ -0,0 +1,11 @@ +coverage: + status: + project: + default: off + server: + flags: + - server + app: + flags: + - app + patch: off diff --git a/contributing/Basic/Feature-Development.md b/contributing/Basic/Feature-Development.md index f04c0897a999..a56bc8861ed4 100644 --- a/contributing/Basic/Feature-Development.md +++ b/contributing/Basic/Feature-Development.md @@ -4,14 +4,14 @@ This document aims to guide developers on how to develop a complete feature requ We will use the implementation of sessionGroup as an example: [✨ feat: add session group manager](https://github.com/lobehub/lobe-chat/pull/1055), and explain the complete implementation process through the following six main sections: -1. Data Model / Database Definition -2. Service Implementation / Model Implementation -3. Frontend Data Flow Store Implementation -4. UI Implementation and Action Binding -5. Data Migration -6. Data Import and Export +1. [Data Model / Database Definition](#1-data-model--database-definition) +2. [Service Implementation / Model Implementation](#2-service-implementation--model-implementation) +3. [Frontend Data Flow Store Implementation](#3-frontend-data-flow-store-implementation) +4. [UI Implementation and Action Binding](#4-ui-implementation-and-action-binding) +5. [Data Migration](#5-data-migration) +6. [Data Import and Export](#6-data-import-and-export) -## 1. Database Section +## 1. Data Model / Database Definition To implement the Session Group feature, it is necessary to define the relevant data model and indexes at the database level. @@ -119,7 +119,7 @@ As a result, you can now view the `sessionGroups` table in the `LOBE_CHAT_DB` in ![](https://github.com/lobehub/lobe-chat/assets/28616219/aea50f66-4060-4a32-88c8-b3c672d05be8) -## 2. Model and Service Section +## 2. Service Implementation / Model Implementation ### Define Model @@ -176,7 +176,7 @@ class SessionService { } ``` -## 3. Store Action Section +## 3. Frontend Data Flow Store Implementation In the LobeChat application, the Store module is used to manage the frontend state of the application. The Actions within it are functions that trigger state updates, usually by calling methods in the service layer to perform actual data processing operations and then updating the state in the Store. We use `zustand` as the underlying dependency for the Store module. For a detailed practical introduction to state management, you can refer to [📘 Best Practices for State Management](../State-Management/State-Management-Intro.zh-CN.md). @@ -351,7 +351,7 @@ Since all data retrieval in the UI is implemented using syntax like `useSessionS > > If you are not familiar with the concept and functionality of selectors, you can refer to the section [📘 Data Storage and Retrieval Module](./State-Management-Selectors.en-US) for relevant information. -## IV. UI Section +## 4. UI Implementation and Action Binding Bind Store Action in the UI component to implement interactive logic, for example `CreateGroupModal`: @@ -570,7 +570,7 @@ export class LocalDB extends Dexie { This is our data migration strategy. When performing the migration, it is essential to ensure the correctness of the migration script and validate the migration results through thorough testing. -## VI. Data Import and Export +## 6. Data Import and Export In LobeChat, the data import and export feature is designed to ensure that users can migrate their data between different devices. This includes session, topic, message, and settings data. In the implementation of the Session Group feature, we also need to handle data import and export to ensure that the complete exported data can be restored exactly the same on other devices. diff --git a/contributing/Basic/Feature-Development.zh-CN.md b/contributing/Basic/Feature-Development.zh-CN.md index 9f0a92b7cf6d..643eda51ebd7 100644 --- a/contributing/Basic/Feature-Development.zh-CN.md +++ b/contributing/Basic/Feature-Development.zh-CN.md @@ -4,14 +4,14 @@ 我们将以 sessionGroup 的实现为示例:[✨ feat: add session group manager](https://github.com/lobehub/lobe-chat/pull/1055) , 通过以下六个主要部分来阐述完整的实现流程: -1. 数据模型 / 数据库定义 -2. Service 实现 / Model 实现 -3. 前端数据流 Store 实现 -4. UI 实现与 action 绑定 -5. 数据迁移 -6. 数据导入导出 +1. [数据模型 / 数据库定义](#一数据模型--数据库定义) +2. [Service 实现 / Model 实现](#二service-实现--model-实现) +3. [前端数据流 Store 实现](#三前端数据流-store-实现) +4. [UI 实现与 action 绑定](#四ui-实现与-action-绑定) +5. [数据迁移](#五数据迁移) +6. [数据导入导出](#六数据导入导出) -## 一、数据库部分 +## 一、数据模型 / 数据库定义 为了实现 Session Group 功能,首先需要在数据库层面定义相关的数据模型和索引。 @@ -119,7 +119,7 @@ export class LocalDB extends Dexie { ![](https://github.com/lobehub/lobe-chat/assets/28616219/aea50f66-4060-4a32-88c8-b3c672d05be8) -## 二、Model 与 Service 部分 +## 二、Service 实现 / Model 实现 ### 定义 Model @@ -176,7 +176,7 @@ class SessionService { } ``` -## 三、Store Action 部分 +## 三、前端数据流 Store 实现 在 LobeChat 应用中,Store 是用于管理应用前端状态的模块。其中的 Action 是触发状态更新的函数,通常会调用服务层的方法来执行实际的数据处理操作,然后更新 Store 中的状态。我们采用了 `zustand` 作为 Store 模块的底层依赖,对于状态管理的详细实践介绍,可以查阅 [📘 状态管理最佳实践](../State-Management/State-Management-Intro.zh-CN.md) @@ -351,7 +351,7 @@ const customSessionGroups = (s: SessionStore): CustomSessionGroup[] => s.customS > > 如果你对 Selectors 的概念和功能不太了解,可以查阅 [📘 数据存储取数模块](../State-Management/State-Management-Selectors.zh-CN.md) 部分了解相关内容。 -## 四、UI 部分 +## 四、UI 实现与 action 绑定 在 UI 组件中绑定 Store Action 实现交互逻辑,例如 `CreateGroupModal`: diff --git a/contributing/Basic/Intro.md b/contributing/Basic/Intro.md index 086a80ad9968..7ac6ea9e6e03 100644 --- a/contributing/Basic/Intro.md +++ b/contributing/Basic/Intro.md @@ -1,22 +1,26 @@ # Technical Development Getting Started Guide -Welcome to the LobeChat technical development getting started guide. LobeChat is an AI conversation application built on the Next.js framework, which integrates a series of technology stacks to achieve diverse functions and features. This guide will provide a detailed introduction to the main technical components of LobeChat and how to configure and use these technologies in your development environment. +Welcome to the LobeChat Technical Development Getting Started Guide. LobeChat is an AI conversation application built on the Next.js framework, incorporating a range of technology stacks to achieve diverse functionalities and features. This guide will detail the main technical components of LobeChat and how to configure and use these technologies in your development environment. #### TOC - [Basic Technology Stack](#basic-technology-stack) - [Folder Directory Structure](#folder-directory-structure) +- [Local Development Environment Setup](#local-development-environment-setup) +- [Code Style and Contribution Guide](#code-style-and-contribution-guide) +- [Internationalization Implementation Guide](#internationalization-implementation-guide) +- [Appendix: Resources and References](#appendix-resources-and-references) ## Basic Technology Stack -The core technology stack of LobeChat includes: +The core technology stack of LobeChat is as follows: -- **Framework**: We have chosen [Next.js](https://nextjs.org/), a powerful React framework that provides key features such as server-side rendering, routing framework, and Router Handler for our project. -- **Component Library**: We use [Ant Design (antd)](https://ant.design/) as the basic component library, and also introduce [lobe-ui](https://github.com/lobehub/lobe-ui) as our business component library. -- **State Management**: We have opted for [zustand](https://github.com/pmndrs/zustand), a lightweight and easy-to-use state management library. +- **Framework**: We chose [Next.js](https://nextjs.org/), a powerful React framework that provides key features such as server-side rendering, routing framework, and Router Handler. +- **Component Library**: We use [Ant Design (antd)](https://ant.design/) as the basic component library, along with [lobe-ui](https://github.com/lobehub/lobe-ui) as our business component library. +- **State Management**: We selected [zustand](https://github.com/pmndrs/zustand), a lightweight and easy-to-use state management library. - **Network Requests**: We use [swr](https://swr.vercel.app/), a React Hooks library for data fetching. -- **Routing**: For routing management, we directly use the solution provided by [Next.js](https://nextjs.org/) itself. -- **Internationalization**: We use [i18next](https://www.i18next.com/) to implement multi-language support for the application. +- **Routing**: For routing management, we directly use the solution provided by [Next.js](https://nextjs.org/). +- **Internationalization**: We use [i18next](https://www.i18next.com/) to support multiple languages in the application. - **Styling**: We use [antd-style](https://github.com/ant-design/antd-style), a CSS-in-JS library that complements Ant Design. - **Unit Testing**: We use [vitest](https://github.com/vitest-dev/vitest) for unit testing. @@ -26,18 +30,82 @@ The folder directory structure of LobeChat is as follows: ```bash src -├── app # Main logic of the application and code related to state management +├── app # Code related to the main logic and state management of the application ├── components # Reusable UI components -├── config # Application configuration files, including client-side environment variables and server-side environment variables +├── config # Application configuration files, including client and server environment variables ├── const # Used to define constants, such as action types, route names, etc. -├── features # Function modules related to business features, such as Agent settings, plugin development pop-ups, etc. -├── hooks # Custom utility hooks reused throughout the application +├── features # Business-related feature modules, such as Agent settings, plugin development pop-ups, etc. +├── hooks # Custom utility Hooks reusable across the application ├── layout # Application layout components, such as navigation bars, sidebars, etc. ├── locales # Language files for internationalization ├── services # Encapsulated backend service interfaces, such as HTTP requests ├── store # Zustand store for state management ├── types # TypeScript type definition files -└── utils # Common utility functions +└── utils # General utility functions ``` -For a detailed introduction to the directory structure, please refer to: [Folder Directory Structure](Folder-Structure.en-US.md) +For a detailed introduction to the directory structure, see: [Folder Directory Structure](Folder-Structure.zh-CN.md) + +## Local Development Environment Setup + +This section outlines setting up the development environment and local development. Before starting, please ensure that Node.js, Git, and your chosen package manager (Bun or PNPM) are installed in your local environment. + +We recommend using WebStorm as your integrated development environment (IDE). + +1. **Get the code**: Clone the LobeChat code repository locally: + +```bash +git clone https://github.com/lobehub/lobe-chat.git +``` + +2. **Install dependencies**: Enter the project directory and install the required dependencies: + +```bash +cd lobe-chat +# If you use Bun +bun install +# If you use PNPM +pnpm install +``` + +3. **Run and debug**: Start the local development server and begin your development journey: + +```bash +# Start the development server with Bun +bun run dev +# Visit http://localhost:3010 to view the application +``` + +> \[!IMPORTANT]\ +> If you encounter the error "Could not find 'stylelint-config-recommended'" when installing dependencies with `npm`, please reinstall the dependencies using `pnpm` or `bun`. + +Now, you should be able to see the welcome page of LobeChat in your browser. For a detailed environment setup guide, please refer to [Development Environment Setup Guide](Setup-Development.zh-CN.md). + +## Code Style and Contribution Guide + +In the LobeChat project, we place great emphasis on the quality and consistency of the code. For this reason, we have established a series of code style standards and contribution processes to ensure that every developer can smoothly participate in the project. Here are the code style and contribution guidelines you need to follow as a developer. + +- **Code Style**: We use `@lobehub/lint` to unify the code style, including ESLint, Prettier, remarklint, and stylelint configurations. Please adhere to our code standards to maintain code consistency and readability. +- **Contribution Process**: We use gitmoji and semantic release for code submission and release processes. Please use gitmoji to annotate your commit messages and ensure compliance with the semantic release standards so that our automation systems can correctly handle version control and releases. + +All contributions will undergo code review. Maintainers may suggest modifications or requirements. Please respond actively to review comments and make timely adjustments. We look forward to your participation and contribution. + +For detailed code style and contribution guidelines, please refer to [Code Style and Contribution Guide](Contributing-Guidelines.zh-CN.md). + +## Internationalization Implementation Guide + +LobeChat uses `i18next` and `lobe-i18n` to implement multilingual support, ensuring a global user experience. + +Internationalization files are located in `src/locales`, containing the default language (Chinese). We generate other language JSON files automatically through `lobe-i18n`. + +If you want to add a new language, follow specific steps detailed in [New Language Addition Guide](../Internationalization/Add-New-Locale.zh-CN.md). We encourage you to participate in our internationalization efforts to provide better services to global users. + +For a detailed guide on internationalization implementation, please refer to [Internationalization Implementation Guide](../Internationalization/Internationalization-Implementation.zh-CN.md). + +## Appendix: Resources and References + +To support developers in better understanding and using the technology stack of LobeChat, we provide a comprehensive list of resources and references — [LobeChat Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN) - Visit our maintained list of resources, including tutorials, articles, and other useful links. + +We encourage developers to utilize these resources to deepen their learning and enhance their skills, join community discussions through [LobeChat GitHub Discussions](https://github.com/lobehub/lobe-chat/discussions) or [Discord](https://discord.com/invite/AYFPHvv2jT), ask questions, or share your experiences. + +If you have any questions or need further assistance, please do not hesitate to contact us through the above channels. diff --git a/contributing/Basic/Intro.zh-CN.md b/contributing/Basic/Intro.zh-CN.md index 61316ef89e78..5030401e305c 100644 --- a/contributing/Basic/Intro.zh-CN.md +++ b/contributing/Basic/Intro.zh-CN.md @@ -76,6 +76,9 @@ bun run dev # 访问 http://localhost:3010 查看应用 ``` +> \[!IMPORTANT]\ +> 如果使用`npm`安装依赖出现`Could not find "stylelint-config-recommended"`错误,请使用 `pnpm` 或者 `bun` 重新安装依赖。 + 现在,你应该可以在浏览器中看到 LobeChat 的欢迎页面。详细的环境配置指南,请参考 [开发环境设置指南](Setup-Development.zh-CN.md)。 ## 代码风格与贡献指南 diff --git a/docs/self-hosting/advanced/authentication.mdx b/docs/self-hosting/advanced/authentication.mdx index 02570c1ffcf5..c8517740365f 100644 --- a/docs/self-hosting/advanced/authentication.mdx +++ b/docs/self-hosting/advanced/authentication.mdx @@ -25,6 +25,15 @@ By setting the environment variables NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY and CLERK ## Next Auth +Before using NextAuth, please set the following variables in LobeChat's environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can use the following command: `openssl rand -base64 32`, or visit `https://generate-secret.vercel.app/32` to generate the key. | +| `ACCESS_CODE` | Required | Add a password to access this service. You can set a sufficiently long random password to "disable" access code authorization. | +| `NEXTAUTH_URL` | Optional | This URL specifies the callback address for Auth.js when performing OAuth verification. Set this only if the default generated redirect address is incorrect. `https://example.com/api/auth` | +| `NEXT_AUTH_SSO_PROVIDERS` | Optional | This environment variable is used to enable multiple identity verification sources simultaneously, separated by commas, for example, `auth0,azure-ad,authentik`. | + Currently supported identity verification services include: diff --git a/docs/self-hosting/advanced/authentication.zh-CN.mdx b/docs/self-hosting/advanced/authentication.zh-CN.mdx index 3bbd5cb91f11..df69d357f6d4 100644 --- a/docs/self-hosting/advanced/authentication.zh-CN.mdx +++ b/docs/self-hosting/advanced/authentication.zh-CN.mdx @@ -22,6 +22,15 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全 ## Next Auth +在使用 NextAuth 之前,请先在 LobeChat 的环境变量中设置以下变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 | +| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个足够长的随机密码以 “禁用” 访问码授权 | +| `NEXTAUTH_URL` | 可选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | +| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,azure-ad,authentik`。 | + 目前支持的身份验证服务有: diff --git a/docs/self-hosting/advanced/feature-flags.mdx b/docs/self-hosting/advanced/feature-flags.mdx new file mode 100644 index 000000000000..38391fb55e26 --- /dev/null +++ b/docs/self-hosting/advanced/feature-flags.mdx @@ -0,0 +1,47 @@ +--- +title: LobeChat Feature Flags Environment Variables Configuration Guide +description: >- + Learn how to use environment variables to customize LobeChat's feature flags, + including controlling whether a feature is enabled or disabled, or enabling or + disabling features for specific user groups or environments as needed. +tags: + - LobeChat + - Environment Variables + - Configuration Guide + - Feature Flags +--- + +# Feature Flags + +In addition to basic environment variable configuration, LobeChat also offers feature flags to control whether a feature is enabled globally, or to enable or disable features for specific user groups or environments as needed. + +## Feature Flags Environment Variable `FEATURE_FLAGS` + +- Type: Optional +- Description: Used to control LobeChat's feature functionalities. Supports multiple feature flags, using `+` to add a feature and `-` to disable a feature. Separate multiple feature flags with a comma `,` and enclose the entire value in quotes `"` to avoid parsing errors. +- Default: `-` +- Example: `"-welcome_suggest"` + +All features are controlled by the `FEATURE_FLAGS` variable as the sole configuration variable. + +You can achieve various feature combinations using the above configuration syntax. All feature flags are Boolean values, enabled with `+` and disabled with `-`. + + + Attention: Unlike the `OPENAI_MODEL_LIST` variable, the `FEATURE_FLAGS` variable does not support + the `all` keyword. You need to manually control all feature flags (otherwise, they will adopt + their default values). + + +| Configuration Item | Description | Default Value | +| ------------------------- | ----------------------------------------------- | ------------- | +| `webrtc_sync` | Enables WebRTC sync functionality. | Disabled | +| `language_model_settings` | Enables language model settings. | Enabled | +| `openai_api_key` | Allows users to customize the OpenAI API Key. | Enabled | +| `openai_proxy_url` | Allows users to customize the OpenAI proxy URL. | Enabled | +| `create_session` | Allows users to create sessions. | Enabled | +| `edit_agent` | Allows users to edit assistants. | Enabled | +| `dalle` | Enables the DALL-E functionality. | Enabled | +| `check_updates` | Allows checking for updates. | Enabled | +| `welcome_suggest` | Displays welcome suggestions. | Enabled | + +You can always check the [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) to get the latest list of feature flags. diff --git a/docs/self-hosting/advanced/feature-flags.zh-CN.mdx b/docs/self-hosting/advanced/feature-flags.zh-CN.mdx new file mode 100644 index 000000000000..149654a92452 --- /dev/null +++ b/docs/self-hosting/advanced/feature-flags.zh-CN.mdx @@ -0,0 +1,43 @@ +--- +title: LobeChat 特性标志环境变量配置指南 +description: 了解如何使用环境变量自定义 LobeChat 的特性标志,包括控制否启用某个功能、或者根据需要对特定用户群体或环境启用或禁用功能。 +tags: + - LobeChat + - 环境变量 + - 配置指南 + - 特征标志 +--- + +# 特性标志 + +除了基础的环境变量配置外,LobeChat 还提供了一些特性标志(Feature Flags),用于控制是否全局启用某个功能,或者根据需要对特定用户群体或环境启用或禁用功能。 + +## 特性标志环境变量 `FEATURE_FLAGS` + +- 类型:可选 +- 描述:用于控制 LobeChat 的特性功能,支持多个功能标志,使用 `+` 增加一个功能,使用 `-` 来关闭一个功能,多个功能标志之间使用英文逗号 `,` 隔开,最外层建议添加引号 `"` 以避免解析错误。 +- 默认值:`-` +- 示例:`"-welcome_suggest"` + +所有的功能统一以特性标志 `FEATURE_FLAGS` 作为唯一的配置变量。 + +你可以通过上述配置语法来实现更多的功能组合。所有的功能配置项都是布尔类型,通过 `+` 来启用,通过 `-` 来关闭。 + + + 注意:与 `OPENAI_MODEL_LIST` 变量不同,`FEATURE_FLAGS` 变量不支持 `all` + 关键字,你需要手动控制所有的功能标志(否则它们会采用对应的默认值)。 + + +| 配置项 | 解释 | 默认值 | +| ------------------------- | -------------------------------- | ------ | +| `webrtc_sync` | 启用 WebRTC 同步功能。 | 关闭 | +| `language_model_settings` | 启用语言模型设置。 | 开启 | +| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 | +| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 | +| `create_session` | 允许用户创建会话。 | 开启 | +| `edit_agent` | 允许用户编辑助手。 | 开启 | +| `dalle` | 启用 DALL-E 功能。 | 开启 | +| `check_updates` | 允许检查更新。 | 开启 | +| `welcome_suggest` | 显示欢迎建议。 | 开启 | + +你可以随时检查 [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。 diff --git a/docs/self-hosting/advanced/model-list.mdx b/docs/self-hosting/advanced/model-list.mdx index 9fa9eaafa21d..94c5c37408d2 100644 --- a/docs/self-hosting/advanced/model-list.mdx +++ b/docs/self-hosting/advanced/model-list.mdx @@ -12,7 +12,7 @@ tags: # Model List -LobeChat supports customizing the model list during deployment. You can use `+` to add a model, `-` to hide a model, and use `model name=display name` to customize the display name of a model, separated by English commas. The basic syntax is as follows: +LobeChat supports customizing the model list during deployment. This configuration is done in the environment for each [model provider](/docs/self-hosting/environment-variables/model-provider). You can use `+` to add a model, `-` to hide a model, and use `model name=display name` to customize the display name of a model, separated by English commas. The basic syntax is as follows: ```text id=displayName,model2,model3 diff --git a/docs/self-hosting/advanced/model-list.zh-CN.mdx b/docs/self-hosting/advanced/model-list.zh-CN.mdx index 52949e1bce00..a4ac2e0fed5f 100644 --- a/docs/self-hosting/advanced/model-list.zh-CN.mdx +++ b/docs/self-hosting/advanced/model-list.zh-CN.mdx @@ -8,6 +8,7 @@ tags: - 模型展示名 - 模型能力 --- + # Model List LobeChat 支持在部署时自定义模型列表,可以使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。通过 `<>` 来添加扩展配置。基本语法如下: diff --git a/docs/self-hosting/advanced/server-database.mdx b/docs/self-hosting/advanced/server-database.mdx new file mode 100644 index 000000000000..0209abbfa340 --- /dev/null +++ b/docs/self-hosting/advanced/server-database.mdx @@ -0,0 +1,404 @@ +--- +title: Deploying Server-Side Database - Configuration Guide for LobeChat on Vercel +description: >- + Learn how to deploy the server-side database version of LobeChat on Vercel, + including database configuration, identity authentication service setup, and + S3 storage service configuration. +tags: + - Server-Side Database + - Vercel Deployment + - Postgres Database + - Identity Authentication + - S3 Storage Service + - Configuration Guide +--- + +# Deploying Server-Side Database + +LobeChat defaults to using a client-side database (IndexedDB) but also supports using a server-side database. LobeChat uses Postgres as the backend storage database. PostgreSQL is a powerful open-source relational database management system with high scalability and standard SQL support. It provides rich data types, concurrency control, data integrity, security, and programmability, making it suitable for complex applications and large-scale data management. + +This article will detail how to deploy the server-side database version of LobeChat on Vercel, including: 1) database configuration; 2) identity authentication service configuration; 3) steps for setting up the S3 storage service. + + + Due to workload constraints, currently only deployment on Vercel using the server-side database + version is supported, with Docker version support planned for future iterations. + + +Before deploying the server, please export your backup! + +## 1. Configure the Database + + + +### Prepare a Server-Side Database Instance and Obtain the Connection URL + +Before deployment, make sure you have prepared a Postgres database instance. You can choose either of the following methods: + +- `A.` Use Serverless Postgres instances like Vercel/Neon; +- `B.` Use self-deployed Postgres instances like Docker. + +The configuration for both methods is slightly different, which will be distinguished in the next step. + +### Add Environment Variables in Vercel + +In Vercel's deployment environment variables, add the `DATABASE_URL` and other environment variables. Fill in the prepared Postgres database connection URL. The typical format for the database connection URL is `postgres://username:password@host:port/database`. + + + + + +Variables required for Serverless Postgres are as follows: + +```shell +# Serverless Postgres DB Url +DATABASE_URL= + +# Specify the service mode as server, otherwise it won't enter the server-side database +NEXT_PUBLIC_SERVICE_MODE=server +``` + +An example of how to fill in Vercel is shown below: + +{'Add + + + + + Variables required for Node Postgres are as follows: + +```shell +# Node Postgres DB Url +DATABASE_URL= + +# Specify the Postgres database driver as node +DATABASE_DRIVER=node + +# Specify the service mode as server, otherwise it won't enter the server-side database +NEXT_PUBLIC_SERVICE_MODE=server +``` + +An example of how to fill in Vercel is shown below: + +{'Add + + + + + +### Add the `KEY_VAULTS_SECRET` Environment Variable + +After adding the `DATABASE_URL` environment variable, you need to add a `KEY_VAULTS_SECRET` environment variable. This variable is used to encrypt sensitive information like user-stored API keys. You can generate a random 32-character string as the key using `openssl rand -base64 32`. + +```shell +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= +``` + +Add this to the Vercel environment variables as well. + + + +## 2. Configure the Identity Authentication Service + +A server-side database needs to be paired with an identity authentication service to function properly. Therefore, the corresponding identity authentication service needs to be configured. + + + Due to workload constraints, currently only Clerk is supported as an identity authentication + service solution. Integration with Next-Auth for server-side database is under development. + + + + +### Prepare the Clerk Identity Authentication Service + +Go to [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key. + + + If you are unfamiliar with Clerk, you can refer to [Authentication + Service-Clerk](/en/docs/self-hosting/advanced/authentication#clerk) for details on using Clerk. + + +### Add Public and Private Key Environment Variables in Vercel + +In Vercel's deployment environment variables, add the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` environment variables. You can click on "API Keys" in the menu, then copy the corresponding values and paste them into Vercel's environment variables. + +{'Find + +The environment variables required for this step are as follows: + +```shell +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx +``` + +Add these variables to Vercel: + +{'Add + +### Create and Configure a Webhook in Clerk + +Since we let Clerk handle user authentication and management entirely, we need Clerk to notify our application and store data in the database when there are changes in the user lifecycle (create, update, delete). We achieve this using the Webhook provided by Clerk. + +We need to add an endpoint in Clerk's Webhooks to inform Clerk to send notifications to this endpoint when a user's status changes. + +{'Add + + + +Fill in your Vercel project's URL in the endpoint, such as `https://your-project.vercel.app/api/webhooks/clerk`. Then, in the Subscribe to events section, check the three user events (`user.created`, `user.deleted`, `user.updated`), and click create. + +{'Configure + +### Add the Webhook Secret to Vercel Environment Variables + +After creation, you can find the secret of this Webhook in the bottom right corner: + +{'View + +The corresponding environment variable name for this secret is `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + +Add this to Vercel's environment variables: + + + + + + + +You have now successfully configured the Clerk identity authentication service. Next, we will configure the S3 storage service. + +## 3. Configure S3 Storage Service + +LobeChat has long supported multimodal AI conversations, involving the function of uploading images to AI. In the client-side database solution, image files are stored as binary data in the browser's indexedDB database. However, this solution is not feasible in the server-side database. We need to configure the S3 storage service to store a large number of image files, and S3 can also serve as a storage solution for file uploads. + + + In this article, S3 refers to a compatible S3 storage solution, which supports object storage + systems that comply with the Amazon S3 API. Common examples include Cloudflare R2 etc., all of + which support S3-compatible APIs. + + + + +### Configure and Obtain S3 Bucket + +You need to go to your S3 service provider (such as AWS S3, Cloudflare R2, etc.) and create a new storage bucket. Below is an example of the creation process using Cloudflare R2. + +The interface of Cloudflare R2 is shown below: + +{'Cloudflare + +When creating the bucket, specify its name and then click create. + +{'Create + +### Obtain Environment Variables for the Bucket + +In the settings of the R2 storage bucket, you can view the bucket configuration information: + +{'View + +The corresponding environment variables are: + +```shell +# Bucket name +S3_BUCKET=lobechat +# Bucket request endpoint +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# Public domain for accessing the bucket +NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + +### Obtain S3 Key Environment Variables + +You need to obtain the access key for S3 so that the LobeChat server has permission to access the S3 storage service. In R2, you can configure the access key in the account details: + +{'View + +Click the button in the upper right corner to create an API token, then enter the API Token creation page. + +{'Create + +Since our server-side database needs to read and write to the S3 storage service, the permissions need to be set to read and write, and only select the bucket we created, then click create. + +{'Configure + +After creation, you can see the corresponding S3 API token. + +{'Copy + +The corresponding environment variables are: + +```shell +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 +``` + +### Add the Corresponding Environment Variables in Vercel + +The steps to obtain the required environment variables may vary for different S3 service providers, but the obtained environment variables should be consistent in the end: + +```shell +# S3 Key +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# Bucket name +S3_BUCKET=lobechat +# Bucket request endpoint +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# Public domain for accessing the bucket +NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com + +# Bucket region, such as us-west-1, generally not required to add, but some service providers may need to configure +# S3_REGION=us-west-1 +``` + +Then enter the above environment variables into Vercel's environment variables: + +{'Add + +### Configure Cross-Origin Resource Sharing (CORS) + +Since S3 storage services are often on a separate domain, cross-origin access needs to be configured. + +In R2, you can find the CORS configuration in the settings of the storage bucket: + +{'Cloudflare + +Add a CORS rule to allow requests from your domain (in this case, `https://your-project.vercel.app`): + +{'Configure + +Example configuration: + +```json +[ + { + "AllowedOrigins": ["https://your-project.vercel.app"], + "AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"], + "AllowedHeaders": ["*"] + } +] +``` + +After configuration, click save. + + + +## 4. Deployment and Verification + +After completing the above steps, the configuration of the server database should be done. Next, we can deploy LobeChat to Vercel and then visit your Vercel link to verify if the server database is working correctly. + + + ### Redeploy the latest commit + +After configuring the environment variables, you need to redeploy the latest commit and wait for the deployment to complete. + +{'Redeploy + +### Check if the features are working properly + +If you click on the login button in the top left corner and the login popup appears normally, then you have configured it successfully. Enjoy using it\~ + +{'User + + + +{'Login + + + + + +## Appendix + +### Overview of Server Database Environment Variables + +For easy copying, here is a summary of the environment variables required to configure the server data: + +```shell +# Specify the service mode as server +NEXT_PUBLIC_SERVICE_MODE=server + +# Postgres database URL +DATABASE_URL= +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= + +# Clerk related configurations +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx + +# S3 related configurations +# S3 keys +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# Bucket name +S3_BUCKET=lobechat +# Bucket request endpoint +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# Public access domain for the bucket +NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com +# Bucket region, such as us-west-1, generally not needed to add, but some service providers may require configuration +# S3_REGION=us-west-1 +``` diff --git a/docs/self-hosting/advanced/server-database.zh-CN.mdx b/docs/self-hosting/advanced/server-database.zh-CN.mdx new file mode 100644 index 000000000000..eb84934814fb --- /dev/null +++ b/docs/self-hosting/advanced/server-database.zh-CN.mdx @@ -0,0 +1,392 @@ +--- +title: 使用服务端数据库部署 - 配置 Postgres、Clerk 和 S3 存储服务 +description: 本文详细介绍如何在 Vercel 中部署服务端数据库版 LobeChat,包括数据库配置、身份验证服务配置和 S3 存储服务的设置步骤。 +tags: + - 服务端数据库 + - Postgres + - Clerk + - S3存储服务 + - Vercel部署 + - 数据库配置 + - 身份验证服务 + - 环境变量配置 +--- + +# 使用服务端数据库部署 + +LobeChat 默认使用客户端数据库(IndexedDB),同时也支持使用服务端数据库。LobeChat 采用了 Postgres 作为后端存储数据库。PostgreSQL是一种强大的开源关系型数据库管理系统,具备高度扩展性和标准SQL支持。它提供了丰富的数据类型、并发处理、数据完整性、安全性及可编程性,适用于复杂应用和大规模数据管理。 + +本文将详细介绍如何在 Vercel 中部署服务端数据库版 LobeChat,包括: 1)数据库配置;2)身份验证服务配置;3) S3 存储服务的设置步骤。 + + + 限于工作量原因,目前仅支持在 Vercel 中部署使用服务端数据库版本,Docker 版本将会在后续迭代中支持。 + + +在部署服务端之前,请导出你的备份! + +## 一、 配置数据库 + + + +### 准备服务端数据库实例,获取连接 URL + +在部署之前,请确保你已经准备好 Postgres 数据库实例,你可以选择以下任一方式: + +- `A.` 使用 Vercel / Neon 等 Serverless Postgres 实例; +- `B.` 使用 Docker 等自部署 Postgres 实例。 + +两者的配置方式略有不同,在下一步会有所区分。 + +### 在 Vercel 中添加环境变量 + +在 Vercel 的部署环境变量中,添加 `DATABASE_URL` 等环境变量,将上一步准备好的 Postgres 数据库连接 URL 填入其中。数据库连接 URL 的通常格式为 `postgres://username:password@host:port/database`。 + + + + + + Serverless Postgres 需要填写的变量如下: + + ```shell + # Serverless Postgres DB Url + DATABASE_URL= + + # 指定 service mode 为 server,否则不会进入服务端数据库 + NEXT_PUBLIC_SERVICE_MODE=server + ``` + + 在 Vercel 中填写的示例如下: + + {'添加 + + + + + Node Postgres 需要填写的变量如下: + + ```shell + # Node Postgres DB Url + DATABASE_URL= + + # 指定 Postgres database driver 为 node + DATABASE_DRIVER=node + + # 指定 service mode 为 server,否则不会进入服务端数据库 + NEXT_PUBLIC_SERVICE_MODE=server + ``` + + 在 Vercel 中填写的示例如下: + + {'添加 + + + + + +### 添加 `KEY_VAULTS_SECRET` 环境变量 + +在完成数据库 DATABASE_URL 环境变量添加后,需要添加一个 `KEY_VAULTS_SECRET` 环境变量。该变量用于加密用户存储的 apikey 等敏感信息。你可以使用 `openssl rand -base64 32` 生成一个随机的 32 位字符串作为密钥。 + +```shell +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= +``` + +同样需要将其添加到 Vercel 环境变量中。 + + + +## 二、 配置身份验证服务 + +服务端数据库需要搭配用户身份验证服务才可以正常使用。因此需要配置对应的身份验证服务。 + + + 同样由于工作量原因,目前仅支持 Clerk 作为身份验证服务方案, Next-Auth 的服务端数据库集成有待开发 + + + + +### 准备 Clerk 身份验证服务 + +前往 [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。 + + + 如果对 Clerk 不太了解,可以查阅 + [身份验证服务-Clerk](/zh/docs/self-hosting/advanced/authentication#clerk) 了解 Clerk 的使用详情。 + + +### 在 Vercel 中添加公、私钥环境变量 + +在 Vercel 的部署环境变量中,添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值填入 Vercel 的环境变量中。 + +{'在 + +此步骤所需的环境变量如下: + +```shell +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx +``` + +添加上述变量到 Vercel 中: + +{'在 + +### 在 Clerk 中创建并配置 Webhook + +由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。 + +我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。 + +{'Clerk + +在 endppint 中填写你的 Vercel 项目的 URL,如 `https://your-project.vercel.app/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。 + +{'添加 + +### 将 Webhook 秘钥添加到 Vercel 环境变量 + +创建完毕后,可以在右下角找到该 Webhook 的秘钥: + +{'查看 + +这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + +将其添加到 Vercel 的环境变量中: + +{'在 + + + +这样,你已经成功配置了 Clerk 身份验证服务。接下来我们将配置 S3 存储服务。 + +## 三、 配置 S3 存储服务 + +LobeChat 在很早以前就支持了多模态 的 AI 会话,其中涉及到图片上传给 AI 的功能。在客户端数据库方案中,图片文件直接以二进制数据存储在浏览器 indexedDB 数据库,但在服务端数据库中这个方案并不可行。我们需要配置 S3 存储服务来存储大量的图片文件,同时 S3 也可以作为文件上传的存储方案。 + + + 在本文,S3所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如 Cloudflare + R2 、阿里云 OSS 等均支持 S3 兼容 API。 + + + + + ### 配置并获取 S3 存储桶 + + 你需要前往你的 S3 服务提供商(如 AWS S3、Cloudflare R2 等)并创建一个新的存储桶(Bucket)。接下来以 Cloudflare R2 为例,介绍创建流程。 + + 下图是 Cloudflare R2 的界面: + + {'Cloudflare + + 创建存储桶时将指定其名称,然后点击创建。 + {'R2 + + ### 获取存储桶相关环境变量 + + 在 R2 存储桶的设置中,可以看到桶配置的信息: + + {'查看存储桶的相关信息'} + +其对应的环境变量为: + +```shell +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点 +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + + ### 获取 S3 密钥环境变量 + + 你需要获取 S3 的访问密钥,以便 LobeChat 的服务端有权限访问 S3 存储服务。在 R2 中,你可以在账户详情中配置访问密钥: + + {'查看存储桶的访问秘钥'} + + 点击右上角按钮创建 API token,进入创建 API Token 页面 + + {'创建对应 + + 鉴于我们的服务端数据库需要读写 S3 存储服务,因此权限需要选择读与写,并只选择我们所创建的存储桶,然后点击创建。 + + {'配置 + + 创建完成后,就可以看到对应的 S3 API token + + {'复制 + + 其对应的环境变量为: + +```shell +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 +``` + +### 在 Vercel 中添加对应的环境变量 + + 不同 S3 服务商获取所需环境变量的步骤可能有所不同,但最终获得到的环境变量应该都是一致的: + +```shell +# S3 秘钥 +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点 +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +NEXT_PUBLIC_S3_DOMAIN=https://s3-dev.your-domain.com + +# 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置 +# S3_REGION=us-west-1 +``` + +然后将上述环境变量填入 Vercel 的环境变量中: + + {'在 + + ### 配置跨域 + + 由于 S3 存储服务往往是一个独立的网址,因此需要配置跨域访问。 + + 在 R2 中,你可以在存储桶的设置中找到跨域配置: + + {'Cloudflare + + 添加跨域规则,允许你的域名(在上文是 `https://your-project.vercel.app`)来源的请求: + + {'配置允许你的站点域名'} + +示例配置如下: + +```json +[ + { + "AllowedOrigins": ["https://your-project.vercel.app"], + "AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"], + "AllowedHeaders": ["*"] + } +] +``` + +配置后点击保存即可。 + + + +## 四、部署并验证 + +通过上述步骤之后,我们应该就完成了服务端数据库的配置。接下来我们可以将 LobeChat 部署到 Vercel 上,然后访问你的 Vercel 链接,验证服务端数据库是否正常工作。 + + + ### 重新部署最新的 commit + +配置好环境变量后,你需要重新部署最新的 commit,并等待部署完成。 + +{'重新部署最新的 + +### 检查功能是否正常 + +如果你点击左上角登录,可以正常显示登录弹窗,那么说明你已经配置成功了,尽情享用吧~ + +{'用户登录弹窗'} + +{'登录成功状态'} + + + +## 附录 + +### 服务端数据库环境变量一览 + +为方便一键复制,在此汇总配置服务端数据所需要的环境变量: + +```shell +# 指定服务模式为 server +NEXT_PUBLIC_SERVICE_MODE=server + +# Postgres 数据库 URL +DATABASE_URL= +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= + +# Clerk 相关配置 +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx + +# S3 相关配置 +# S3 秘钥 +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点 +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +NEXT_PUBLIC_S3_DOMAIN=https://s3-for-lobechat.your-domain.com +# 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置 +# S3_REGION=us-west-1 +``` diff --git a/docs/self-hosting/advanced/settings-url-share.mdx b/docs/self-hosting/advanced/settings-url-share.mdx index 179cdb516a2b..c12a09ac26d8 100644 --- a/docs/self-hosting/advanced/settings-url-share.mdx +++ b/docs/self-hosting/advanced/settings-url-share.mdx @@ -1,9 +1,25 @@ -# Share settings via URL +--- +title: Share Settings via URL - Import and Export Configuration Settings +description: >- + Learn how to import and export configuration settings for LobeChat via URL. + Understand the supported settings, URL format, and parameter schema for + keyVaults and languageModel. +tags: + - Share Settings + - URL Import + - URL Export + - Configuration Settings + - LobeChat + - Parameter Schema +--- + +# Share settings via URL LobeChat support import settings from external URL to quickly set up LobeChat configuration. The currently supported settings are: +- `keyVaults`: provider api key and baseURL settings - `languageModel`: Language model settings ## Import from URL @@ -12,18 +28,18 @@ Use the following URL format to import settings parameters from an external URL: ```plaintext https://lobehub.com/?settings= -https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}} +https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} ``` Example of settings in JSON format: ```json { - "languageModel": { - "openai": { - "apiKey": "user-key" - } + "keyVaults": { + "openai": { + "apiKey": "user-key" } + } } ``` @@ -32,69 +48,100 @@ Example of settings in JSON format: ```ts // Generate settings to export to URL const settings = { - languageModel: { + keyVaults: { openai: { - apiKey: 'user-key', - endpoint: 'https://lobehub.com/v1' + apiKey: 'user-key', + baseURL: 'https://your-proxy.com/v1', }, -}}; + }, +}; // Convert settings to a JSON formatted string const url = `/?settings=${JSON.stringify(settings)}`; -console.log(url); -// /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}} +console.log(url); +// /?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} ``` - LobeChat does not verify the correctness of the settings parameters in the URL, nor provide encryption or decryption methods. Please use with caution. + LobeChat does not verify the correctness of the settings parameters in the URL, nor provide + encryption or decryption methods. Please use with caution. ## Parameter schema -### languageModel +### keyVaults - Property name and type -| Property name | Type | -|---------------|--------------------------------| -| anthropic | GeneralModelProviderConfig | -| azure | AzureOpenAIConfig | -| bedrock | AWSBedrockConfig | -| google | GeneralModelProviderConfig | -| groq | GeneralModelProviderConfig | -| minimax | GeneralModelProviderConfig | -| mistral | GeneralModelProviderConfig | -| moonshot | GeneralModelProviderConfig | -| ollama | GeneralModelProviderConfig | -| openai | GeneralModelProviderConfig | -| openrouter | GeneralModelProviderConfig | -| perplexity | GeneralModelProviderConfig | -| togetherai | GeneralModelProviderConfig | -| zeroone | GeneralModelProviderConfig | -| zhipu | GeneralModelProviderConfig | - -- Type `GeneralModelProviderConfig` - -| Property name | Type | Description | -|-----------------------|--------------------------|-----------------------------------------------------------------------------| -| apiKey | string | The API key for the model provider. | -| autoFetchModelLists | boolean | Whether to automatically fetch model lists. | -| enabled | boolean | Whether the model provider is enabled. | -| enabledModels | string[] | null | The IDs of the enabled models. | -| endpoint | string | The endpoint for the model provider. | -| fetchOnClient | boolean | Whether to fetch on the client. | - -- Type `AzureOpenAIConfig` -> Inherits the fields from `GeneralModelProviderConfig` - -| Property name | Type | Description | -|-----------------------|--------------------------|-----------------------------------------------------------------------------| -| apiVersion | string | The API version for Azure OpenAI. | - -- Type `AWSBedrockConfig` -> Inherits all fields from `GeneralModelProviderConfig` except `apiKey, endpoint` - -| Property name | Type | Description | -| accessKeyId | string | The access key ID for AWS Bedrock. | -| region | string | The region for AWS Bedrock. | -| secretAccessKey | string | The secret access key for AWS Bedrock. | +| Property name | Type | +| ------------- | -------------------------- | +| anthropic | `OpenAICompatibleKeyVault` | +| azure | `AzureOpenAIKeyVault` | +| bedrock | `AWSBedrockKeyVault` | +| google | `OpenAICompatibleKeyVault` | +| groq | `OpenAICompatibleKeyVault` | +| minimax | `OpenAICompatibleKeyVault` | +| mistral | `OpenAICompatibleKeyVault` | +| moonshot | `OpenAICompatibleKeyVault` | +| ollama | `OpenAICompatibleKeyVault` | +| openai | `OpenAICompatibleKeyVault` | +| openrouter | `OpenAICompatibleKeyVault` | +| perplexity | `OpenAICompatibleKeyVault` | +| togetherai | `OpenAICompatibleKeyVault` | +| zeroone | `OpenAICompatibleKeyVault` | +| zhipu | `OpenAICompatibleKeyVault` | + +- Type `OpenAICompatibleKeyVault` + +| Property name | Type | Description | +| ------------- | ------ | ------------------------------------ | +| apiKey | string | The API key for the model provider. | +| baseURL | string | The endpoint for the model provider. | + +- Type `AzureOpenAIKeyVault` + +| Property name | Type | Description | +| ------------- | ------ | ------------------------------------ | +| apiVersion | string | The API version for Azure OpenAI. | +| apiKey | string | The API key for the model provider. | +| endpoint | string | The endpoint for the model provider. | + +- Type `AWSBedrockKeyVault` + +| Property name | Type | Description | +| --------------- | ------ | -------------------------------------- | +| accessKeyId | string | The access key ID for AWS Bedrock. | +| region | string | The region for AWS Bedrock. | +| secretAccessKey | string | The secret access key for AWS Bedrock. | + +### languageModel + +```ts +export type UserModelProviderConfig = Record; +``` +| Property name | Type | +| ------------- | ---------------- | +| anthropic | `ProviderConfig` | +| azure | `ProviderConfig` | +| bedrock | `ProviderConfig` | +| google | `ProviderConfig` | +| groq | `ProviderConfig` | +| minimax | `ProviderConfig` | +| mistral | `ProviderConfig` | +| moonshot | `ProviderConfig` | +| ollama | `ProviderConfig` | +| openai | `ProviderConfig` | +| openrouter | `ProviderConfig` | +| perplexity | `ProviderConfig` | +| togetherai | `ProviderConfig` | +| zeroone | `ProviderConfig` | +| zhipu | `ProviderConfig` | + +- Type `ProviderConfig` + +| Property name | Type | Description | +| ------------------- | -------- | ------------------------------------------- | ------------------------------ | +| autoFetchModelLists | boolean | Whether to automatically fetch model lists. | +| enabled | boolean | Whether the model provider is enabled. | +| enabledModels | string[] | null | The IDs of the enabled models. | +| fetchOnClient | boolean | Whether to fetch on the client. | diff --git a/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx b/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx index 269c687cbc65..14f47b5fc715 100644 --- a/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +++ b/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx @@ -1,10 +1,25 @@ +--- +title: URL 分享设置参数 - LobeChat 配置快速设置 +description: 了解如何从外部 URL 导入和导出 LobeChat 的设置参数,包括 keyVaults 和 languageModel,以及参数格式和类型。 +tags: + - URL 分享 + - 设置参数 + - LobeChat + - keyVaults + - languageModel + - JSON 格式 + - URL 导入 + - URL 导出 +--- + # URL 分享设置参数 LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat 的配置。 目前支持的设置项有: -- `languageModel`:语言模型设置 +- `keyVaults`: 模型供应商相关秘钥设置 +- `languageModel`:语言模型设置 ## 从 URL 中导入 @@ -12,18 +27,18 @@ LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat ```plaintext https://lobehub.com/?settings= -https://lobehub.com/?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}} +https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} ``` JSON格式的设置示例: ```json { - "languageModel": { - "openai": { - "apiKey": "user-key" - } + "keyVaults": { + "openai": { + "apiKey": "user-key" } + } } ``` @@ -32,69 +47,99 @@ JSON格式的设置示例: ```ts // 生成要导出到 URL 的设置 const settings = { - languageModel: { + keyVaults: { openai: { - apiKey: 'user-key', - endpoint: 'https://lobehub.com/v1' + apiKey: 'user-key', + baseURL: 'https://your-proxy.com/v1', }, -}}; -// 将设置转为 JSON 格式的字符串 + }, +}; +// Convert settings to a JSON formatted string const url = `/?settings=${JSON.stringify(settings)}`; -console.log(url); -// /?settings={"languageModel":{"openai":{"apiKey":"user-key","endpoint":"https://lobehub.com/v1"}}} +console.log(url); +// /?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} ``` - LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供加密、解密方法,请谨慎使用。 + LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供 URL 的加密、解密方法,请谨慎使用。 ## 参数格式 -### languageModel +### keyVaults - 参数及其类型 -| 参数名称 | 类型 | -|---------------|--------------------------------| -| anthropic | GeneralModelProviderConfig | -| azure | AzureOpenAIConfig | -| bedrock | AWSBedrockConfig | -| google | GeneralModelProviderConfig | -| groq | GeneralModelProviderConfig | -| minimax | GeneralModelProviderConfig | -| mistral | GeneralModelProviderConfig | -| moonshot | GeneralModelProviderConfig | -| ollama | GeneralModelProviderConfig | -| openai | GeneralModelProviderConfig | -| openrouter | GeneralModelProviderConfig | -| perplexity | GeneralModelProviderConfig | -| togetherai | GeneralModelProviderConfig | -| zeroone | GeneralModelProviderConfig | -| zhipu | GeneralModelProviderConfig | - -- 类型 `GeneralModelProviderConfig` - -| 参数 | TS 类型 | 描述 | -|-----------------------|--------------------------|-----------------------------------------------------------------------------| -| apiKey | string | 模型的 API 密钥。 | -| autoFetchModelLists | boolean | 是否自动获取模型列表。 | -| enabled | boolean | 是否启用该模型。 | -| enabledModels | string[] | 启用的模型的 ID。 | -| endpoint | string | 模型API端点。 | -| fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 | - -- 类型 `AzureOpenAIConfig` -> 继承 `GeneralModelProviderConfig` 中的字段 - -| 参数 | TS 类型 | 描述 | -|-----------------------|--------------------------|-----------------------------------------------------------------------------| +| 参数名称 | 类型 | +| ---------- | -------------------------- | +| anthropic | `OpenAICompatibleKeyVault` | +| azure | `AzureOpenAIKeyVault` | +| bedrock | `AWSBedrockKeyVault` | +| google | `OpenAICompatibleKeyVault` | +| groq | `OpenAICompatibleKeyVault` | +| minimax | `OpenAICompatibleKeyVault` | +| mistral | `OpenAICompatibleKeyVault` | +| moonshot | `OpenAICompatibleKeyVault` | +| ollama | `OpenAICompatibleKeyVault` | +| openai | `OpenAICompatibleKeyVault` | +| openrouter | `OpenAICompatibleKeyVault` | +| perplexity | `OpenAICompatibleKeyVault` | +| togetherai | `OpenAICompatibleKeyVault` | +| zeroone | `OpenAICompatibleKeyVault` | +| zhipu | `OpenAICompatibleKeyVault` | + +- Type `OpenAICompatibleKeyVault` + +| 参数 | 类型 | 描述 | +| ------- | ------ | ----------------- | +| apiKey | string | 模型的 API 密钥。 | +| baseURL | string | 模型API端点。 | + +- Type `AzureOpenAIKeyVault` + +| 参数 | 类型 | 描述 | +| ---------- | ------ | -------------------------- | | apiVersion | string | Azure OpenAI 的 API 版本。 | +| apiKey | string | 模型的 API 密钥。 | +| baseURL | string | 模型API端点。 | + +- Type `AWSBedrockKeyVault` + +| 参数 | 类型 | 描述 | +| --------------- | ------ | --------------------------- | +| accessKeyId | string | AWS Bedrock 的访问密钥 ID。 | +| region | string | AWS Bedrock 的区域。 | +| secretAccessKey | string | AWS Bedrock 的访问密钥。 | -- 类型 `AWSBedrockConfig` -> 继承 `GeneralModelProviderConfig` 中除 `apiKey, endpoint` 外的所有字段 +### languageModel + +```ts +export type UserModelProviderConfig = Record; +``` -| 参数 | TS 类型 | 描述 | -|-----------------------|--------------------------|-----------------------------------------------------------------------------| -| accessKeyId | string | AWS Bedrock 的访问密钥 ID。 | -| region | string | AWS Bedrock 的区域。 | -| secretAccessKey | string | AWS Bedrock 的访问密钥。 | +| 参数名称 | 类型 | +| ---------- | ---------------- | +| anthropic | `ProviderConfig` | +| azure | `ProviderConfig` | +| bedrock | `ProviderConfig` | +| google | `ProviderConfig` | +| groq | `ProviderConfig` | +| minimax | `ProviderConfig` | +| mistral | `ProviderConfig` | +| moonshot | `ProviderConfig` | +| ollama | `ProviderConfig` | +| openai | `ProviderConfig` | +| openrouter | `ProviderConfig` | +| perplexity | `ProviderConfig` | +| togetherai | `ProviderConfig` | +| zeroone | `ProviderConfig` | +| zhipu | `ProviderConfig` | + +- 类型 `ProviderConfig` + +| 参数 | TS 类型 | 描述 | +| ------------------- | -------- | -------------------------------------------- | +| autoFetchModelLists | boolean | 是否自动获取模型列表。 | +| enabled | boolean | 是否启用该模型。 | +| enabledModels | string[] | 启用的模型的 ID。 | +| fetchOnClient | boolean | 是否在客户端发起请求,默认在服务端发起请求。 | diff --git a/docs/self-hosting/advanced/sso-providers/zitadel.mdx b/docs/self-hosting/advanced/sso-providers/zitadel.mdx index 1e27a9dc54a3..b9cae84c131b 100644 --- a/docs/self-hosting/advanced/sso-providers/zitadel.mdx +++ b/docs/self-hosting/advanced/sso-providers/zitadel.mdx @@ -57,7 +57,8 @@ http(s)://your-domain/api/auth/callback/zitadel - You can fill in or modify redirect URIs after creating the application, but make sure the filled URL is consistent with the deployed URL. - - Replace `http(s)://your-domain` with the actual URL that LobeChat is deployed to. +- Replace `http(s)://your-domain` with the actual URL that LobeChat is deployed to. + Confirm the configuration and click **Create**. @@ -76,8 +77,7 @@ Save the **ClientId** and **ClientSecret** for later use. src="https://github.com/lobehub/lobe-chat/assets/8692892/407b4eed-7f21-4aa6-b68f-9bae2faf09d0" /> -In the application settings page, navigate to the **Token Settings** tab, enable **User Info inside -ID Token** option, and click **Save**. +In the application settings page, navigate to the **Token Settings** tab, enable **User Info inside ID Token** option, and click **Save**. Create ZITADEL Application S7 - 可以创建应用后再填写或修改重定向 URL,但请确保填写的 URL 与部署的 URL 一致。 - - 请将 `http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。 +- 请将 `http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。 + 确认配置并点击「创建」。 diff --git a/docs/self-hosting/advanced/upstream-sync.mdx b/docs/self-hosting/advanced/upstream-sync.mdx index bd3f62a67e8d..5324ea0eb909 100644 --- a/docs/self-hosting/advanced/upstream-sync.mdx +++ b/docs/self-hosting/advanced/upstream-sync.mdx @@ -126,13 +126,13 @@ if [ $? -eq 0 ]; then exit 0 fi -echo "Detected Lobe-Chat update" +echo "Detected lobe-chat update" # Remove the old container -echo "Removed: $(docker rm -f Lobe-Chat)" +echo "Removed: $(docker rm -f lobe-chat)" -# Run the new container -echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)" +# Run the new container(Please change the path to the env file) +echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)" # Print the update time and version echo "Update time: $(date)" diff --git a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx index 18623aecbde5..eab56be998a7 100644 --- a/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +++ b/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx @@ -103,7 +103,7 @@ OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3. # auto-update-lobe-chat.sh # 设置代理(可选) -export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 +# export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890 # 拉取最新的镜像并将输出存储在变量中 output=$(docker pull lobehub/lobe-chat:latest 2>&1) @@ -121,13 +121,13 @@ if [ $? -eq 0 ]; then exit 0 fi -echo "Detected Lobe-Chat update" +echo "Detected lobe-chat update" # 删除旧的容器 -echo "Removed: $(docker rm -f Lobe-Chat)" +echo "Removed: $(docker rm -f lobe-chat)" -# 运行新的容器 -echo "Started: $(docker run -d --network=host --env-file /path/to/lobe.env --name=Lobe-Chat --restart=always lobehub/lobe-chat)" +# 运行新的容器(请将env配置文件地址改为你的实际地址) +echo "Started: $(docker run -d --network=host --env-file path/to/lobe.env --name=lobe-chat --restart=always lobehub/lobe-chat)" # 打印更新的时间和版本 echo "Update time: $(date)" diff --git a/docs/self-hosting/environment-variables/analytics.mdx b/docs/self-hosting/environment-variables/analytics.mdx index f205b5b57375..770a99df5703 100644 --- a/docs/self-hosting/environment-variables/analytics.mdx +++ b/docs/self-hosting/environment-variables/analytics.mdx @@ -1,7 +1,5 @@ --- -title: >- - Integrating Data Analytics Services in LobeChat: Environment Variables and - Configuration +title: Integrating Analytics in LobeChat description: >- Learn how to configure environment variables for Vercel Analytics, Google Analytics, PostHog Analytics, and Umami Analytics in LobeChat for data @@ -36,44 +34,30 @@ We have integrated several free/open-source data analytics services in LobeChat ## Google Analytics -### `ENABLE_GOOGLE_ANALYTICS` - -- Type: Optional -- Description: Used to configure the environment variable for Google Analytics. Set to `1` to enable Google Analytics. -- Default: `-` -- Example: `1` - ### `GOOGLE_ANALYTICS_MEASUREMENT_ID` - Type: Required -- Description: Google Analytics Measurement ID,you can get it from the Google Analytics dashboard. +- Description: Google Analytics Measurement ID,you can get it from the Google Analytics dashboard. Add it will auto enable Google Analytics. - Default: `-` - Example: `G-63LP2TV03T` ## Posthog Analytics -### `NEXT_PUBLIC_ANALYTICS_POSTHOG` +### `POSTHOG_KEY` -- Type: Optional -- Description: Used to enable the environment variable for [PostHog Analytics][posthog-analytics-url]. Set to `1` to enable PostHog Analytics. -- Default: `-` -- Example: `1` - -### `NEXT_PUBLIC_POSTHOG_KEY` - -- Type: Optional -- Description: Set the PostHog project Key. +- Type: Required +- Description: Set the PostHog project Key. Add it will auto enable PostHog Analytics. - Default: `-` - Example: `phc_xxxxxxxx` -### `NEXT_PUBLIC_POSTHOG_HOST` +### `POSTHOG_HOST` - Type: Optional - Description: Set the deployment address of the PostHog service, defaulting to the official SAAS address. - Default: `https://app.posthog.com` - Example: `https://example.com` -### `NEXT_PUBLIC_POSTHOG_DEBUG` +### `DEBUG_POSTHOG_ANALYTICS` - Type: Optional - Description: Enable the debug mode for PostHog. @@ -82,26 +66,19 @@ We have integrated several free/open-source data analytics services in LobeChat ## Umami Analytics -### `NEXT_PUBLIC_ANALYTICS_UMAMI` +### `UMAMI_WEBSITE_ID` -- Type: Optional -- Description: Used to enable the environment variable for [Umami Analytics][umami-analytics-url]. Set to `1` to enable Umami Analytics. +- Type: Required +- Description: Your Umami Website ID. Add it will auto enable Umami Analytics. - Default: `-` -- Example: `1` +- Example: `E738D82A-EE9E-4806-A81F-0CA3CAE57F65` -### `NEXT_PUBLIC_UMAMI_SCRIPT_URL` +### `UMAMI_SCRIPT_URL` - Type: Optional - Description: The URL of the Umami script, defaulting to the script URL provided by Umami Cloud. - Default: `https://analytics.umami.is/script.js` - Example: `https://umami.your-site.com/script.js` -### `NEXT_PUBLIC_UMAMI_WEBSITE_ID` - -- Type: Required -- Description: Your Umami Website ID. -- Default: `-` -- Example: `E738D82A-EE9E-4806-A81F-0CA3CAE57F65` - [posthog-analytics-url]: https://posthog.com [umami-analytics-url]: https://umami.is diff --git a/docs/self-hosting/environment-variables/analytics.zh-CN.mdx b/docs/self-hosting/environment-variables/analytics.zh-CN.mdx index b6853c6cc483..df02c2d86b1b 100644 --- a/docs/self-hosting/environment-variables/analytics.zh-CN.mdx +++ b/docs/self-hosting/environment-variables/analytics.zh-CN.mdx @@ -32,44 +32,30 @@ tags: ## Google Analytics -### `ENABLE_GOOGLE_ANALYTICS` - -- 类型:必选 -- 描述:用于配置 Google Analytics 的环境变量,当设为 `1` 时开启 Google Analytics -- 默认值: `-` -- 示例:`1` - ### `GOOGLE_ANALYTICS_MEASUREMENT_ID` - 类型:必选 -- 描述:Google Analytics 的 Measurement ID,如果开启了 Google Analytics,此项必填 +- 描述:Google Analytics 的 Measurement ID,填写此项后将自动开启 Google Analytics - 默认值: `-` - 示例:`G-63LP2TV03T` ## Posthog Analytics -### `NEXT_PUBLIC_ANALYTICS_POSTHOG` - -- 类型:可选 -- 描述:用于开启 [PostHog Analytics][posthog-analytics-url] 的环境变量,设为 `1` 时开启 PostHog Analytics -- 默认值: `-` -- 示例:`1` +### `POSTHOG_KEY` -### `NEXT_PUBLIC_POSTHOG_KEY` - -- 类型:可选 -- 描述:设置 PostHog 项目 Key +- 类型:必选 +- 描述:设置 PostHog 项目 Key,设置此项后将自动开启 PostHog Analytics - 默认值: `-` - 示例:`phc_xxxxxxxx` -### `NEXT_PUBLIC_POSTHOG_HOST` +### `POSTHOG_HOST` - 类型:可选 -- 描述:设置 PostHog 服务的部署地址,默认为官方的 SAAS 地址 +- 描述:设置 PostHog 服务的部署地址,默认为官方的 SaaS 地址 - 默认值:`https://app.posthog.com` - 示例:`https://example.com` -### `NEXT_PUBLIC_POSTHOG_DEBUG` +### `POSTHOG_DEBUG` - 类型:可选 - 描述:开启 PostHog 的调试模式 @@ -78,26 +64,19 @@ tags: ## Umami Analytics -### `NEXT_PUBLIC_ANALYTICS_UMAMI` +### `UMAMI_WEBSITE_ID` -- 类型:可选 -- 描述:用于开启 [Umami Analytics][umami-analytics-url] 的环境变量,设为 `1` 时开启 Umami Analytics -- 默认值: `-` -- 示例:`1` +- 类型:必选 +- 描述:你的 Umami 的 Website ID,填写此项后将自动开启 Umami Analytics +- 默认值:`-` +- 示例:`E738D82A-EE9E-4806-A81F-0CA3CAE57F65` -### `NEXT_PUBLIC_UMAMI_SCRIPT_URL` +### `UMAMI_SCRIPT_URL` - 类型:可选 - 描述:Umami 脚本的网址,默认为 Umami Cloud 提供的脚本网址 - 默认值:`https://analytics.umami.is/script.js` - 示例:`https://umami.your-site.com/script.js` -### `NEXT_PUBLIC_UMAMI_WEBSITE_ID` - -- 类型:必选 -- 描述:你的 Umami 的 Website ID -- 默认值:`-` -- 示例:`E738D82A-EE9E-4806-A81F-0CA3CAE57F65` - [posthog-analytics-url]: https://posthog.com [umami-analytics-url]: https://umami.is diff --git a/docs/self-hosting/environment-variables/basic.mdx b/docs/self-hosting/environment-variables/basic.mdx index 1ed7dce56236..b6f0342e91ff 100644 --- a/docs/self-hosting/environment-variables/basic.mdx +++ b/docs/self-hosting/environment-variables/basic.mdx @@ -36,7 +36,7 @@ LobeChat provides some additional configuration options during deployment, which When using the `random` mode, a random API Key will be selected from the available multiple API Keys. -When using the `turn` mode, the API Keys will be retrieved in a round-robin manner according to the specified order. +When using the `turn` mode, the API Keys will be retrieved in a polling manner according to the specified order. ### `NEXT_PUBLIC_BASE_PATH` @@ -50,7 +50,7 @@ When using the `turn` mode, the API Keys will be retrieved in a round-robin mann - Type: Optional - Description: Used to configure the default settings for the LobeChat default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, and more. - Default: - -- Example: `'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer` +- Example: `'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer'` The `DEFAULT_AGENT_CONFIG` is used to configure the default settings for the LobeChat default agent. It supports various data types and structures, including key-value pairs, nested fields, array values, and more. The table below provides detailed information on the configuration options, examples, and corresponding explanations for the `DEFAULT_AGENT_CONFIG` environment variable: @@ -61,8 +61,8 @@ The `DEFAULT_AGENT_CONFIG` is used to configure the default settings for the Lob | Array | `plugins=search-engine,lobe-image-designer` | Enable the `search-engine` and `lobe-image-designer` plugins. | | Chinese Comma | `plugins=search-engine,lobe-image-designer` | Same as above, demonstrating support for Chinese comma separation. | | Multiple Configurations | `model=glm-4;provider=zhipu` | Set the model to `glm-4` and the model provider to `zhipu`. | -| Numeric Value | `params.max_tokens=300` | Set the maximum tokens to `300`. | -| Boolean Value | `enableAutoCreateTopic=true` | Enable automatic topic creation. | +| Numeric Value | `params.max_tokens=300`, `chatConfig.historyCount=5` | Set the maximum tokens to `300`, Set the number of historical messages to 5. | +| Boolean Value | `chatConfig.enableAutoCreateTopic=true`, `chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | Enable automatic topic creation, History length compression threshold, number of historical records. | | Special Characters | `inputTemplate="Hello; I am a bot;"` | Set the input template to `Hello; I am a bot;`. | | Error Handling | `model=gpt-4;maxToken` | Ignore invalid entry `maxToken` and only parse `model=gpt-4`. | | Value Override | `model=gpt-4;model=gpt-4-1106-preview` | If a key is repeated, use the value that appears last; in this case, the value of `model` is `gpt-4-1106-preview`. | @@ -71,6 +71,15 @@ Further reading: - [[RFC] 022 - Default Assistant Parameters Configuration via Environment Variables](https://github.com/lobehub/lobe-chat/discussions/913) +### `FEATURE_FLAGS` + +- Type: Optional +- Description: Used to control LobeChat's feature functionalities. Supports multiple feature flags, using `+` to add a feature and `-` to disable a feature. Separate multiple feature flags with a comma `,` and enclose the entire value in quotes `"` to avoid parsing errors. +- Default: `-` +- Example: `"-welcome_suggest"` + +For specific content, please refer to the [Feature Flags](/docs/self-hosting/advanced/feature-flags) documentation. + ## Plugin Service ### `PLUGINS_INDEX_URL` diff --git a/docs/self-hosting/environment-variables/basic.zh-CN.mdx b/docs/self-hosting/environment-variables/basic.zh-CN.mdx index 61bfc55a28de..ab6812211970 100644 --- a/docs/self-hosting/environment-variables/basic.zh-CN.mdx +++ b/docs/self-hosting/environment-variables/basic.zh-CN.mdx @@ -32,7 +32,7 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境 使用 `random` 模式下,将在多个 API Keys 中随机获取一个 API Key。 -使用 `turn` 模式下,将按照填写的顺序,轮训获取得到 API Key。 +使用 `turn` 模式下,将按照填写的顺序,轮询获取得到 API Key。 ### `NEXT_PUBLIC_BASE_PATH` @@ -46,7 +46,7 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境 - 类型:可选 - 描述:用于配置 LobeChat 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。 - 默认值:`-` -- 示例:`'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer` +- 示例:`'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer'` `DEFAULT_AGENT_CONFIG` 用于配置 LobeChat 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。下表详细说明了 `DEFAULT_AGENT_CONFIG` 环境变量的配置项、示例以及相应解释: @@ -57,8 +57,8 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境 | 数组 | `plugins=search-engine,lobe-image-designer` | 启用 `search-engine` 和 `lobe-image-designer` 插件。 | | 中文逗号 | `plugins=search-engine,lobe-image-designer` | 同上,演示支持中文逗号分隔。 | | 多个配置项 | `model=glm-4;provider=zhipu` | 设置模型为 `glm-4` 且模型服务商为 `zhipu`。 | -| 数字值 | `params.max_tokens=300` | 设置最大令牌数为 `300`。 | -| 布尔值 | `enableAutoCreateTopic=true` | 启用自动创建主题。 | +| 数字值 | `params.max_tokens=300`, `chatConfig.historyCount=5` | 设置最大令牌数为 `300`,设置历史消息条数为5。 | +| 布尔值 | `chatConfig.enableAutoCreateTopic=true`,`chatConfig.enableCompressThreshold=true`, `chatConfig.enableHistoryCount=true` | 启用自动创建主题,历史长度压缩阈值,历史记录条数。 | | 特殊字符 | `inputTemplate="Hello; I am a bot;"` | 设置输入模板为 `Hello; I am a bot;`。 | | 错误处理 | `model=gpt-4;maxToken` | 忽略无效条目 `maxToken`,仅解析出 `model=gpt-4`。 | | 值覆盖 | `model=gpt-4;model=gpt-4-1106-preview` | 如果键重复,使用最后一次出现的值,此处 `model` 的值为 `gpt-4-1106-preview`。 | @@ -67,6 +67,15 @@ LobeChat 在部署时提供了一些额外的配置项,你可以使用环境 - [[RFC] 022 - 环境变量配置默认助手参数](https://github.com/lobehub/lobe-chat/discussions/913) +### `FEATURE_FLAGS` + +- 类型:可选 +- 描述:用于控制 LobeChat 的特性功能,支持多个功能标志,使用 `+` 增加一个功能,使用 `-` 来关闭一个功能,多个功能标志之间使用英文逗号 `,` 隔开,最外层建议添加引号 `"` 以避免解析错误。 +- 默认值:`-` +- 示例:`"-welcome_suggest"` + +具体的内容可以参见 [特性标志](/zh/docs/self-hosting/advanced/feature-flags) 中的说明。 + ## 插件服务 ### `PLUGINS_INDEX_URL` diff --git a/docs/self-hosting/environment-variables/model-provider.mdx b/docs/self-hosting/environment-variables/model-provider.mdx index a23b940b4202..515b6d6b7263 100644 --- a/docs/self-hosting/environment-variables/model-provider.mdx +++ b/docs/self-hosting/environment-variables/model-provider.mdx @@ -15,6 +15,13 @@ When deploying LobeChat, a rich set of environment variables related to model se ## OpenAI +### `ENABLED_OPENAI` + +- Type:Optional +- Description:Enables OpenAI as a model provider by default, turns off the OpenAI service when set to `0` +- Default:`1` +- Example:`0` + ### `OPENAI_API_KEY` - Type: Required @@ -125,6 +132,13 @@ If you need to use Azure OpenAI to provide model services, you can refer to the ## AWS Bedrock +### `ENABLED_AWS_BEDROCK` + +- Type:Optional +- Description:Enables AWS Bedrock as a model provider by default, turns on the AWS Bedrock service when set to `1` +- Default:`0` +- Example:`1` + ### `AWS_ACCESS_KEY_ID` - Type: Required @@ -146,6 +160,15 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Default: `us-east-1` - Example: `us-east-1` +## DeepSeek AI + +### `DEEPSEEK_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the DeepSeek AI service +- Default: - +- Example: `sk-xxxxxx...xxxxxx` + ## OpenRouter AI ### `OPENROUTER_API_KEY` @@ -153,7 +176,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied for in the OpenRouter AI service - Default: - -- Example: `sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=` +- Example: `sk-or-v1-xxxxxx...xxxxxx=` ### `OPENROUTER_MODEL_LIST` @@ -169,7 +192,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied for in the TogetherAI service - Default: - -- Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- Example: `xxxxxx...xxxxxx` ### `TOGETHERAI_MODEL_LIST` @@ -180,6 +203,13 @@ If you need to use Azure OpenAI to provide model services, you can refer to the ## Ollama +### `ENABLED_OLLAMA` + +- Type:Optional +- Description:Enables Ollama as a model provider by default, turns off the Ollama service when set to `0` +- Default:`1` +- Example:`0` + ### `OLLAMA_PROXY_URL` - Type: Required @@ -210,7 +240,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied from Perplexity AI - Default: - -- Example: `pplx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- Example: `pplx-xxxxxx...xxxxxx` ## Minimax AI @@ -219,7 +249,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied for in the Minimax AI service - Default: - -- Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- Example: `xxxxxx...xxxxxx` ## Mistral AI @@ -228,7 +258,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied for in the Mistral AI service - Default: - -- Example: `xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=` +- Example: `xxxxxx...xxxxxx=` ## Groq AI @@ -237,7 +267,7 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied from Groq AI - Default: - -- Example: `gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- Example: `gsk_xxxxxx...xxxxxx` ## ZHIPU AI @@ -255,6 +285,15 @@ If you need to use Azure OpenAI to provide model services, you can refer to the - Type: Required - Description: This is the API key you applied for in the 01.AI service - Default: - -- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- Example:`xxxxxx...xxxxxx` + +## Qwen + +### `QWEN_API_KEY` + +- Type: Required +- Description: This is the DashScope API key you can obtain from Alibaba Cloud +- Default: - +- Example:`sk-xxxxx...xxxxx` [model-list]: /docs/self-hosting/advanced/model-list diff --git a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx index 0e716da21fe7..bf84641ecc5a 100644 --- a/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +++ b/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx @@ -15,6 +15,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, ## OpenAI +### `ENABLED_OPENAI` + +- 类型:可选 +- 描述:默认启用 OpenAI 作为模型供应商,当设为 0 时关闭 OpenAI 服务 +- 默认值:`1` +- 示例:`0` + ### `OPENAI_API_KEY` - 类型:必选 @@ -123,6 +130,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, ## AWS Bedrock +### `ENABLED_AWS_BEDROCK` + +- 类型:可选 +- 描述:当设为 1 时启用 AWS Bedrock 服务 +- 默认值:`0` +- 示例:`1` + ### `AWS_ACCESS_KEY_ID` - 类型:必选 @@ -144,6 +158,15 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 默认值:`us-east-1` - 示例:`us-east-1` +## DeepSeek AI + +### `DEEPSEEK_API_KEY` + +- 类型:必选 +- 描述:这是你在 DeepSeek AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`sk-xxxxxx...xxxxxx` + ## OpenRouter AI ### `OPENROUTER_API_KEY` @@ -151,7 +174,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 OpenRouter AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`sk-or-v1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=` +- 示例:`sk-or-v1-xxxxxx...xxxxxx=` ### `OPENROUTER_MODEL_LIST` @@ -167,7 +190,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 TogetherAI 服务中申请的 API 密钥 - 默认值:- -- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- 示例:`xxxxxx...xxxxxx` ### `TOGETHERAI_MODEL_LIST` @@ -178,6 +201,13 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, ## Ollama +### `ENABLED_OLLAMA` + +- 类型:可选 +- 描述:默认启用 Ollama 作为模型供应商,当设为 0 时关闭 Ollama 服务 +- 默认值:`1` +- 示例:`0` + ### `OLLAMA_PROXY_URL` - 类型:必选 @@ -208,7 +238,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 Perplexity AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`pplx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- 示例:`pplx-xxxxxx...xxxxxx` ## Minimax AI @@ -217,7 +247,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 Minimax AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- 示例:`xxxxxx...xxxxxx` ## Mistral AI @@ -226,7 +256,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 Mistral AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=` +- 示例:`xxxxxx...xxxxxx=` ## Groq AI @@ -235,7 +265,7 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在 Groq AI 服务中申请的 API 密钥 - 默认值:- -- 示例:`gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- 示例:`gsk_xxxxxx...xxxxxx` ## 智谱 AI @@ -253,6 +283,15 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量, - 类型:必选 - 描述:这是你在零一万物服务中申请的 API 密钥 - 默认值:- -- 示例:`xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx` +- 示例:`xxxxxx...xxxxxx` [model-list]: /docs/self-hosting/advanced/model-list + +## 通义千问 + +### `QWEN_API_KEY` + +- 类型:必选 +- 描述:这是你在阿里云百炼平台上获取的 DashScope API 密钥 +- 默认值:- +- 示例:`sk-xxxxx...xxxxx` diff --git a/docs/self-hosting/examples/ollama.mdx b/docs/self-hosting/examples/ollama.mdx index 2f1b15003ade..94569c104503 100644 --- a/docs/self-hosting/examples/ollama.mdx +++ b/docs/self-hosting/examples/ollama.mdx @@ -40,13 +40,13 @@ When you first initiate Ollama, it is configured to allow access only from the l ### Ollama Environment Variables -| Environment Variable | Description | Default Value | Additional Information | -| -------------------- | ----------------------------------- | --------------------------------------------------- | ---------------------------------------------------- | -| `OLLAMA_HOST` | Specifies the host and port for binding | "127.0.0.1:11434" | Use "0.0.0.0:port" to make the service accessible from any machine | -| `OLLAMA_ORIGINS` | Comma-separated list of permitted cross-origin sources | Restricted to local access | Set to "*" to avoid CORS, please set on demand | -| `OLLAMA_MODELS` | Path to the directory where models are located | "~/.ollama/models" or "/usr/share/ollama/.ollama/models" | Can be customized based on requirements | -| `OLLAMA_KEEP_ALIVE` | Duration that the model stays loaded in GPU memory | "5m" | Dynamically loading and unloading models can reduce GPU load but may increase disk I/O | -| `OLLAMA_DEBUG` | Enable additional debugging logs by setting to 1 | Typically disabled | | +| Environment Variable | Description | Default Value | Additional Information | +| --- | --- | --- | --- | +| `OLLAMA_HOST` | Specifies the host and port for binding | "127.0.0.1:11434" | Use "0.0.0.0:port" to make the service accessible from any machine | +| `OLLAMA_ORIGINS` | Comma-separated list of permitted cross-origin sources | Restricted to local access | Set to "\*" to avoid CORS, please set on demand | +| `OLLAMA_MODELS` | Path to the directory where models are located | "~/.ollama/models" or "/usr/share/ollama/.ollama/models" | Can be customized based on requirements | +| `OLLAMA_KEEP_ALIVE` | Duration that the model stays loaded in GPU memory | "5m" | Dynamically loading and unloading models can reduce GPU load but may increase disk I/O | +| `OLLAMA_DEBUG` | Enable additional debugging logs by setting to 1 | Typically disabled | | ### Setting environment variables on Windows @@ -64,10 +64,10 @@ If Ollama is run as a macOS application, environment variables should be set usi 1. For each environment variable, call `launchctl setenv`. - ```bash - launchctl setenv OLLAMA_HOST "0.0.0.0" - launchctl setenv OLLAMA_ORIGINS "*" - ``` + ```bash + launchctl setenv OLLAMA_HOST "0.0.0.0" + launchctl setenv OLLAMA_ORIGINS "*" + ``` 2. Restart Ollama application. @@ -77,25 +77,25 @@ If Ollama is run as a systemd service, environment variables should be set using 1. Edit the systemd service by calling `sudo systemctl edit ollama.service`. - ```bash - sudo systemctl edit ollama.service - ``` + ```bash + sudo systemctl edit ollama.service + ``` 2. For each environment variable, add a line `Environment` under section `[Service]`: - ```bash - [Service] - Environment="OLLAMA_HOST=0.0.0.0" - Environment="OLLAMA_ORIGINS=*" - ``` + ```bash + [Service] + Environment="OLLAMA_HOST=0.0.0.0" + Environment="OLLAMA_ORIGINS=*" + ``` 3. Save and exit. 4. Reload `systemd` and restart Ollama: - ```bash - sudo systemctl daemon-reload - sudo systemctl restart ollama - ``` + ```bash + sudo systemctl daemon-reload + sudo systemctl restart ollama + ``` ### Setting environment variables on Docker diff --git a/docs/self-hosting/examples/ollama.zh-CN.mdx b/docs/self-hosting/examples/ollama.zh-CN.mdx index 5f55fcfa24b9..65deaac62943 100644 --- a/docs/self-hosting/examples/ollama.zh-CN.mdx +++ b/docs/self-hosting/examples/ollama.zh-CN.mdx @@ -38,13 +38,13 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 ### Ollama 环境变量 -| 环境变量 | 描述 | 默认值 | 附加说明 | -| ---------- | -------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `OLLAMA_HOST` | 绑定的主机和端口 | "127.0.0.1:11434" | 设置 0.0.0.0:端口号 可以指定所有人访问特定端口 | -| `OLLAMA_ORIGINS` | 允许的跨域源列表,逗号分隔 | 仅本地访问 | 设置 "*" 可以避免 CORS 跨域错误,按需设置 | -| `OLLAMA_MODELS` | 模型存放的路径 | "~/.ollama/models" 或 "/usr/share/ollama/.ollama/models" | 按需指定 | -| `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间 | "5m" | 按需加载和释放显存可以有效降低显卡压力,但会增加硬盘读写 | -| `OLLAMA_DEBUG` | 设置为 1 以启用额外的调试日志 | 默认关闭 | | +| 环境变量 | 描述 | 默认值 | 附加说明 | +| --- | --- | --- | --- | +| `OLLAMA_HOST` | 绑定的主机和端口 | "127.0.0.1:11434" | 设置 0.0.0.0:端口号 可以指定所有人访问特定端口 | +| `OLLAMA_ORIGINS` | 允许的跨域源列表,逗号分隔 | 仅本地访问 | 设置 "\*" 可以避免 CORS 跨域错误,按需设置 | +| `OLLAMA_MODELS` | 模型存放的路径 | "~/.ollama/models" 或 "/usr/share/ollama/.ollama/models" | 按需指定 | +| `OLLAMA_KEEP_ALIVE` | 模型在显存中保持加载的持续时间 | "5m" | 按需加载和释放显存可以有效降低显卡压力,但会增加硬盘读写 | +| `OLLAMA_DEBUG` | 设置为 1 以启用额外的调试日志 | 默认关闭 | | ### 在 Windows 上设置环境变量 @@ -62,10 +62,10 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 1. 对于每个环境变量,调用 `launchctl setenv`。 - ```bash - launchctl setenv OLLAMA_HOST "0.0.0.0" - launchctl setenv OLLAMA_ORIGINS "*" - ``` + ```bash + launchctl setenv OLLAMA_HOST "0.0.0.0" + launchctl setenv OLLAMA_ORIGINS "*" + ``` 2. 重启 Ollama 应用程序。 @@ -75,29 +75,28 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 1. 通过调用`sudo systemctl edit ollama.service`编辑 systemd 服务。 - ```bash - sudo systemctl edit ollama.service - ``` + ```bash + sudo systemctl edit ollama.service + ``` 2. 对于每个环境变量,在`[Service]`部分下添加`Environment`: - ```bash - [Service] - Environment="OLLAMA_HOST=0.0.0.0" - Environment="OLLAMA_ORIGINS=*" - ``` + ```bash + [Service] + Environment="OLLAMA_HOST=0.0.0.0" + Environment="OLLAMA_ORIGINS=*" + ``` 3. 保存并退出。 4. 重载`systemd`并重启 Ollama: - ```bash - sudo systemctl daemon-reload - sudo systemctl restart ollama - ``` + ```bash + sudo systemctl daemon-reload + sudo systemctl restart ollama + ``` ### 在 Docker 上设置环境变量 如果 Ollama 作为 Docker 容器运行,你可以将环境变量添加到 `docker run` 命令中。 详细配置方法可以参考 [Ollama 官方文档](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server)。 - diff --git a/docs/self-hosting/platform/docker-compose.zh-CN.mdx b/docs/self-hosting/platform/docker-compose.zh-CN.mdx index e91f2378b464..fe06700610d0 100644 --- a/docs/self-hosting/platform/docker-compose.zh-CN.mdx +++ b/docs/self-hosting/platform/docker-compose.zh-CN.mdx @@ -67,7 +67,6 @@ services: OPENAI_API_KEY: sk-xxxx OPENAI_PROXY_URL: https://api-proxy.com/v1 ACCESS_CODE: lobe66 - ``` 运行以下命令启动 Lobe Chat 服务: @@ -92,7 +91,7 @@ output=$(docker pull lobehub/lobe-chat:latest 2>&1) # Check if the pull command was executed successfully if [ $? -ne 0 ]; then -exit 1 + exit 1 fi # Check if the output contains a specific string @@ -100,7 +99,7 @@ echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest" # If the image is already up to date, do nothing if [ $? -eq 0 ]; then -exit 0 + exit 0 fi echo "Detected Lobe-Chat update" diff --git a/docs/self-hosting/platform/vercel.mdx b/docs/self-hosting/platform/vercel.mdx index 7aaebb95aef3..a521cf70d63d 100644 --- a/docs/self-hosting/platform/vercel.mdx +++ b/docs/self-hosting/platform/vercel.mdx @@ -41,6 +41,6 @@ Vercel's assigned domain DNS may be polluted in some regions, so binding a custo If you have deployed your project using the one-click deployment steps mentioned above, you may find that you are always prompted with "updates available." This is because Vercel creates a new project for you by default instead of forking this project, which causes the inability to accurately detect updates. - We recommend following the [Self-Hosting Upstream Sync](/docs/self-hosting/advanced/upstream-sync) steps to - Redeploy. + We recommend following the [Self-Hosting Upstream Sync](/docs/self-hosting/advanced/upstream-sync) + steps to Redeploy. diff --git a/docs/self-hosting/platform/vercel.zh-CN.mdx b/docs/self-hosting/platform/vercel.zh-CN.mdx index b775a960da5e..0ebd204c0e00 100644 --- a/docs/self-hosting/platform/vercel.zh-CN.mdx +++ b/docs/self-hosting/platform/vercel.zh-CN.mdx @@ -40,7 +40,8 @@ Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名 如果你根据上述中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。 - 我们建议按照 [📘 LobeChat 自部署保持更新](/docs/self-hosting/advanced/upstream-sync) 步骤重新部署。 + 我们建议按照 [📘 LobeChat 自部署保持更新](/docs/self-hosting/advanced/upstream-sync) + 步骤重新部署。 [deploy-button-image]: https://vercel.com/button diff --git a/docs/self-hosting/platform/zeabur.mdx b/docs/self-hosting/platform/zeabur.mdx index e880a86d67ce..d6a4705a3e4b 100644 --- a/docs/self-hosting/platform/zeabur.mdx +++ b/docs/self-hosting/platform/zeabur.mdx @@ -35,3 +35,50 @@ You can use the subdomain provided by Zeabur, or choose to bind a custom domain. [deploy-button-image]: https://zeabur.com/button.svg [deploy-link]: https://zeabur.com/templates/VZGGTI + +# Deploy LobeChat with Zeabur as serverless function + +> Note: There are still issues with [middlewares and rewrites of next.js on Zeabur](https://github.com/lobehub/lobe-chat/pull/2775?notification_referrer_id=NT_kwDOAdi2DrQxMDkyODQ4MDc2NTozMDk3OTU5OA#issuecomment-2146713899), use at your own risk! + +Since Zeabur does NOT officially support FREE users deploy containerized service, you may wish to deploy LobeChat as a serverless function service. To deploy LobeChat as a serverless function service on Zeabur, you can follow the steps below: + +## Zeabur Deployment Process + + + +### Fork LobeChat + +### Add Zeabur pack config file + +Add a `zbpack.json` configuration file with the following content to the root dir of your fork: + +```json +{ + "ignore_dockerfile": true, + "serverless": true +} +``` + +### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### Login to your [Zeabur dashboard](https://dash.zeabur.com) + +If you do not already have an account, you will need to register one. + +### Create a project and service + +Create a project, then create a service under this project. + +### Link your fork of LobeChat to the just created Zeabur service. + +When adding service, choose github. This may triger a oAuth depend on varies factors like how you login to Zeabur and if you have already authorized Zeabur to access all your repos + +### Bind a custom domain (optional) + +You can create a subdomain provided by Zeabur, or choose to bind a custom domain. Currently, the domains provided by Zeabur have not been contaminated, and most regions can connect directly. + +### Zeabur shall start auto build and you should be able to access it by the domain of your choice after a while. + + diff --git a/docs/self-hosting/platform/zeabur.zh-CN.mdx b/docs/self-hosting/platform/zeabur.zh-CN.mdx index 441820eaaacf..00ee9aa46375 100644 --- a/docs/self-hosting/platform/zeabur.zh-CN.mdx +++ b/docs/self-hosting/platform/zeabur.zh-CN.mdx @@ -34,3 +34,50 @@ tags: [deploy-button-image]: https://zeabur.com/button.svg [deploy-link]: https://zeabur.com/templates/VZGGTI + +# 使用 Zeabur 将 LobeChat 部署为无服务器函数 + +> **注意:** 仍然存在关于 [Zeabur 上 next.js 的中间件和重写问题](https://github.com/lobehub/lobe-chat/pull/2775?notification_referrer_id=NT_kwDOAdi2DrQxMDkyODQ4MDc2NTozMDk3OTU5OA#issuecomment-2146713899),请自担风险! + +由于 Zeabur 并未官方支持免费用户部署容器化服务,您可能希望将 LobeChat 部署为无服务器函数服务。要在 Zeabur 上将 LobeChat 部署为无服务器函数服务,您可以按照以下步骤操作: + +## Zeabur 部署流程 + + + +### Fork LobeChat + +### 添加 Zeabur 打包配置文件 + +在您的分支的根目录下添加一个 `zbpack.json` 配置文件,内容如下: + +```json +{ + "ignore_dockerfile": true, + "serverless": true +} +``` + +### 准备您的 OpenAI API 密钥 + +前往 [OpenAI API 密钥](https://platform.openai.com/account/api-keys) 获取您的 OpenAI API 密钥。 + +### 登录到您的 [Zeabur 仪表板](https://dash.zeabur.com) + +如果您尚未拥有一个账号,您需要注册一个。 + +### 创建项目与服务。 + +创建一个项目,并再这个项目下新建一个服务。 + +### 将您的 LobeChat 分支链接到刚创建的 Zeabur 服务。 + +在添加服务时,选择 github。这可能会触发一个 oAuth,取决于诸如您如何登录到 Zeabur以及您是否已经授权 Zeabur 访问所有您的存储库等各种因素。 + +### 绑定自定义域名(可选) + +您可以创建 Zeabur 提供的子域名,或选择绑定自定义域名。目前,Zeabur 提供的域名尚未受到污染,大多数地区可以直接连接。 + +### Zeabur 将开始自动构建,您应该可以在一段时间后通过您选择的域名访问它。 + + diff --git a/docs/usage/agents/prompt.mdx b/docs/usage/agents/prompt.mdx index 8afb34462b91..6d38cf6b787e 100644 --- a/docs/usage/agents/prompt.mdx +++ b/docs/usage/agents/prompt.mdx @@ -57,7 +57,7 @@ The second prompt generates longer output and better structure. The use of the t - **Be Clear About Your Needs:** The model's output will strive to meet your needs, so if your needs are not clear, the output may not meet expectations. - **Use Correct Grammar and Spelling:** The model will try to mimic your language style, so if your language style is problematic, the output may also be problematic. - **Provide Sufficient Contextual Information:** The model will generate output based on the contextual information you provide, so if the information is insufficient, it may not produce the desired results. - + After formulating effective prompts for discussing issues, you now need to refine the generated results. This may involve adjusting the output to fit constraints such as word count or combining concepts from different generated results. diff --git a/docs/usage/agents/prompt.zh-CN.mdx b/docs/usage/agents/prompt.zh-CN.mdx index d3d48180b5f7..31578925bf49 100644 --- a/docs/usage/agents/prompt.zh-CN.mdx +++ b/docs/usage/agents/prompt.zh-CN.mdx @@ -53,7 +53,7 @@ tags: - **尽量明确你的需求:** 模型的输出会尽可能满足你的需求,所以如果你的需求不明确,输出可能会不如预期。 - **使用正确的语法和拼写:** 模型会尽可能模仿你的语言风格,所以如果你的语言风格有问题,输出可能也会有问题。 - **提供足够的上下文信息:** 模型会根据你提供的上下文信息生成输出,所以如果你提供的上下文信息不足,可能无法生成你想要的结果。 - + 在为讨论问题制定有效的提示后,您现在需要细化生成的结果。这可能涉及到调整输出以符合诸如字数等限制,或将不同生成的结果的概念组合在一起。 diff --git a/docs/usage/features/auth.mdx b/docs/usage/features/auth.mdx new file mode 100644 index 000000000000..ba9afb971952 --- /dev/null +++ b/docs/usage/features/auth.mdx @@ -0,0 +1,65 @@ +--- +title: Support Multi-User Management - Identity Verification Solutions +description: >- + Explore LobeChat's user authentication solutions with next-auth and Clerk for + flexible and secure user management. Learn about features like user + registration, session management, multi-factor authentication, and more. +tags: + - Multi-User Management + - Identity Verification + - next-auth + - Clerk + - User Authentication + - Session Management + - Multi-Factor Authentication + - User Management +--- + +# Support Multi-User Management + +{'Identity + +In modern applications, user management and identity verification are essential functions. To meet the diverse needs of different users, LobeChat provides two main user authentication and management solutions: `next-auth` and `Clerk`. Whether you are looking for simple user registration and login or need advanced multi-factor authentication and user management, LobeChat can flexibly accommodate your requirements. + +## next-auth: Flexible and Powerful Identity Verification Library + +LobeChat integrates `next-auth`, a flexible and powerful identity verification library that supports various authentication methods, including OAuth, email login, and credential login. With `next-auth`, you can easily achieve the following functions: + +- **User Registration and Login**: Support various authentication methods to meet different user needs. +- **Session Management**: Efficiently manage user sessions to ensure security. +- **Social Login**: Support quick login via various social platforms. +- **Data Security**: Ensure the security and privacy of user data. + + + Due to workload constraints, integration of next-auth with a server-side database has not been + implemented yet. If you need to use a server-side database, please use Clerk. + + + + For information on using Next-Auth, you can refer to [Authentication Services - Next + Auth](/docs/self-hosting/advanced/authentication#next-auth). + + +## Clerk: Modern User Management Platform + +For users requiring advanced user management features, LobeChat also supports [Clerk](https://clerk.com), a modern user management platform. Clerk offers richer functionality to help you achieve higher security and flexibility: + +- **Multi-Factor Authentication (MFA)**: Provides higher security protection. +- **User Profile Management**: Conveniently manage user information and configurations. +- **Login Activity Monitoring**: Real-time monitoring of user login activities to ensure account security. +- **Scalability**: Supports complex user management requirements. + + + For information on using Clerk, you can refer to [Authentication Services - + Clerk](/docs/self-hosting/advanced/authentication#clerk) . + + + + If you need to use Clerk in conjunction with a server-side database, you can refer to the + "Configuring Authentication Services" section in [Deploying with a Server-Side + Database](/docs/self-hosting/advanced/server-database). + diff --git a/docs/usage/features/auth.zh-CN.mdx b/docs/usage/features/auth.zh-CN.mdx new file mode 100644 index 000000000000..983c0c7b4dc7 --- /dev/null +++ b/docs/usage/features/auth.zh-CN.mdx @@ -0,0 +1,60 @@ +--- +title: 多用户管理支持 +description: LobeChat 提供了多种用户认证和管理方案,以满足不同用户的需求。 +tags: + - LobeChat + - 用户管理 + - next-auth + - Clerk + - 身份验证 + - 多因素认证 +--- + +# 身份验证系统 / 多用户管理支持 + +{'身份验证系统'} + +在现代应用中,用户管理和身份验证是至关重要的功能。为满足不同用户的多样化需求,LobeChat 提供了两种主要的用户认证和管理方案:`next-auth` 和 `Clerk`。无论您是追求简便的用户注册登录,还是需要更高级的多因素认证和用户管理,LobeChat 都可以灵活实现。 + +## next-auth:灵活且强大的身份验证库 + +LobeChat 集成了 `next-auth`,一个灵活且强大的身份验证库,支持多种身份验证方式,包括 OAuth、邮件登录、凭证登录等。通过 `next-auth`,您可以轻松实现以下功能: + +- **用户注册和登录**:支持多种认证方式,满足不同用户的需求。 +- **会话管理**:高效管理用户会话,确保安全性。 +- **社交登录**:支持多种社交平台的快捷登录。 +- **数据安全**:保障用户数据的安全性和隐私性。 + + + 由于工作量原因,目前还没有实现 next-auth 与服务端数据库的集成,如果需要使用服务端数据库,请使用 + Clerk 。 + + + + 关于 Next-Auth 的使用,可以查阅 [身份验证服务 - Next + Auth](/zh/docs/self-hosting/advanced/authentication#next-auth)。 + + +## Clerk:现代化用户管理平台 + +对于需要更高级用户管理功能的用户,LobeChat 还支持 [Clerk](https://clerk.com) ,一个现代化的用户管理平台。Clerk 提供了更丰富的功能,帮助您实现更高的安全性和灵活性: + +- **多因素认证 (MFA)**:提供更高的安全保障。 +- **用户配置文件管理**:便捷管理用户信息和配置。 +- **登录活动监控**:实时监控用户登录活动,确保账户安全。 +- **扩展性**:支持复杂的用户管理需求。 + + + 关于 Clerk 的使用,可以查阅 [身份验证服务 - + Clerk](/zh/docs/self-hosting/advanced/authentication#clerk)。 + + + + 如果需要在服务端数据库中搭配使用 Clerk 的使用,可以查阅 + [使用服务端数据库部署](/zh/docs/self-hosting/advanced/server-database) + 中的「配置身份验证服务」部分。 + diff --git a/docs/usage/features/database.mdx b/docs/usage/features/database.mdx new file mode 100644 index 000000000000..83ef17bd15a5 --- /dev/null +++ b/docs/usage/features/database.mdx @@ -0,0 +1,60 @@ +--- +title: Local / Cloud Database Solutions for LobeChat +description: >- + Explore the options of local and server-side databases for LobeChat, offering + data control, privacy protection, and convenient user experiences. +tags: + - Local Database + - Server-Side Database + - Data Privacy + - Data Control + - CRDT Technology + - PostgreSQL + - Dirzzle ORM + - Clerk Authentication +--- + +# Local / Cloud Database + +{'Local + +In modern application development, the choice of data storage solution is crucial. To meet the needs of different users, LobeChat offers flexible configurations that support both local and server-side databases. Whether you prioritize data privacy and control or seek a convenient user experience, LobeChat can provide excellent solutions for you. + +## Local Database: Data Control and Privacy Protection + +For users who prefer more control over their data and value privacy protection, LobeChat offers support for local databases. By using IndexedDB as the storage solution and combining it with dexie as an Object-Relational Mapping (ORM) tool, LobeChat achieves efficient data management. + +Additionally, we have introduced Conflict-Free Replicated Data Type (CRDT) technology to ensure a seamless multi-device synchronization experience. This experimental feature aims to provide users with greater autonomy and data security. + + + LobeChat defaults to the local database solution to reduce the onboarding cost for new users. + + +Furthermore, we have attempted to introduce CRDT technology to achieve cross-device synchronization based on the local database. This experimental feature aims to provide users with greater autonomy and data security. + +## Server-Side Database: Convenient and Efficient User Experience + +For users who seek a convenient user experience, LobeChat supports PostgreSQL as the server-side database. By managing data with Dirzzle ORM and combining it with Clerk for authentication, LobeChat can offer users an efficient and reliable server-side data management solution. + +### Server-Side Database Technology Stack + +- **DB**: PostgreSQL (Neon is the default) +- **ORM**: Dirzzle ORM +- **Auth**: Clerk +- **Server Router**: tRPC + +## Deployment Solution Selection Guide + +### 1. Local Database + +The local database solution is suitable for users who wish to have strict control over their data. With LobeChat's support for local databases, you can securely store and manage data without relying on external servers. This solution is particularly suitable for users with high requirements for data privacy. + +### 2. Server-Side Database + +The server-side database solution is ideal for users who want to simplify data management processes and enjoy a convenient user experience. Through server-side databases and user authentication, LobeChat can ensure the security and efficiency of data. If you want to learn how to configure a server-side database, please refer to our [detailed documentation](/docs/self-hosting/advanced/server-database). + +Whether you choose a local database or a server-side database, LobeChat can provide you with an excellent user experience. diff --git a/docs/usage/features/database.zh-CN.mdx b/docs/usage/features/database.zh-CN.mdx new file mode 100644 index 000000000000..5716320b5ff1 --- /dev/null +++ b/docs/usage/features/database.zh-CN.mdx @@ -0,0 +1,54 @@ +--- +title: LobeChat 支持本地 / 云端数据库存储 +description: LobeChat 支持本地 / 云端数据存储,既能实现 Local First,同时支持数据云同步。 +tags: + - LobeChat + - IndexedDB + - Postgres + - Local First + - 数据云同步 + - 数据库 +--- + +# 本地 / 云端数据存储 + +{'本地 + +在现代应用开发中,数据存储方案的选择至关重要。为了满足不同用户的需求,LobeChat 提供了同时支持本地数据库和服务端数据库的灵活配置。无论您是注重数据隐私与掌控,还是追求便捷的使用体验,LobeChat 都能为您提供卓越的解决方案。 + +## 本地数据库:数据掌控与隐私保护 + +对于希望对数据有更多掌控感和隐私保护的用户,LobeChat 提供了本地数据库支持。采用 IndexedDB 作为存储解决方案,并结合 dexie 作为 ORM(对象关系映射),LobeChat 实现了高效的数据管理。 + +同时,我们引入了 CRDT(Conflict-Free Replicated Data Type)技术,确保多端同步功能的无缝体验。这一实验性功能旨在为用户提供更高的自主性和数据安全性。 + +LobeChat 默认采取本地数据库方案,以降低新用户的上手成本。 + +此外,我们尝试引入了 CRDT(Conflict-Free Replicated Data Type)技术,在本地数据库基础上实现了跨端同步。这一实验性功能旨在为用户提供更高的自主性和数据安全性。 + +## 服务端数据库:便捷与高效的使用体验 + +对于追求便捷使用体验的用户,LobeChat 支持 PostgreSQL 作为服务端数据库。通过 Dirzzle ORM 管理数据,结合 Clerk 进行身份验证,LobeChat 能够为用户提供高效、可靠的服务端数据管理方案。 + +### 服务端数据库技术栈 + +- **DB**: PostgreSQL(默认使用 Neon) +- **ORM**: Dirzzle ORM +- **Auth**: Clerk +- **Server Router**: tRPC + +## 部署方案选择指南 + +### 1. 本地数据库 + +本地数据库方案适用于那些希望对数据进行严格控制的用户。通过 LobeChat 的本地数据库支持,您可以在不依赖外部服务器的情况下,安全地存储和管理数据。这一方案特别适合对数据隐私有高要求的用户。 + +### 2. 服务端数据库 + +服务端数据库方案则适合那些希望简化数据管理流程,享受便捷使用体验的用户。通过服务端数据库与用户身份验证,LobeChat 能够确保数据的安全性与高效性。如果您希望了解如何配置服务端数据库,请参考我们的[详细文档](/zh/docs/self-hosting/advanced/server-database)。 + +无论选择本地数据库还是服务端数据库,LobeChat 都能为你提供卓越的用户体验。 diff --git a/docs/usage/features/local-llm.mdx b/docs/usage/features/local-llm.mdx index 3675b1cdd89e..a84df3c9374f 100644 --- a/docs/usage/features/local-llm.mdx +++ b/docs/usage/features/local-llm.mdx @@ -49,3 +49,8 @@ Compared to cloud-based solutions, a local LLM provides higher privacy and secur ### Embark on Your LobeChat & Ollama AI Journey Now, let's embark on this exciting journey together! Through the collaboration of LobeChat and Ollama AI, explore the endless possibilities brought by AI. Whether you are a tech enthusiast or simply curious about AI communication, LobeChat will offer you an unprecedented experience. + + + + + diff --git a/docs/usage/features/local-llm.zh-CN.mdx b/docs/usage/features/local-llm.zh-CN.mdx index 2f0d251372af..79be6b46ddb3 100644 --- a/docs/usage/features/local-llm.zh-CN.mdx +++ b/docs/usage/features/local-llm.zh-CN.mdx @@ -41,3 +41,8 @@ docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 ### 开启您的 LobeChat & Ollama AI 之旅 现在,就让我们一起开启这段激动人心的旅程吧!通过 LobeChat 与 Ollama AI 的协作,探索 AI 带来的无限可能。无论您是技术爱好者,还是对 AI 交流充满好奇,LobeChat 都将为您提供一场前所未有的体验。 + + + + + diff --git a/docs/usage/features/multi-ai-providers.mdx b/docs/usage/features/multi-ai-providers.mdx index 92951c42a7fa..c212badb2601 100644 --- a/docs/usage/features/multi-ai-providers.mdx +++ b/docs/usage/features/multi-ai-providers.mdx @@ -45,6 +45,8 @@ We have implemented support for the following model service providers: - **01.AI (Yi Model)**: Integrated the 01.AI models, with series of APIs featuring fast inference speed, which not only shortened the processing time, but also maintained excellent model performance. [Learn more](https://01.ai/) - **Together.ai**: Over 100 leading open-source Chat, Language, Image, Code, and Embedding models are available through the Together Inference API. For these models you pay just for what you use. [Learn more](https://www.together.ai/) - **Minimax**: Integrated the Minimax models, including the MoE model **abab6**, offers a broader range of choices. [Learn more](https://www.minimaxi.com/) +- **DeepSeek**: Integrated with the DeepSeek series models, an innovative AI startup from China, The product has been designed to provide a model that balances performance with price. [Learn more](https://www.deepseek.com/) +- **Qwen**: Integrated with the Qwen series models, including the latest **qwen-turbo**, **qwen-plus** and **qwen-max**. [Learn more](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction) At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284). @@ -57,3 +59,8 @@ At the same time, we are also planning to support more model service providers, /> To meet the specific needs of users, LobeChat also supports the use of local models based on [Ollama](https://ollama.ai), allowing users to flexibly use their own or third-party models. For more details, see [Local Model Support](/docs/usage/features/local-llm). + + + + + diff --git a/docs/usage/features/multi-ai-providers.zh-CN.mdx b/docs/usage/features/multi-ai-providers.zh-CN.mdx index 388ef8731b9b..f8605365c269 100644 --- a/docs/usage/features/multi-ai-providers.zh-CN.mdx +++ b/docs/usage/features/multi-ai-providers.zh-CN.mdx @@ -45,6 +45,8 @@ tags: - **Groq**:接入了 Groq 的 AI 模型,高效处理消息序列,生成回应,胜任多轮对话及单次交互任务。[了解更多](https://groq.com/) - **OpenRouter**:其支持包括 **Claude 3**,**Gemma**,**Mistral**,**Llama2**和**Cohere**等模型路由,支持智能路由优化,提升使用效率,开放且灵活。[了解更多](https://openrouter.ai/) - **Minimax**: 接入了 Minimax 的 AI 模型,包括 MoE 模型 **abab6**,提供了更多的选择空间。[了解更多](https://www.minimaxi.com/) +- **DeepSeek**: 接入了 DeepSeek 的 AI 模型,包括最新的 **DeepSeek-V2**,提供兼顾性能与价格的模型。[了解更多](https://www.deepseek.com/) +- **Qwen (通义千问)**: 接入了 Qwen 的 AI 模型,包括最新的 **qwen-turbo**,**qwen-plus** 和 **qwen-max** 等模型。[了解更多](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction) 同时,我们也在计划支持更多的模型服务商,如 Replicate 和 Perplexity 等,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的[社区讨论](https://github.com/lobehub/lobe-chat/discussions/1284)。 @@ -57,3 +59,8 @@ tags: /> 为了满足特定用户的需求,LobeChat 还基于 [Ollama](https://ollama.ai) 支持了本地模型的使用,让用户能够更灵活地使用自己的或第三方的模型,详见 [本地模型支持](/docs/usage/features/local-llm)。 + + + + + diff --git a/docs/usage/features/plugin-system.zh-CN.mdx b/docs/usage/features/plugin-system.zh-CN.mdx index 8afc27a1f990..8883494c4926 100644 --- a/docs/usage/features/plugin-system.zh-CN.mdx +++ b/docs/usage/features/plugin-system.zh-CN.mdx @@ -40,7 +40,8 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地 ## 插件生态体系 - 如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指南](/docs/usage/plugins/development)。 + 如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 + 插件开发指南](/docs/usage/plugins/development)。 - [lobe-chat-plugins][lobe-chat-plugins]:这是 LobeChat 的插件索引。它从该仓库的 index.json 中获取插件列表并显示给用户。 diff --git a/docs/usage/features/pwa.mdx b/docs/usage/features/pwa.mdx index 67e78b419b66..606093d61c6c 100644 --- a/docs/usage/features/pwa.mdx +++ b/docs/usage/features/pwa.mdx @@ -28,7 +28,8 @@ If you are unfamiliar with the installation process of PWA, you can follow the s ## Running on Chrome / Edge - On macOS, when using a Chrome-installed PWA, it is required that Chrome be open, otherwise Chrome will automatically open and then launch the PWA app. + On macOS, when using a Chrome-installed PWA, it is required that Chrome be open, otherwise Chrome + will automatically open and then launch the PWA app. @@ -62,7 +63,7 @@ Safari PWA requires macOS Ventura or later. The PWA installed by Safari does not - The default installed LobeChat PWA icon has a black background, you can use cmd + i to paste the following image to replace it with a white background. + The default installed LobeChat PWA icon has a black background, you can use cmd + i to paste the following image to replace it with a white background. - macOS 下,使用 Chrome 安装的 PWA 时,必须要求 Chrome 是打开状态,否则会自动打开 Chrome 再打开 PWA 应用。 + macOS 下,使用 Chrome 安装的 PWA 时,必须要求 Chrome 是打开状态,否则会自动打开 Chrome 再打开 PWA + 应用。 @@ -62,7 +63,7 @@ Safari PWA 需要 macOS Ventura 或更高版本。Safari 安装的 PWA 并不要 - 默认安装的 LobeChat PWA 图标是黑色背景的,您可以在自行使用 cmd + i 粘贴如下图片替换为白色背景的。 + 默认安装的 LobeChat PWA 图标是黑色背景的,您可以在自行使用 cmd + i 粘贴如下图片替换为白色背景的。 - + Discover how LobeChat offers diverse AI conversation options by supporting + multiple model providers, providing flexibility and a wide range of choices + for users and developers. +tags: + - LobeChat + - AI Conversations + - Model Providers + - Diversity + - Flexibility + - Google AI + - ChatGLM + - Moonshot AI + - 01 AI + - Together AI + - Ollama +--- + +# Using Multiple Model Providers in LobeChat + +{'Multiple + +In the continuous development of LobeChat, we deeply understand the importance of diversity in model providers for providing AI conversation services to meet the needs of the community. Therefore, we have expanded our support to multiple model providers instead of being limited to a single one, in order to offer users a more diverse and rich selection of conversation options. + +This approach allows LobeChat to adapt more flexibly to different user needs and provides developers with a wider range of choices. + +## Tutorial on Using Model Providers + + diff --git a/docs/usage/providers.zh-CN.mdx b/docs/usage/providers.zh-CN.mdx new file mode 100644 index 000000000000..83abd4c92931 --- /dev/null +++ b/docs/usage/providers.zh-CN.mdx @@ -0,0 +1,34 @@ +--- +title: 在 LobeChat 中使用多模型服务商 +description: 了解 LobeChat 在多模型服务商支持方面的最新进展,包括已支持的模型服务商和计划中的扩展,以及本地模型支持的使用方式。 +tags: + - LobeChat + - AI 会话服务 + - 模型服务商 + - 多模型支持 + - 本地模型支持 + - AWS Bedrock + - Google AI + - ChatGLM + - Moonshot AI + - 01 AI + - Together AI + - Ollama +--- + +# 在 LobeChat 中使用多模型服务商 + +{'多模型服务商支持'} + +在 LobeChat 的不断发展过程中,我们深刻理解到在提供 AI 会话服务时模型服务商的多样性对于满足社区需求的重要性。因此,我们不再局限于单一的模型服务商,而是拓展了对多种模型服务商的支持,以便为用户提供更为丰富和多样化的会话选择。 + +通过这种方式,LobeChat 能够更灵活地适应不同用户的需求,同时也为开发者提供了更为广泛的选择空间。 + +## 模型服务商使用教程 + + diff --git a/docs/usage/providers/01ai.mdx b/docs/usage/providers/01ai.mdx new file mode 100644 index 000000000000..406a2dc7632a --- /dev/null +++ b/docs/usage/providers/01ai.mdx @@ -0,0 +1,85 @@ +--- +title: Using Zero One AI in LobeChat +description: >- + Learn how to integrate and use Zero One AI in LobeChat with step-by-step + instructions. Obtain an API key, configure Zero One AI, and start + conversations with AI models. +tags: + - 01.AI + - Zero One AI + - Web UI + - API key + - AI models +--- + +# Using Zero One AI in LobeChat + +{'Using + +[Zero One AI](https://www.01.ai/) is a global company dedicated to AI 2.0 large model technology and applications. Its billion-parameter Yi-Large closed-source model, when evaluated on Stanford University's English ranking AlpacaEval 2.0, is on par with GPT-4. + +This document will guide you on how to use Zero One AI in LobeChat: + + + +### Step 1: Obtain Zero One AI API Key + +- Register and log in to the [Zero One AI Large Model Open Platform](https://platform.lingyiwanwu.com/) +- Go to the `Dashboard` and access the `API Key Management` menu +- A system-generated API key has been created for you automatically, or you can create a new one on this interface + +{'Create + +- Account verification is required for first-time use + +{'Complete + +- Click on the created API key +- Copy and save the API key in the pop-up dialog box + +{'Save + +### Step 2: Configure Zero One AI in LobeChat + +- Access the `Settings` interface in LobeChat +- Find the setting for `Zero One AI` under `Language Model` + +{'Enter + +- Open Zero One AI and enter the obtained API key +- Choose a 01.AI model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to Zero One AI's relevant + fee policies. + + + + +You can now use the models provided by Zero One AI for conversations in LobeChat. diff --git a/docs/usage/providers/01ai.zh-CN.mdx b/docs/usage/providers/01ai.zh-CN.mdx new file mode 100644 index 000000000000..7caaef6d8d71 --- /dev/null +++ b/docs/usage/providers/01ai.zh-CN.mdx @@ -0,0 +1,85 @@ +--- +title: 在 LobeChat 中使用 01.AI 零一万物 +description: >- + 学习如何在 LobeChat 中配置并使用 01.AI 零一万物提供的 AI 模型进行对话。获取 API 密钥、填入设置项、选择模型,开始与 AI + 助手交流。 +tags: + - LobeChat + - 01.AI + - Zero One AI + - 零一万物 + - Web UI + - API密钥 + - 配置指南 +--- + +# 在 LobeChat 中使用零一万物 + +{'在 + +[零一万物](https://www.01.ai/)是一家致力于AI 2.0大模型技术和应用的全球公司,其发布的千亿参数的Yi-Large闭源模型,在斯坦福大学的英语排行AlpacaEval 2.0上,与GPT-4互有第一。 + +本文档将指导你如何在 LobeChat 中使用零一万物: + + + +### 步骤一:获取零一万物 API 密钥 + +- 注册并登录 [零一万物大模型开放平台](https://platform.lingyiwanwu.com/) +- 进入`工作台`并访问`API Key管理`菜单 +- 系统已为你自动创建了一个 API 密钥,你也可以在此界面创建新的 API 密钥 + +{'创建零一万物 + +- 初次使用时需要完成账号认证 + +{'完成账号认证'} + +- 点击创建好的 API 密钥 +- 在弹出的对话框中复制并保存 API 密钥 + +{'保存 + +### 步骤二:在LobeChat 中配置零一万物 + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`零一万物`的设置项 + +{'填入 + +- 打开零一万物并填入获得的 API 密钥 +- 为你的 AI 助手选择一个 01.AI 的模型即可开始对话 + +{'选择01.AI模型并开始对话'} + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考零一万物的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用零一万物提供的模型进行对话了。 diff --git a/docs/usage/providers/anthropic.mdx b/docs/usage/providers/anthropic.mdx new file mode 100644 index 000000000000..f613634cda22 --- /dev/null +++ b/docs/usage/providers/anthropic.mdx @@ -0,0 +1,78 @@ +--- +title: Using Anthropic Claude in LobeChat +description: >- + Learn how to integrate Anthropic Claude API in LobeChat to enhance your AI + assistant capabilities. Support Claude 3.5 sonnet / Claude 3 Opus / Claude 3 + haiku +tags: + - Anthropic Claude + - API Key + - AI assistant + - Web UI +--- + +# Using Anthropic Claude in LobeChat + +{'Using + +The Anthropic Claude API is now available for everyone to use. This document will guide you on how to use [Anthropic Claude](https://www.anthropic.com/api) in LobeChat: + + + +### Step 1: Obtain Anthropic Claude API Key + +- Create an [Anthropic Claude API](https://www.anthropic.com/api) account. +- Get your [API key](https://console.anthropic.com/settings/keys). + +{'Create + + + The Claude API currently offers $5 of free credits, but it is only available in certain specific + countries/regions. You can go to Dashboard > Claim to see if it is applicable to your + country/region. + + +- Set up your billing for the API key to work on [https://console.anthropic.com/settings/plans](https://console.anthropic.com/settings/plans) (choose the "Build" plan so you can add credits and only pay for usage). + +{'Set + +### Step 2: Configure Anthropic Claude in LobeChat + +- Access the `Settings` interface in LobeChat. +- Find the setting for `Anthropic Claude` under `Language Models`. + +{'Enter + +- Enter the obtained API key. +- Choose an Anthropic Claude model for your AI assistant to start the conversation. + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to Anthropic Claude's + relevant pricing policies. + + + + +You can now engage in conversations using the models provided by Anthropic Claude in LobeChat. diff --git a/docs/usage/providers/anthropic.zh-CN.mdx b/docs/usage/providers/anthropic.zh-CN.mdx new file mode 100644 index 000000000000..101d34edbf67 --- /dev/null +++ b/docs/usage/providers/anthropic.zh-CN.mdx @@ -0,0 +1,75 @@ +--- +title: 在 LobeChat 中使用 Anthropic Claude +description: >- + 学习如何在 LobeChat 中配置和使用 Anthropic Claude API, Claude 3.5 sonnet / Claude 3 Opus + / Claude 3 haiku +tags: + - Anthropic Claude + - API + - WebUI + - AI助手 +--- + +# 在 LobeChat 中使用 Anthropic Claude + +{'在 + +Anthropic Claude API 现在可供所有人使用, 本文档将指导你如何在 LobeChat 中使用 [Anthropic Claude](https://www.anthropic.com/api): + + + +### 步骤一:获取 Anthropic Claude API 密钥 + +- 创建一个 [Anthropic Claude API](https://www.anthropic.com/api) 帐户 +- 获取您的 [API 密钥](https://console.anthropic.com/settings/keys) + +{'创建 + + + Claude API 现在提供 5 美元的免费积分,但是,它仅适用于某些特定国家/地区,您可以转到 Dashboard > + Claim 查看它是否适用于您所在的国家/地区。 + + +- 设置您的账单,让 API 密钥在 https://console.anthropic.com/settings/plans 上工作(选择“生成”计划,以便您可以添加积分并仅为使用量付费) + +{'设置您的账单'} + +### 步骤二:在 LobeChat 中配置 Anthropic Claude + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`Anthropic Claude`的设置项 + +{'填入 + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Anthropic Claude 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Anthropic Claude 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Anthropic Claude 提供的模型进行对话了。 diff --git a/docs/usage/providers/azure.mdx b/docs/usage/providers/azure.mdx new file mode 100644 index 000000000000..728edc593706 --- /dev/null +++ b/docs/usage/providers/azure.mdx @@ -0,0 +1,88 @@ +--- +title: Using Azure OpenAI in LobeChat +description: >- + Learn how to integrate and configure Azure OpenAI in LobeChat to enhance your + AI assistant capabilities. Follow these steps to obtain the API key, configure + the settings, and start engaging in conversations. +tags: + - Azure OpenAI + - AI assistant + - API key + - Configuration + - Conversation models +--- + +# Using Azure OpenAI in LobeChat + +{'Azure + +This document will guide you on how to use [Azure OpenAI](https://oai.azure.com/) in LobeChat: + + + +### Step 1: Obtain Azure OpenAI API Key + +- If you haven't registered yet, you need to create an [Azure OpenAI account](https://oai.azure.com/). + +{'Create + +- After registration, go to the `Deployments` page and create a new deployment with your selected model. + +![Create a new deployment with the selected model](https://github.com/lobehub/lobe-chat/assets/17870709/4fae3e6f-e680-4471-93c4-987c19d7170a) + +{'Create + +- Navigate to the `Chat` page and click on `View Code` to obtain your endpoint and key. + +{'Go + +{'Get + +### Step 2: Configure Azure OpenAI in LobeChat + +- Access the `Settings` interface in LobeChat. +- Find the setting for `Azure OpenAI` under `Language Model`. + +{'Enter + +- Enter the API key you obtained. +- Choose an Azure OpenAI model for your AI assistant to start the conversation. + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to Azure OpenAI's + relevant pricing policies. + + + + +Now you can engage in conversations using the models provided by Azure OpenAI in LobeChat. diff --git a/docs/usage/providers/azure.zh-CN.mdx b/docs/usage/providers/azure.zh-CN.mdx new file mode 100644 index 000000000000..a8edbc2f964f --- /dev/null +++ b/docs/usage/providers/azure.zh-CN.mdx @@ -0,0 +1,79 @@ +--- +title: 在 LobeChat 中使用 Azure OpenAI +description: 学习如何在 LobeChat 中配置和使用 Azure OpenAI 模型进行对话,包括获取 API 密钥和选择模型。 +tags: + - Azure OpenAI + - API Key + - Web UI +--- + +# 在 LobeChat 中使用 Azure OpenAI + +{'在 + +本文档将指导你如何在 LobeChat 中使用 [Azure OpenAI](https://oai.azure.com/): + + + +### 步骤一:获取 Azure OpenAI API 密钥 + +- 如果尚未注册,则必须注册 [Azure OpenAI 帐户](https://oai.azure.com/)。 + +{'注册 + +- 注册完毕后,转到 `Deployments` 页面,然后使用您选择的模型创建新部署。 + +{'选择的模型创建新部署'} + +- 转到 `Chat` 页面,然后单击 `View Code` 以获取您的终结点和密钥。 + +{'转到 +{'获取终结点和密钥'} + +### 步骤二:在 LobeChat 中配置 Azure OpenAI + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`Azure OpenAI`的设置项 + +{'填入 + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Azure OpenAI 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Azure OpenAI 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Azure OpenAI 提供的模型进行对话了。 diff --git a/docs/usage/providers/bedrock.mdx b/docs/usage/providers/bedrock.mdx new file mode 100644 index 000000000000..326dc537e195 --- /dev/null +++ b/docs/usage/providers/bedrock.mdx @@ -0,0 +1,139 @@ +--- +title: Using Amazon Bedrock in LobeChat +description: >- + Learn how to integrate Amazon Bedrock models into LobeChat for AI-powered + conversations. Follow these steps to grant access, obtain API keys, and + configure Amazon Bedrock. +tags: + - Amazon Bedrock + - Claude 3.5 sonnect + - API keys + - Claude 3 Opus + - Web UI +--- + +# Using Amazon Bedrock in LobeChat + +{'Using + +Amazon Bedrock is a fully managed foundational model API service that allows users to access models from leading AI companies (such as AI21 Labs, Anthropic, Cohere, Meta, Stability AI) and Amazon's own foundational models. + +This document will guide you on how to use Amazon Bedrock in LobeChat: + + +### Step 1: Grant Access to Amazon Bedrock Models in AWS + +- Access and log in to the [AWS Console](https://console.aws.amazon.com/) +- Search for `bedrock` and enter the `Amazon Bedrock` service + +{'Enter + +- Select `Models access` from the left menu + +{'Access + +- Open model access permissions based on your needs + +{'Open + +Some models may require additional information from you + +### Step 2: Obtain API Access Keys + +- Continue searching for IAM in the AWS console and enter the IAM service + +{'Enter + +- In the `Users` menu, create a new IAM user + +{'Create + +- Enter the user name in the pop-up dialog box + +{'Enter + +- Add permissions for this user or join an existing user group to ensure access to Amazon Bedrock + +{'Add + +- Create an access key for the added user + +{'Create + +- Copy and securely store the access key and secret access key, as they will be needed later + +{'Enter + + + Please securely store the keys as they will only be shown once. If you lose them accidentally, you + will need to create a new access key. + + +### Step 3: Configure Amazon Bedrock in LobeChat + +- Access the `Settings` interface in LobeChat +- Find the setting for `Amazon Bedrock` under `Language Models` and open it + +{'Enter + +- Open Amazon Bedrock and enter the obtained access key and secret access key +- Choose an Amazon Bedrock model for your assistant to start the conversation + +{'Select + + + You may incur charges while using the API service, please refer to Amazon Bedrock's pricing + policy. + + + + +You can now engage in conversations using the models provided by Amazon Bedrock in LobeChat. diff --git a/docs/usage/providers/bedrock.zh-CN.mdx b/docs/usage/providers/bedrock.zh-CN.mdx new file mode 100644 index 000000000000..2397913af93e --- /dev/null +++ b/docs/usage/providers/bedrock.zh-CN.mdx @@ -0,0 +1,134 @@ +--- +title: 在 LobeChat 中使用 Amazon Bedrock +description: 学习如何在 LobeChat 中配置和使用 Amazon Bedrock,一个完全托管的基础模型API服务,以便开始对话。 +tags: + - Amazon Bedrock + - Claude 3.5 sonnect + - API keys + - Claude 3 Opus + - Web UI +--- + +# 在 LobeChat 中使用 Amazon Bedrock + +{'在 + +Amazon Bedrock 是一个完全托管的基础模型API服务,允许用户通过API访问来自领先AI公司(如AI21 Labs、Anthropic、Cohere、Meta、Stability AI)和Amazon自家的基础模型。 + +本文档将指导你如何在 LobeChat 中使用 Amazon Bedrock: + + +### 步骤一:在 AWS 中打开 Amazon Bedrock 模型的访问权限 + +- 访问并登录 [AWS Console](https://console.aws.amazon.com/) +- 搜索 beckrock 并进入 `Amazon Bedrock` 服务 + +{'进入 + +- 在左侧菜单中选择 `Models acess` + +{'进入 + +- 根据你所需要的模型,打开模型访问权限 + +{'打开模型访问权限'} + +某些模型可能需要你提供额外的信息 + +### 步骤二:获取 API 访问密钥 + +- 继续在 AWS console 中搜索 IAM,进入 IAM 服务 + +{'进入 + +- 在 `用户` 菜单中,创建一个新的 IAM 用户 + +{'创建一个新的 + +- 在弹出的对话框中,输入用户名称 + +{'输入用户名称'} + +- 为这个用户添加权限,或者加入一个已有的用户组,确保用户拥有 Amazon Bedrock 的访问权限 + +{'为用户添加权限'} + +- 为已添加的用户创建访问密钥 + +{'创建访问密钥'} + +- 复制并妥善保存访问密钥以及秘密访问密钥,后续将会用到 + +{'进入 + + + 请安全地存储密钥,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新访问密钥。 + + +### 步骤三:在 LobeChat 中配置 Amazon Bedrock + +- 访问LobeChat的`设置`界面 +- 在`语言模型`下找到`Amazon Bedrock`的设置项并打开 + +{'LobeChat + +- 打开 Amazon Bedrock 并填入获得的访问密钥与秘密访问密钥 +- 为你的助手选择一个 Amazone Bedrock 的模型即可开始对话 + +{' + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Amazon Bedrock 的费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Amazone Bedrock 提供的模型进行对话了。 diff --git a/docs/usage/providers/deepseek.mdx b/docs/usage/providers/deepseek.mdx new file mode 100644 index 000000000000..60dd80a7ad6a --- /dev/null +++ b/docs/usage/providers/deepseek.mdx @@ -0,0 +1,90 @@ +--- +title: Using DeepSeek in LobeChat +description: >- + Learn how to use DeepSeek-V2 in LobeChat, obtain API keys. Get started with + DeepSeek integration now! +tags: + - DeepSeek + - LobeChat + - DeepSeek-V2 + - API Key + - Web UI +--- + +# Using DeepSeek in LobeChat + +{'Using + +[DeepSeek](https://www.deepseek.com/) is an advanced open-source Large Language Model (LLM). The latest version, DeepSeek-V2, has made significant optimizations in architecture and performance, reducing training costs by 42.5% and inference costs by 93.3%. + +This document will guide you on how to use DeepSeek in LobeChat: + + + +### Step 1: Obtain DeepSeek API Key + +- First, you need to register and log in to the [DeepSeek](https://platform.deepseek.com/) open platform. + +New users will receive a free quota of 500M Tokens + +- Go to the `API keys` menu and click on `Create API Key`. + +{'Create + +- Enter the API key name in the pop-up dialog box. + +{'Enter + +- Copy the generated API key and save it securely. + +{'Save + + + Please store the key securely as it will only appear once. If you accidentally lose it, you will + need to create a new key. + + +### Step 2: Configure DeepSeek in LobeChat + +- Access the `App Settings` interface in LobeChat. +- Find the setting for `DeepSeek` under `Language Models`. + +{'Enter + +- Open DeepSeek and enter the obtained API key. +- Choose a DeepSeek model for your assistant to start the conversation. + +{'Select + + + You may need to pay the API service provider during usage, please refer to DeepSeek's relevant + pricing policies. + + + + +You can now engage in conversations using the models provided by Deepseek in LobeChat. diff --git a/docs/usage/providers/deepseek.zh-CN.mdx b/docs/usage/providers/deepseek.zh-CN.mdx new file mode 100644 index 000000000000..aeebaca13c1a --- /dev/null +++ b/docs/usage/providers/deepseek.zh-CN.mdx @@ -0,0 +1,85 @@ +--- +title: 在 LobeChat 中使用 DeepSeek +description: 学习如何在 LobeChat 中配置和使用 DeepSeek 语言模型,获取 API 密钥并开始对话。 +tags: + - LobeChat + - DeepSeek + - API密钥 + - Web UI +--- + +# 在 LobeChat 中使用 DeepSeek + +{'在 + +[DeepSeek](https://www.deepseek.com/) 是一款先进的开源大型语言模型(LLM)。最新版本 DeepSeek-V2 在架构和性能上进行了显著优化,同时训练成本降低了42.5%,推理成本降低了93.3%。 + +本文档将指导你如何在 LobeChat 中使用 DeepSeek: + + + +### 步骤一:获取 DeepSeek API 密钥 + +- 首先,你需要注册并登录 [DeepSeek](https://platform.deepseek.com/) 开放平台 + +当前新用户将会获赠 500M Tokens 的免费额度 + +- 进入 `API keys` 菜单,并点击 `创建 API Key` + +{'创建 + +- 在弹出的对话框中输入 API 密钥名称 + +{'填写 + +- 复制得到的 API 密钥并妥善保存 + +{'保存 + + + 请安全地存储密钥,因为它只会出现一次。如果你意外丢失它,您将需要创建一个新密钥。 + + +### 步骤二:在 LobeChat 中配置 DeepSeek + +- 访问 LobeChat 的 `应用设置`界面 +- 在 `语言模型` 下找到 `DeepSeek` 的设置项 + +{'填写 + +- 打开 DeepSeek 并填入获取的 API 密钥 +- 为你的助手选择一个 DeepSeek 模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 DeepSeek 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Deepseek 提供的模型进行对话了。 diff --git a/docs/usage/providers/gemini.mdx b/docs/usage/providers/gemini.mdx new file mode 100644 index 000000000000..87a71ef00b86 --- /dev/null +++ b/docs/usage/providers/gemini.mdx @@ -0,0 +1,82 @@ +--- +title: Using Google Gemini in LobeChat +description: >- + Learn how to integrate and utilize Google Gemini AI in LobeChat to enhance + your conversational experience. Follow these steps to configure Google Gemini + and start leveraging its powerful capabilities. +tags: + - Google Gemini + - AI integration + - Google AI Studio + - Web UI +--- + +# Using Google Gemini in LobeChat + +{'Using + +Gemini AI is a set of large language models (LLMs) created by Google AI, known for its cutting-edge advancements in multimodal understanding and processing. It is essentially a powerful artificial intelligence tool capable of handling various tasks involving different types of data, not just text. + +This document will guide you on how to use Google Gemini in LobeChat: + + + +### Step 1: Obtain Google API Key + +- Visit and log in to [Google AI Studio](https://aistudio.google.com/) +- Navigate to `Get API Key` in the menu and click on `Create API Key` + +{'Generate + +- Select a project and create an API key, or create one in a new project + +{'Enter + +- Copy the API key from the pop-up dialog + +{'Copy + +### Step 2: Configure OpenAI in LobeChat + +- Go to the `Settings` interface in LobeChat +- Find the setting for `Google Gemini` under `Language Models` + +{'Enter + +- Enable Google Gemini and enter the obtained API key +- Choose a Gemini model for your assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to Google Gemini's + pricing policy. + + + + +Congratulations! You can now use Google Gemini in LobeChat. diff --git a/docs/usage/providers/gemini.zh-CN.mdx b/docs/usage/providers/gemini.zh-CN.mdx new file mode 100644 index 000000000000..6712f59eb734 --- /dev/null +++ b/docs/usage/providers/gemini.zh-CN.mdx @@ -0,0 +1,78 @@ +--- +title: 在 LobeChat 中使用 Google Gemini +description: 本文将指导你如何在 LobeChat 中配置并使用 Google Gemini,一个由 Google AI 创建的强大语言模型。 +tags: + - Google Gemini + - Google AI + - API 密钥 + - Web UI +--- + +# 在 LobeChat 中使用 Google Gemini + +{'在 + +Gemini AI是由 Google AI 创建的一组大型语言模型(LLM),以其在多模式理解和处理方面的尖端进步而闻名。它本质上是一个强大的人工智能工具,可以处理涉及不同类型数据的各种任务,而不仅仅是文本。 + +本文档将指导你如何在 LobeChat 中使用 Google Gemini: + + + +### 步骤一:获取 Google 的 API 密钥 + +- 访问并登录 [Google AI Studio](https://aistudio.google.com/) +- 在 `获取 API 密钥` 菜单中 `创建 API 密钥` + +{'生成 + +- 选择一个项目并创建 API 密钥,或者在新项目中创建 API 密钥 + +{'输入 + +- 在弹出的对话框中复制 API 密钥 + +{'复制 + +### 步骤二:在 LobeChat 中配置OpenAI + +- 访问LobeChat的`设置`界面 +- 在`语言模型`下找到`Google Gemini`的设置项 + +{'LobeChat + +- 打开 Google Gemini 并填入获得的 API 密钥 +- 为你的助手选择一个 Gemini 的模型即可开始对话 + +{' + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Google Gemini 的费用政策。 + + + + +至此,你已经可以在 LobeChat 中使用 Google Gemini 啦。 diff --git a/docs/usage/providers/groq.mdx b/docs/usage/providers/groq.mdx index 0e9c35ce3a7b..18f2f6755eb9 100644 --- a/docs/usage/providers/groq.mdx +++ b/docs/usage/providers/groq.mdx @@ -1,27 +1,23 @@ --- title: Using Groq in LobeChat description: >- - Integrate Groq's LPU Inference Engine with LobeChat to accelerate large - language models. Learn how to obtain GroqCloud API keys and configure Groq in - LobeChat for optimal performance. + Learn how to obtain GroqCloud API keys and configure Groq in LobeChat for + optimal performance. tags: - - Groq - - LobeChat - - AI solutions - LPU Inference Engine - GroqCloud + - LLAMA3 + - Qwen2 - API keys - - Language Model + - Web UI --- -import { Callout, Steps } from 'nextra/components'; - # Using Groq in LobeChat {'Using Groq's [LPU Inference Engine](https://wow.groq.com/news_press/groq-lpu-inference-engine-leads-in-first-independent-llm-benchmark/) has excelled in the latest independent Large Language Model (LLM) benchmark, redefining the standard for AI solutions with its remarkable speed and efficiency. By integrating LobeChat with Groq Cloud, you can now easily leverage Groq's technology to accelerate the operation of large language models in LobeChat. diff --git a/docs/usage/providers/groq.zh-CN.mdx b/docs/usage/providers/groq.zh-CN.mdx index 6a66d40507b7..a0986ff3e586 100644 --- a/docs/usage/providers/groq.zh-CN.mdx +++ b/docs/usage/providers/groq.zh-CN.mdx @@ -1,15 +1,12 @@ --- title: 在 LobeChat 中使用 Groq -description: >- - 通过 LobeChat 与 Groq Cloud 的集成,利用 Groq 的技术加速大语言模型的运行。了解如何获取 GroqCloud API Key,并在 - LobeChat 中配置 Groq,体验 Groq 强大的性能。 +description: 了解如何获取 GroqCloud API Key,并在 LobeChat 中配置 Groq,体验 Groq 强大的性能。 tags: - - Groq - - LobeChat - - 大语言模型 - - AI 解决方案 + - LLAMA3 + - Qwen2 + - API keys + - Web UI - API Key - - GroqCloud --- # 在 LobeChat 中使用 Groq @@ -17,7 +14,7 @@ tags: {'在 Groq 的 [LPU 推理引擎](https://wow.groq.com/news_press/groq-lpu-inference-engine-leads-in-first-independent-llm-benchmark/) 在最新的独立大语言模型(LLM)基准测试中表现卓越,以其惊人的速度和效率重新定义了 AI 解决方案的标准。通过 LobeChat 与 Groq Cloud 的集成,你现在可以轻松地利用 Groq 的技术,在 LobeChat 中加速大语言模型的运行。 diff --git a/docs/usage/providers/minimax.mdx b/docs/usage/providers/minimax.mdx new file mode 100644 index 000000000000..63979aaf5a82 --- /dev/null +++ b/docs/usage/providers/minimax.mdx @@ -0,0 +1,87 @@ +--- +title: Using Minimax in LobeChat +description: >- + Learn how to use MiniMax in LobeChat to enhance AI conversations. Obtain + MiniMax API key, configure MiniMax in LobeChat settings, and select a model + for your AI assistant. +tags: + - MiniMax + - Web UI + - API Key + - MiniMax Models +--- + +# Using Minimax in LobeChat + +{'Using + +[MiniMax](https://www.minimaxi.com/) is a general artificial intelligence technology company founded in 2021, dedicated to co-creating intelligence with users. MiniMax has independently developed universal large models of different modalities, including trillion-parameter MoE text large models, speech large models, and image large models. They have also launched applications like Hai Luo AI. + +This document will guide you on how to use Minimax in LobeChat: + + + +### Step 1: Obtain MiniMax API Key + +- Register and log in to the [MiniMax Open Platform](https://www.minimaxi.com/platform) +- In `Account Management`, locate the `API Key` menu and create a new key + +{'Create + +- Enter a name for the API key and create it + +{'Enter + +- Copy the API key from the pop-up dialog box and save it securely + +{'Save + + + Please store the key securely as it will only appear once. If you accidentally lose it, you will + need to create a new key. + + +### Step 2: Configure MiniMax in LobeChat + +- Go to the `Settings` interface of LobeChat +- Find the setting for `MiniMax` under `Language Model` + +{'Enter + +- Open Minimax and enter the obtained API key +- Choose a MiniMax model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to MiniMax's relevant + pricing policies. + + + + +You can now use the models provided by MiniMax to have conversations in LobeChat. diff --git a/docs/usage/providers/minimax.zh-CN.mdx b/docs/usage/providers/minimax.zh-CN.mdx new file mode 100644 index 000000000000..aee3c783f469 --- /dev/null +++ b/docs/usage/providers/minimax.zh-CN.mdx @@ -0,0 +1,84 @@ +--- +title: 在 LobeChat 中使用 Minimax +description: >- + 学习如何在 LobeChat 中配置并使用 MiniMax 智能模型进行对话。获取 MiniMax API 密钥、配置步骤详解,开始与 MiniMax + 模型交互。 +tags: + - LobeChat + - MiniMax + - API密钥 + - Web UI +--- + +# 在 LobeChat 中使用 Minimax + +{'在 + +[MiniMax](https://www.minimaxi.com/) 是 2021 年成立的通用人工智能科技公司,致力于与用户共创智能。MiniMax 自主研发了不同模态的通用大模型,其中包括万亿参数的 MoE 文本大模型、语音大模型以及图像大模型。并推出了海螺 AI 等应用。 + +本文档将指导你如何在 LobeChat 中使用 Minimax: + + + +### 步骤一:获取 MiniMax API 密钥 + +- 注册并登录 [MiniMax 开放平台](https://www.minimaxi.com/platform) +- 在 `账户管理` 中找到 `接口密钥` 菜单,并创建新的密钥 + +{'创建 + +- 填写一个 API 密钥的名称并创建 + +{'填写 + +- 在弹出的对话框中复制 API 密钥,并妥善保存 + +{'保存 + + + 请安全地存储密钥,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新密钥。 + + +### 步骤二:在LobeChat 中配置 MiniMax + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`MiniMax`的设置项 + +{'填入 + +- 打开 Minimax 并填入获得的 API 密钥 +- 为你的 AI 助手选择一个 MiniMax 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 MiniMax 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 MiniMax 提供的模型进行对话了。 diff --git a/docs/usage/providers/mistral.mdx b/docs/usage/providers/mistral.mdx new file mode 100644 index 000000000000..b3d45ecff0ff --- /dev/null +++ b/docs/usage/providers/mistral.mdx @@ -0,0 +1,69 @@ +--- +title: Using Mistral AI in LobeChat +description: >- + Learn how to integrate Mistral AI into LobeChat for enhanced conversational + experiences. Follow the steps to configure Mistral AI and start using its + models. +tags: + - Mistral AI + - Web UI + - API key +--- + +# Using Mistral AI in LobeChat + +{'Using + +The Mistral AI API is now available for everyone to use. This document will guide you on how to use [Mistral AI](https://mistral.ai/) in LobeChat: + + + +### Step 1: Obtain Mistral AI API Key + +- Create a [Mistral AI](https://mistral.ai/) account +- Obtain your [API key](https://console.mistral.ai/user/api-keys/) + +{'Obtain + +### Step 2: Configure Mistral AI in LobeChat + +- Go to the `Settings` interface in LobeChat +- Find the setting for `Mistral AI` under `Language Model` + +{'Enter + + + If you are using mistral.ai, your account must have a valid subscription for the API key to work + properly. Newly created API keys may take 2-3 minutes to become active. If the "Test" button + fails, please retry after 2-3 minutes. + + +- Enter the obtained API key +- Choose a Mistral AI model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to Mistral AI's relevant + pricing policies. + + + + +You can now engage in conversations using the models provided by Mistral AI in LobeChat. diff --git a/docs/usage/providers/mistral.zh-CN.mdx b/docs/usage/providers/mistral.zh-CN.mdx new file mode 100644 index 000000000000..34eddb1c40b1 --- /dev/null +++ b/docs/usage/providers/mistral.zh-CN.mdx @@ -0,0 +1,64 @@ +--- +title: 在 LobeChat 中使用 Mistral AI +description: 学习如何在 LobeChat 中配置并使用 Mistral AI,包括获取 API 密钥和选择适合的 AI 模型进行对话。 +tags: + - Web UI + - Mistral AI + - API Key +--- + +# 在 LobeChat 中使用 Mistral AI + +{'在 + +Mistral AI API 现在可供所有人使用, 本文档将指导你如何在 LobeChat 中使用 [Mistral AI](https://mistral.ai/): + + + +### 步骤一:获取 Mistral AI API 密钥 + +- 创建一个 [Mistral AI](https://mistral.ai/) 帐户 +- 获取您的 [API 密钥](https://console.mistral.ai/user/api-keys/) + +{'创建 + +### 步骤二:在 LobeChat 中配置 Mistral AI + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`Mistral AI`的设置项 + +{'填入 + + + 如果您使用的是 mistral.ai,则您的帐户必须具有有效的订阅才能使 API 密钥正常工作。新创建的 API + 密钥需要 2-3 分钟才能开始工作。如果单击“测试”按钮但失败,请在 2-3 分钟后重试。 + + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Mistral AI 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Mistral AI 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Mistral AI 提供的模型进行对话了。 diff --git a/docs/usage/providers/moonshot.mdx b/docs/usage/providers/moonshot.mdx new file mode 100644 index 000000000000..347eb7a130f3 --- /dev/null +++ b/docs/usage/providers/moonshot.mdx @@ -0,0 +1,68 @@ +--- +title: Using Moonshot AI in LobeChat +description: >- + Learn how to integrate Moonshot AI into LobeChat for AI-powered conversations. + Follow the steps to get the API key, configure Moonshot AI, and start engaging + with AI models. +tags: + - Moonshot AI + - Web UI + - API Key +--- + +# Using Moonshot AI in LobeChat + +{'Using + +The Moonshot AI API is now available for everyone to use. This document will guide you on how to use [Moonshot AI](https://www.moonshot.cn/) in LobeChat: + + + +### Step 1: Get Moonshot AI API Key + +- Apply for your [API key](https://platform.moonshot.cn/console/api-keys) + +{'Apply + +### Step 2: Configure Moonshot AI in LobeChat + +- Visit the `Settings` interface in LobeChat +- Find the setting for `Moonshot AI` under `Language Models` + +{'Enter + + + If you are using mistral.ai, your account must have a valid subscription for the API key to work + properly. Newly created API keys may take 2-3 minutes to become active. If the "Test" button + fails, please retry after 2-3 minutes. + + +- Enter the API key you obtained +- Choose a Moonshot AI model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider according to Moonshot AI's related + pricing policies. + + + + +You can now engage in conversations using the models provided by Moonshot AI in LobeChat. diff --git a/docs/usage/providers/moonshot.zh-CN.mdx b/docs/usage/providers/moonshot.zh-CN.mdx new file mode 100644 index 000000000000..3f4af9c28600 --- /dev/null +++ b/docs/usage/providers/moonshot.zh-CN.mdx @@ -0,0 +1,63 @@ +--- +title: 在 LobeChat 中使用 Moonshot AI +description: 学习如何在 LobeChat 中配置和使用 Moonshot AI,包括获取 API 密钥和选择适合的 AI 模型进行对话。 +tags: + - Moonshot AI + - Web UI + - API Key +--- + +# 在 LobeChat 中使用 Moonshot AI + +{'在 + +Moonshot AI API 现在可供所有人使用, 本文档将指导你如何在 LobeChat 中使用 [Moonshot AI](https://www.moonshot.cn/): + + + +### 步骤一:获取 Moonshot AI API 密钥 + +- 申请您的 [API 密钥](https://platform.moonshot.cn/console/api-keys) + +{'申请 + +### 步骤二:在 LobeChat 中配置 Moonshot AI + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`Moonshot AI`的设置项 + +{'填入 + + + 如果您使用的是 mistral.ai,则您的帐户必须具有有效的订阅才能使 API 密钥正常工作。新创建的 API + 密钥需要 2-3 分钟才能开始工作。如果单击“测试”按钮但失败,请在 2-3 分钟后重试。 + + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Moonshot AI 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Moonshot AI 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Moonshot AI 提供的模型进行对话了。 diff --git a/docs/usage/providers/ollama.mdx b/docs/usage/providers/ollama.mdx index d2052397802b..2d7f03de2435 100644 --- a/docs/usage/providers/ollama.mdx +++ b/docs/usage/providers/ollama.mdx @@ -5,9 +5,10 @@ description: >- cutting-edge AI usage. tags: - Ollama - - LobeChat - Local LLM - Ollama WebUI + - Web UI + - API Key --- # Using Ollama in LobeChat @@ -16,7 +17,7 @@ tags: alt={'Using Ollama in LobeChat'} borderless cover - src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} + src={'https://github.com/lobehub/lobe-chat/assets/17870709/f579b39b-e771-402c-a1d1-620e57a10c75'} /> Ollama is a powerful framework for running large language models (LLMs) locally, supporting various language models including Llama 2, Mistral, and more. Now, LobeChat supports integration with Ollama, meaning you can easily enhance your application by using the language models provided by Ollama in LobeChat. diff --git a/docs/usage/providers/ollama.zh-CN.mdx b/docs/usage/providers/ollama.zh-CN.mdx index 07fda1c97a18..2b899b47dce2 100644 --- a/docs/usage/providers/ollama.zh-CN.mdx +++ b/docs/usage/providers/ollama.zh-CN.mdx @@ -3,7 +3,8 @@ title: 在 LobeChat 中使用 Ollama description: 了解如何在 LobeChat 中使用 Ollama ,在你的本地运行大型语言模型,获得最前沿的 AI 使用体验。 tags: - Ollama - - LobeChat + - Web UI + - API Key - Local LLM - Ollama WebUI --- @@ -14,7 +15,7 @@ tags: alt={'在 LobeChat 中使用 Ollama'} borderless cover - src={'https://github.com/lobehub/lobe-chat/assets/28616219/a2a091b8-ac45-4679-b5e0-21d711e17fef'} + src={'https://github.com/lobehub/lobe-chat/assets/17870709/f579b39b-e771-402c-a1d1-620e57a10c75'} /> Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 2, Mistral 等。现在,LobeChat 已经支持与 Ollama 的集成,这意味着你可以在 LobeChat 中轻松使用 Ollama 提供的语言模型来增强你的应用。 diff --git a/docs/usage/providers/ollama/gemma.mdx b/docs/usage/providers/ollama/gemma.mdx index 69df78b07e50..80997f15eb60 100644 --- a/docs/usage/providers/ollama/gemma.mdx +++ b/docs/usage/providers/ollama/gemma.mdx @@ -17,7 +17,7 @@ tags: {'Using [Gemma](https://blog.google/technology/developers/gemma-open-models/) is an open-source large language model (LLM) from Google, designed to provide a more general and flexible model for various natural language processing tasks. Now, with the integration of LobeChat and [Ollama](https://ollama.com/), you can easily use Google Gemma in LobeChat. diff --git a/docs/usage/providers/ollama/gemma.zh-CN.mdx b/docs/usage/providers/ollama/gemma.zh-CN.mdx index 6bcc70649065..40a201df5a6c 100644 --- a/docs/usage/providers/ollama/gemma.zh-CN.mdx +++ b/docs/usage/providers/ollama/gemma.zh-CN.mdx @@ -17,7 +17,7 @@ tags: alt={'在 LobeChat 中使用 Gemma'} cover rounded - src={'https://github.com/lobehub/lobe-chat/assets/28616219/e636cb41-5b7f-4949-a236-1cc1633bd223'} + src={'https://github.com/lobehub/lobe-chat/assets/17870709/65d2dd2a-fdcf-4f3f-a6af-4ed5164a510d'} /> [Gemma](https://blog.google/technology/developers/gemma-open-models/) 是 Google 开源的一款大语言模型(LLM),旨在提供一个更加通用、灵活的模型用于各种自然语言处理任务。现在,通过 LobeChat 与 [Ollama](https://ollama.com/) 的集成,你可以轻松地在 LobeChat 中使用 Google Gemma。 diff --git a/docs/usage/providers/ollama/qwen.mdx b/docs/usage/providers/ollama/qwen.mdx index 8372e6771f0a..243c02f53846 100644 --- a/docs/usage/providers/ollama/qwen.mdx +++ b/docs/usage/providers/ollama/qwen.mdx @@ -14,7 +14,7 @@ tags: {'Using [Qwen](https://github.com/QwenLM/Qwen1.5) is a large language model (LLM) open-sourced by Alibaba Cloud. It is officially defined as a constantly evolving AI large model, and it achieves more accurate Chinese recognition capabilities through more training set content. diff --git a/docs/usage/providers/ollama/qwen.zh-CN.mdx b/docs/usage/providers/ollama/qwen.zh-CN.mdx index 24e3e246e41b..fc9ab9192f79 100644 --- a/docs/usage/providers/ollama/qwen.zh-CN.mdx +++ b/docs/usage/providers/ollama/qwen.zh-CN.mdx @@ -14,7 +14,7 @@ tags: {'在 [通义千问](https://github.com/QwenLM/Qwen1.5) 是阿里云开源的一款大语言模型(LLM),官方定义是一个不断进化的 AI 大模型,并通过更多的训练集内容达到更精准的中文识别能力。 diff --git a/docs/usage/providers/openai.mdx b/docs/usage/providers/openai.mdx new file mode 100644 index 000000000000..55e5c79c40a2 --- /dev/null +++ b/docs/usage/providers/openai.mdx @@ -0,0 +1,94 @@ +--- +title: Using OpenAI in LobeChat +description: >- + Learn how to integrate OpenAI API Key in LobeChat. Support GPT-4o / + GPT-4-turbo / GPT-4-vision +tags: + - OpenAI + - ChatGPT + - GPT-4 + - GPT-4o + - API Key + - Web UI +--- + +# Using OpenAI in LobeChat + +{'Using + +This document will guide you on how to use [OpenAI](https://openai.com/) in LobeChat: + + + +### Step 1: Obtain OpenAI API Key + +- Register for an [OpenAI account](https://platform.openai.com/signup). You will need to register using an international phone number and a non-mainland email address. + +- After registration, go to the [API Keys](https://platform.openai.com/api-keys) page and click on `Create new secret key` to generate a new API Key. + +- Open the creation window + +{'Open + +- Create API Key + +{'Create + +- Retrieve API Key + +{'Retrieve + + + After registering, you generally have a free credit of $5, but it is only valid for three months. + + +### Step 2: Configure OpenAI in LobeChat + +- Visit the `Settings` page in LobeChat +- Find the setting for `OpenAI` under `Language Model` + +{'Enter + +- Enter the obtained API Key +- Choose an OpenAI model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to OpenAI's relevant + pricing policies. + + + + +You can now engage in conversations using the models provided by OpenAI in LobeChat. diff --git a/docs/usage/providers/openai.zh-CN.mdx b/docs/usage/providers/openai.zh-CN.mdx new file mode 100644 index 000000000000..8e699f83621c --- /dev/null +++ b/docs/usage/providers/openai.zh-CN.mdx @@ -0,0 +1,87 @@ +--- +title: 在 LobeChat 中使用 OpenAI +description: 学习如何在 LobeChat 中配置和使用 OpenAI API Key,支持 GPT-4o / GPT-4-turbo / GPT-4-vision +tags: + - ChatGPT + - GPT-4 + - GPT-4o + - API Key + - Web UI +--- + +# 在 LobeChat 中使用 OpenAI + +{'在 + +本文档将指导你如何在 LobeChat 中使用 [OpenAI](https://openai.com/): + + + +### 步骤一:获取 OpenAI API 密钥 + +- 注册一个 [OpenAI 账户](https://platform.openai.com/signup),你需要使用国际手机号、非大陆邮箱进行注册; +- 注册完毕后,前往 [API Keys](https://platform.openai.com/api-keys) 页面,点击 `Create new secret key` 创建新的 API Key: + +- 打开创建窗口 + +{'打开创建窗口'} + +- 创建 API Key + +{'创建 + +- 获取 API Key + +{'获取 + +账户注册后,一般有 5 美元的免费额度,但有效期只有三个月。 + +### 步骤二:在 LobeChat 中配置 OpenAI + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`OpenAI`的设置项 + +{'填入 + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 OpenAI 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 OpenAI 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 OpenAI 提供的模型进行对话了。 diff --git a/docs/usage/providers/openrouter.mdx b/docs/usage/providers/openrouter.mdx new file mode 100644 index 000000000000..b347476c9664 --- /dev/null +++ b/docs/usage/providers/openrouter.mdx @@ -0,0 +1,110 @@ +--- +title: Using OpenRouter in LobeChat +description: >- + Learn how to integrate and utilize OpenRouter's language model APIs in + LobeChat. Follow these steps to register, create an API key, recharge credit, + and configure OpenRouter for seamless conversations. +tags: + - OpenRouter + - LobeChat + - API Key + - Web UI +--- + +# Using OpenRouter in LobeChat + +{'Using + +[OpenRouter](https://openrouter.ai/) is a service that provides a variety of excellent large language model APIs, supporting models such as OpenAI (including GPT-3.5/4), Anthropic (Claude2, Instant), LLaMA 2, and PaLM Bison. + +This document will guide you on how to use OpenRouter in LobeChat: + + + +### Step 1: Register and Log in to OpenRouter + +- Visit [OpenRouter.ai](https://openrouter.ai/) and create an account +- You can log in using your Google account or MetaMask wallet + +{'Register + +### Step 2: Create an API Key + +- Go to the `Keys` menu or visit [OpenRouter Keys](https://openrouter.ai/keys) directly +- Click on `Create Key` to start the creation process +- Name your API key in the pop-up dialog, for example, "LobeChat Key" +- Leave the `Credit limit` blank to indicate no amount limit + +{'Create + +- Copy the API key from the pop-up dialog and save it securely + +{'Get + + + Please store the key securely as it will only appear once. If you lose it accidentally, you will + need to create a new key. + + +### Step 3: Recharge Credit + +- Go to the `Credit` menu or visit [OpenRouter Credit](https://openrouter.ai/credits) directly +- Click on `Manage Credits` to recharge your credit, you can check model prices at [https://openrouter.ai/models](https://openrouter.ai/models) +- OpenRouter provides some free models that can be used without recharging + +{'Recharge + +### Step 4: Configure OpenRouter in LobeChat + +- Visit the `Settings` interface in LobeChat +- Find the setting for `OpenRouter` under `Language Models` +- Enable OpenRouter and enter the API key you obtained + +{'Configure + +- Choose an OpenRouter model for your assistant to start the conversation + +{'Use + + + You may need to pay the API service provider during usage, please refer to OpenRouter's relevant + fee policies. + + + + +You can now engage in conversations using the models provided by OpenRouter in LobeChat. diff --git a/docs/usage/providers/openrouter.zh-CN.mdx b/docs/usage/providers/openrouter.zh-CN.mdx new file mode 100644 index 000000000000..6af97b6eccae --- /dev/null +++ b/docs/usage/providers/openrouter.zh-CN.mdx @@ -0,0 +1,104 @@ +--- +title: 在 LobeChat 中使用 OpenRouter +description: 学习如何在 LobeChat 中注册、创建 API 密钥、充值信用额度并配置 OpenRouter,以便开始使用多种优秀大语言模型 API。 +tags: + - OpenRouter + - API Key + - Web UI +--- + +# 在 LobeChat 中使用 OpenRouter + +{'在 + +[OpenRouter](https://openrouter.ai/) 是一个提供多种优秀大语言模型 API 的服务,它支持 OpenAI (包括 GPT-3.5/4)、Anthropic (Claude2、Instant)、LLaMA 2 和 PaLM Bison 等众多模型。 + +本文档将指导你如何在 LobeChat 中使用 OpenRouter: + + + +### 步骤一:注册 OpenRouter 账号并登录 + +- 访问 [OpenRouter.ai](https://openrouter.ai/) 并创建一个账号 +- 你可以用 Google 账号或 MetaMask 钱包登录 + +{'注册 + +### 步骤二:创建 API 密钥 + +- 进入 `Keys` 菜单或直接访问 [OpenRouter Keys](https://openrouter.ai/keys) +- 点击 `Create Key` 开始创建 +- 在弹出对话框中为 API 密钥取一个名字,例如 "LobeChat Key" +- 留空 `Credit limit` 表示不设置金额限制 + +{'创建 + +- 在弹出的对话框中复制 API 密钥,并妥善保存 + +{'获取 + + + 请安全地存储密钥,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新密钥。 + + +### 步骤三:充值信用额度 + +- 进入 `Credit` 菜单,或直接访问 [OpenRouter Credit](https://openrouter.ai/credits) +- 点击 `Manage Credits` 充值信用额度,在 [https://openrouter.ai/models](https://openrouter.ai/models) 中可以查看模型价格 +- OpenRouter 提供了一些免费模型,未充值的情况下可以使用 + +{'充值 + +### 步骤四:在 LobeChat 中配置 OpenRouter + +- 访问 LobeChat 的 `设置` 界面 +- 在 `语言模型` 下找到 `OpenRouter` 的设置项 +- 打开 OpenRouter 并填入获得的 API 密钥 + +{'在 + +- 为你的助手选择一个 OpenRouter 模型即可开始对话 + +{'使用 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 OpenRouter 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 OpenRouter 提供的模型进行对话了。 diff --git a/docs/usage/providers/perplexity.mdx b/docs/usage/providers/perplexity.mdx new file mode 100644 index 000000000000..ea035a32f6ea --- /dev/null +++ b/docs/usage/providers/perplexity.mdx @@ -0,0 +1,62 @@ +--- +title: Using Perplexity AI in LobeChat +description: >- + Learn how to integrate and use Perplexity AI in LobeChat to enhance your AI + assistant's capabilities. +tags: + - Perplexity AI + - API key + - Web UI +--- + +# Using Perplexity AI in LobeChat + +{'Using + +The Perplexity AI API is now available for everyone to use. This document will guide you on how to use [Perplexity AI](https://www.perplexity.ai/) in LobeChat: + + + +### Step 1: Obtain Perplexity AI API Key + +- Create a [Perplexity AI](https://www.perplexity.ai/) account +- Obtain your [API key](https://www.perplexity.ai/settings/api) + +{'Create + +### Step 2: Configure Perplexity AI in LobeChat + +- Go to the `Settings` interface in LobeChat +- Find the setting for `Perplexity AI` under `Language Model` + +{'Enter + +- Enter the API key you obtained +- Choose a Perplexity AI model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to Perplexity AI's + relevant pricing policies. + + + + +You can now engage in conversations using the models provided by Perplexity AI in LobeChat. diff --git a/docs/usage/providers/perplexity.zh-CN.mdx b/docs/usage/providers/perplexity.zh-CN.mdx new file mode 100644 index 000000000000..9e5ee34da996 --- /dev/null +++ b/docs/usage/providers/perplexity.zh-CN.mdx @@ -0,0 +1,59 @@ +--- +title: 在 LobeChat 中使用 Perplexity AI +description: 学习如何在 LobeChat 中配置和使用 Perplexity AI,获取 API 密钥并选择适合的语言模型开始对话。 +tags: + - Perplexity AI + - API key + - Web UI +--- + +# 在 LobeChat 中使用 Perplexity AI + +{'在 + +Perplexity AI API 现在可供所有人使用, 本文档将指导你如何在 LobeChat 中使用 [Perplexity AI](https://www.perplexity.ai/): + + + +### 步骤一:获取 Perplexity AI API 密钥 + +- 创建一个 [Perplexity AI](https://www.perplexity.ai/) 帐户 +- 获取您的 [API 密钥](https://www.perplexity.ai/settings/api) + +{'创建 + +### 步骤二:在 LobeChat 中配置 Perplexity AI + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`Perplexity AI`的设置项 + +{'填入 + +- 填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Perplexity AI 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Perplexity AI 的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Perplexity AI 提供的模型进行对话了。 diff --git a/docs/usage/providers/qwen.mdx b/docs/usage/providers/qwen.mdx new file mode 100644 index 000000000000..a8b2876c69df --- /dev/null +++ b/docs/usage/providers/qwen.mdx @@ -0,0 +1,92 @@ +--- +title: Using Tongyi Qianwen in LobeChat +description: >- + Learn how to integrate and utilize Tongyi Qianwen, a powerful language model + by Alibaba Cloud, in LobeChat for various tasks. Follow the steps to activate + the service, obtain the API key, and configure Tongyi Qianwen for seamless + interaction. +tags: + - Tongyi Qianwen + - Alibaba Cloud + - DashScope + - API key + - Web UI +--- + +# Using Tongyi Qianwen in LobeChat + +{'Using + +[Tongyi Qianwen](https://tongyi.aliyun.com/) is a large-scale language model independently developed by Alibaba Cloud, with powerful natural language understanding and generation capabilities. It can answer various questions, create text content, express opinions, write code, and play a role in multiple fields. + +This document will guide you on how to use Tongyi Qianwen in LobeChat: + + + +### Step 1: Activate DashScope Model Service + +- Visit and log in to Alibaba Cloud's [DashScope](https://dashscope.console.aliyun.com/) platform. +- If it is your first time, you need to activate the DashScope service. +- If you have already activated it, you can skip this step. + +{'Activate + +### Step 2: Obtain DashScope API Key + +- Go to the `API-KEY` interface and create an API key. + +{'Create + +- Copy the API key from the pop-up dialog box and save it securely. + +{'Copy + + + Please store the key securely as it will only appear once. If you accidentally lose it, you will + need to create a new key. + + +### Step 3: Configure Tongyi Qianwen in LobeChat + +- Visit the `Settings` interface in LobeChat. +- Find the setting for `Tongyi Qianwen` under `Language Model`. + +{'Enter + +- Open Tongyi Qianwen and enter the obtained API key. +- Choose a Qwen model for your AI assistant to start the conversation. + +{'Select + + + During usage, you may need to pay the API service provider. Please refer to Tongyi Qianwen's + relevant pricing policies. + + + + +You can now engage in conversations using the models provided by Tongyi Qianwen in LobeChat. diff --git a/docs/usage/providers/qwen.zh-CN.mdx b/docs/usage/providers/qwen.zh-CN.mdx new file mode 100644 index 000000000000..3ec9561c6c4a --- /dev/null +++ b/docs/usage/providers/qwen.zh-CN.mdx @@ -0,0 +1,87 @@ +--- +title: 在 LobeChat 中使用通义千问 +description: 学习如何在 LobeChat 中配置和使用阿里云的通义千问模型,提供强大的自然语言理解和生成能力。 +tags: + - LobeChat + - 通义千问 + - DashScope + - DashScope + - API key + - Web UI +--- + +# 在 LobeChat 中使用通义千问 + +{'在 + +[通义千问](https://tongyi.aliyun.com/)是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。 + +本文档将指导你如何在 LobeChat 中使用通义千问: + + + +### 步骤一:开通 DashScope 模型服务 + +- 访问并登录阿里云 [DashScope](https://dashscope.console.aliyun.com/) 平台 +- 初次进入时需要开通 DashScope 服务 +- 若你已开通,可跳过该步骤 + +{'开通 + +### 步骤二:获取 DashScope API 密钥 + +- 进入`API-KEY` 界面,并创建一个 API 密钥 + +{'创建通义千问 + +- 在弹出的对话框中复制 API 密钥,并妥善保存 + +{'复制通义千问 + + + 请安全地存储密钥,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新密钥。 + + +### 步骤三:在LobeChat 中配置通义千问 + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到`通义千问`的设置项 + +{'填写 + +- 打开通义千问并填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Qwen 的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考通义千问的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用通义千问提供的模型进行对话了。 diff --git a/docs/usage/providers/stepfun.mdx b/docs/usage/providers/stepfun.mdx new file mode 100644 index 000000000000..fac656c2f41a --- /dev/null +++ b/docs/usage/providers/stepfun.mdx @@ -0,0 +1,66 @@ +--- +title: Using Stepfun in LobeChat +description: >- + Learn how to integrate Stepfun AI models into LobeChat for engaging + conversations. Obtain Stepfun API key, configure Stepfun in LobeChat settings, + and select a model to start chatting. +tags: + - Stepfun + - API key + - Web UI +--- + +# Using Stepfun in LobeChat + +{'Using + +[Stepfun](https://www.stepfun.com/) is a startup focusing on the research and development of Artificial General Intelligence (AGI). They have released the Step-1 billion-parameter language model, Step-1V billion-parameter multimodal model, and the Step-2 trillion-parameter MoE language model preview. + +This document will guide you on how to use Stepfun in LobeChat: + + + +### Step 1: Obtain Stepfun API Key + +- Visit and log in to the [Stepfun Open Platform](https://platform.stepfun.com/) +- Go to the `API Key` menu, where the system has already created an API key for you +- Copy the created API key + +{'Obtain + +### Step 2: Configure Stepfun in LobeChat + +- Visit the `Settings` interface in LobeChat +- Find the setting for Stepfun under `Language Models` + +{'Enter + +- Open Stepfun and enter the obtained API key +- Choose a Stepfun model for your AI assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to Stepfun's relevant + pricing policies. + + + + +You can now use the models provided by Stepfun to have conversations in LobeChat. diff --git a/docs/usage/providers/stepfun.zh-CN.mdx b/docs/usage/providers/stepfun.zh-CN.mdx new file mode 100644 index 000000000000..68c817967667 --- /dev/null +++ b/docs/usage/providers/stepfun.zh-CN.mdx @@ -0,0 +1,62 @@ +--- +title: 在 LobeChat 中使用 Stepfun Stepfun 阶跃星辰 +description: 学习如何在 LobeChat 中配置和使用 Stepfun 阶跃星辰的人工智能模型,包括获取 API 密钥和选择模型开始对话。 +tags: + - Stepfun 阶跃星辰 + - API key + - Web UI +--- + +# 在 LobeChat 中使用 Stepfun 阶跃星辰 + +{'在 + +[Stepfun 阶跃星辰](https://www.stepfun.com/)是一家专注于通用人工智能(AGI)研发的创业公司,目前已推出Step-1千亿参数语言大模型、Step-1V千亿参数多模态大模型,以及Step-2万亿参数MoE语言大模型预览版。 + +本文档将指导你如何在 LobeChat 中使用 Stepfun 阶跃星辰: + + + +### 步骤一:获取 Stepfun 阶跃星辰 API 密钥 + +- 访问并登录 [Stepfun Stepfun 阶跃星辰开放平台](https://platform.stepfun.com/) +- 进入`接口密钥`菜单,系统已为你创建好 API 密钥 +- 复制已创建的 API 密钥 + +{'获取 + +### 步骤二:在LobeChat 中配置 Stepfun Stepfun 阶跃星辰 + +- 访问 LobeChat 的`设置`界面 +- 在`语言模型`下找到` Stepfun 阶跃星辰`的设置项 + +{'填写 + +- 打开 Stepfun 阶跃星辰并填入获得的 API 密钥 +- 为你的 AI 助手选择一个 Stepfun 阶跃星辰的模型即可开始对话 + +{'选择 + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Stepfun 阶跃星辰的相关费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Stepfun 阶跃星辰提供的模型进行对话了。 diff --git a/docs/usage/providers/togetherai.mdx b/docs/usage/providers/togetherai.mdx new file mode 100644 index 000000000000..529092d6f137 --- /dev/null +++ b/docs/usage/providers/togetherai.mdx @@ -0,0 +1,72 @@ +--- +title: Using Together AI in LobeChat +description: >- + Learn how to integrate Together AI into LobeChat, obtain the API key, + configure settings, and start conversations with AI models. +tags: + - Together AI + - API key + - Web UI +--- + +# Using Together AI in LobeChat + +{'Using + +[together.ai](https://www.together.ai/) is a platform focused on the field of Artificial Intelligence Generated Content (AIGC), founded in June 2022. It is dedicated to building a cloud platform for running, training, and fine-tuning open-source models, providing scalable computing power at prices lower than mainstream vendors. + +This document will guide you on how to use Together AI in LobeChat: + + + +### Step 1: Obtain the API Key for Together AI + +- Visit and log in to [Together AI API](https://api.together.ai/) +- Upon initial login, the system will automatically create an API key for you and provide a $5.0 credit + +{'Obtain + +- If you haven't saved it, you can also view the API key at any time in the `API Key` interface under `Settings` + +{'View + +### Step 2: Configure Together AI in LobeChat + +- Visit the `Settings` interface in LobeChat +- Find the setting for `together.ai` under `Language Model` + +{'Enter + +- Open together.ai and enter the obtained API key +- Choose a Together AI model for your assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to Together AI's pricing + policy. + + + + +You can now engage in conversations using the models provided by Together AI in LobeChat. diff --git a/docs/usage/providers/togetherai.zh-CN.mdx b/docs/usage/providers/togetherai.zh-CN.mdx new file mode 100644 index 000000000000..5ff52130581e --- /dev/null +++ b/docs/usage/providers/togetherai.zh-CN.mdx @@ -0,0 +1,70 @@ +--- +title: 在 LobeChat 中使用 Together AI +description: 学习如何在 LobeChat 中配置和使用 Together AI 的API密钥,以便开始对话和交互。 +tags: + - LobeChat + - Together AI + - API密钥 + - Web UI +--- + +# 在 LobeChat 中使用 Together AI + +{'在 + +[together.ai](https://www.together.ai/) 是一家专注于生成式人工智能(AIGC)领域的平台,成立于2022年6月。 它致力于构建用于运行、训练和微调开源模型的云平台,以低于主流供应商的价格提供可扩展的计算能力。 + +本文档将指导你如何在 LobeChat 中使用 Together AI: + + + +### 步骤一:获取 Together AI 的 API 密钥 + +- 访问并登录 [Together AI API](https://api.together.ai/) +- 初次登录时系统会自动为你创建好 API 密钥并赠送 $5.0 的额度 + +{'获得 + +- 如果你没有保存,也可以在后续任意时间,通过 `设置` 中的 `API 密钥` 界面查看 + +{'查看 + +### 步骤二:在 LobeChat 中配置 Together AI + +- 访问LobeChat的`设置`界面 +- 在`语言模型`下找到`together.ai`的设置项 + +{'LobeChat + +- 打开 together.ai 并填入获得的 API 密钥 +- 为你的助手选择一个 Together AI 的模型即可开始对话 + +{' + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考 Together AI 的费用政策。 + + + + +至此你已经可以在 LobeChat 中使用 Together AI 提供的模型进行对话了。 diff --git a/docs/usage/providers/zhipu.mdx b/docs/usage/providers/zhipu.mdx new file mode 100644 index 000000000000..fb49fbfa2424 --- /dev/null +++ b/docs/usage/providers/zhipu.mdx @@ -0,0 +1,67 @@ +--- +title: Using Zhipu ChatGLM in LobeChat +description: >- + Learn how to integrate and utilize Zhipu AI models in LobeChat for enhanced + conversational experiences. Obtain the API key, configure settings, and start + engaging with cognitive intelligence. +tags: + - Zhipu AI + - ChatGLM + - API Key + - Web UI +--- + +# Using Zhipu ChatGLM in LobeChat + +{'Using + +[Zhipu AI](https://www.zhipuai.cn/) is a high-tech company originating from the Department of Computer Science at Tsinghua University. Established in 2019, the company focuses on natural language processing, machine learning, and big data analysis, dedicated to expanding the boundaries of artificial intelligence technology in the field of cognitive intelligence. + +This document will guide you on how to use Zhipu AI in LobeChat: + + + +### Step 1: Obtain the API Key for Zhipu AI + +- Visit and log in to the [Zhipu AI Open Platform](https://open.bigmodel.cn/) +- Upon initial login, the system will automatically create an API key for you and gift you a resource package of 25M Tokens +- Navigate to the `API Key` section at the top to view your API key + +{'Obtaining + +### Step 2: Configure Zhipu AI in LobeChat + +- Visit the `Settings` interface in LobeChat +- Under `Language Model`, locate the settings for Zhipu AI + +{'Enter + +- Open Zhipu AI and enter the obtained API key +- Choose a Zhipu AI model for your assistant to start the conversation + +{'Select + + + During usage, you may need to pay the API service provider, please refer to Zhipu AI's pricing + policy. + + + + +You can now engage in conversations using the models provided by Zhipu AI in LobeChat. diff --git a/docs/usage/providers/zhipu.zh-CN.mdx b/docs/usage/providers/zhipu.zh-CN.mdx new file mode 100644 index 000000000000..0d865f1bd4aa --- /dev/null +++ b/docs/usage/providers/zhipu.zh-CN.mdx @@ -0,0 +1,61 @@ +--- +title: 在 LobeChat 中使用智谱 ChatGLM +description: 学习如何在 LobeChat 中配置和使用智谱AI的API密钥,开始与智谱AI提供的模型进行对话。 +tags: + - 智谱AI + - ChatGLM + - API Key + - Web UI +--- + +# 在 LobeChat 中使用智谱 ChatGLM + +{'在 + +[智谱AI](https://www.zhipuai.cn/) 是一家源自清华大学计算机系技术成果的高科技公司,成立于2019年,专注于自然语言处理、机器学习和大数据分析,致力于在认知智能领域拓展人工智能技术的边界。 + +本文档将指导你如何在 LobeChat 中使用智谱 AI: + + + +### 步骤一:获取智谱 AI 的 API 密钥 + +- 访问并登录 [智谱AI开放平台](https://open.bigmodel.cn/) +- 初次登录时系统会自动为你创建好 API 密钥并赠送 25M Tokens 的资源包 +- 进入顶部的 `API密钥` 可以查看你的 API + +{'获得智谱AI + +### 步骤二:在 LobeChat 中配置智谱AI + +- 访问LobeChat的`设置`界面 +- 在`语言模型`下找到`智谱AI`的设置项 + +{'LobeChat + +- 打开智谱 AI 并填入获得的 API 密钥 +- 为你的助手选择一个智谱AI的模型即可开始对话 + + + + + 在使用过程中你可能需要向 API 服务提供商付费,请参考智谱AI的费用政策。 + + + + +至此你已经可以在 LobeChat 中使用智谱AI提供的模型进行对话了。 diff --git a/docs/usage/start.mdx b/docs/usage/start.mdx index f77c248e4b2d..856a6a312e9b 100644 --- a/docs/usage/start.mdx +++ b/docs/usage/start.mdx @@ -1,5 +1,5 @@ --- -title: Get Start with LobeChat +title: Get started with LobeChat description: >- Explore the exciting features in LobeChat, including Vision Model, TTS & STT, Local LLMs, and Multi AI Providers. Discover more about Agent Market, Plugin @@ -23,12 +23,14 @@ tags: borderless height={426} margin={12} - src={'https://github.com/lobehub/lobe-chat/assets/28616219/8b04c3c9-3d71-4fb4-bd9b-a4f415c5876d'} + src={'https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf'} width={832} /> + 如果你之前没有了解过 Tools Calling, 可以查看 [Function Call: Chat + 应用的插件基石与交互技术的变革黎明](https://lobehub.com/zh/blog/openai-function-call) 这篇文章。 + + +随着社区中越来越多的大语言模型支持了 Tool Calling 能力,同时得益于 LobeChat 的 Agent Runtime 架构,我们几乎实现了所有主流大语言模型( OpenAI 、Claude 、Gemini 等等)的 Tool Calling 调用能力。 + +LobeChat 的插件实现基于模型的 Tools Calling 能力,模型本身的 Tool Calling 能力决定插件调用是否正常。作为上层应用,我们针对各个模型的 Tool Calling 做了较为完善的测试,以便帮助我们的用户了解现有的模型能力,更好地进行抉择。 + +## 评测任务介绍 + +我们基于实际真实的用户场景出发构建了两大组测试任务,第一组为简单的调用指令(天气查询),第二组为复杂调用指令(文生图)。这两组指令的系统描述如下: + + + + +```md +## Tools + +You can use these tools below: + +### Realtime Weather + +Get realtime weather information + +The APIs you can use: + +#### `realtime-weather____fetchCurrentWeather` + +获取当前天气情况 +``` + + + + + +```md +## Tools + +You can use these tools below: + +### DALL·E 3 + +Whenever a description of an image is given, use lobe-image-designer to create the images and then summarize the prompts used to generate the images in plain text. If the user does not ask for a specific number of images, default to creating four captions to send to lobe-image-designer that are written to be as diverse as possible. + +All captions sent to lobe-image-designer must abide by the following policies: + +1. If the description is not in English, then translate it. +2. Do not create more than 4 images, even if the user requests more. +3. Don't create images of politicians or other public figures. Recommend other ideas instead. +4. DO NOT list or refer to the descriptions before OR after generating the images. They should ONLY ever be written out ONCE, in the `prompts` field of the request. You do not need to ask for permission to generate, just do it! +5. Always mention the image type (photo, oil painting, watercolor painting, illustration, cartoon, drawing, vector, render, etc.) at the beginning of the caption. Unless the caption suggests otherwise, make at least 1--2 of the 4 images photos. +6. Diversify depictions of ALL images with people to include DESCENT and GENDER for EACH person using direct terms. Adjust only human descriptions. + +- EXPLICITLY specify these attributes, not abstractly reference them. The attributes should be specified in a minimal way and should directly describe their physical form. +- Your choices should be grounded in reality. For example, all of a given OCCUPATION should not be the same gender or race. Additionally, focus on creating diverse, inclusive, and exploratory scenes via the properties you choose during rewrites. Make choices that may be insightful or unique sometimes. +- Use "various" or "diverse" ONLY IF the description refers to groups of more than 3 people. Do not change the number of people requested in the original description. +- Don't alter memes, fictional character origins, or unseen people. Maintain the original prompt's intent and prioritize quality. +- Do not create any imagery that would be offensive. + +8. Silently modify descriptions that include names or hints or references of specific people or celebrities by carefully selecting a few minimal modifications to substitute references to the people with generic descriptions that don't divulge any information about their identities, except for their genders and physiques. Do this EVEN WHEN the instructions ask for the prompt to not be changed. Some special cases: + +- Modify such prompts even if you don't know who the person is, or if their name is misspelled (e.g. "Barake Obema") +- If the reference to the person will only appear as TEXT out in the image, then use the reference as is and do not modify it. +- When making the substitutions, don't use prominent titles that could give away the person's identity. E.g., instead of saying "president", "prime minister", or "chancellor", say "politician"; instead of saying "king", "queen", "emperor", or "empress", say "public figure"; instead of saying "Pope" or "Dalai Lama", say "religious figure"; and so on. +- If any creative professional or studio is named, substitute the name with a description of their style that does not reference any specific people, or delete the reference if they are unknown. DO NOT refer to the artist or studio's style. + +The prompt must intricately describe every part of the image in concrete, objective detail. THINK about what the end goal of the description is, and extrapolate that to what would make satisfying images. All descriptions sent to lobe-image-designer should be a paragraph of text that is extremely descriptive and detailed. Each should be more than 3 sentences long. + +The APIs you can use: + +#### `lobe-image-designer____text2image____builtin` + +Create images from a text-only prompt. +``` + + + + + +如上所示,简单调用指令在插件调用时它的系统描述(system role)相对简单,复杂调用指令的系统描述会复杂很多。这两组不同复杂度的指令可以比较好地区分出模型对于系统指令的遵循能力: + +- **天气查询可以测试模型的基础 Tool Calling 能力,确认模型是否存在「虚假宣传」的情况。** 就我们实际的测试来看,的确存在一些模型号称具有 Tools Calling 能力,但是处于完全不可用的状态; +- **文生图可以测试模型指令跟随能力的上限。** 例如基础模型(例如 GPT-3.5)可能只能生成 1 张图片的 prompt,而高级模型(例如 GPT-4o)则能够生成 1~4 张图片的 prompt。 + +### 简单调用指令:天气查询 + +天气查询是 Tools Calling 中一个经典的例子。 + +天气查询插件采用的是我们自己做的一个简单的插件,它的工具定义如下: + +```json +{ + "function": { + "description": "获取当前天气情况", + "name": "realtime-weather____fetchCurrentWeather", + "parameters": { + "properties": { + "city": { + "description": "城市名称", + "type": "string" + } + }, + "required": ["city"], + "type": "object" + } + }, + "type": "function" +} +``` + +针对这一个工具,我们构建的测试组中包含了三个指令: + +| 指令编号 | 指令内容 | 基础 Tool Calling 调用 | 并发调用 | 复合指令跟随 | +| --- | --- | --- | --- | --- | +| 指令 ① | 告诉我杭州和北京的天气,先回答我好的 | 🟢 | 🟢 | 🟢 | +| 指令 ② | 告诉我杭州和北京的天气 | 🟢 | 🟢 | - | +| 指令 ③ | 告诉我杭州的天气 | 🟢 | - | - | + +上述三个指令的复杂度逐渐递减,我们可以通过这三个指令来测试模型对于简单指令的处理能力。 + +- 指令 ① 测试的能力项包含 「基础 Tool Calling 调用」、「并发调用」、「复合指令跟随」三项。 +- 指令 ② 测试的能力项包含 「基础 Tool Calling 调用」、「并发调用」 两项。 +- 指令 ③ 测试的能力项仅包含「基础 Tool Calling 调用」。 + + + 将指令 ① 、② 、③ 按照难度递减的方式排序的目的,是为了降低测试的成本。因为当模型能通过指令 ① + 的测试时,我们就不需要继续测试指令 ② 和指令 ③ ,必然能通过。 + + +测试能力项详细说明: + + + + + 根据我们实际的日常使用,工具调用往往会和普通文本生成结合在一起回答。例如比较经典的 Code Interpreter 插件,ChatGPT 往往会先回复一些代码生成的思路,然后再调用 Code Interpreter 插件生成代码。 + + 这种情况下,我们需要模型能够正确地识别出用户的意图,然后调用对应的工具。 + + 因此, 指令 ① 中的「告诉我杭州和北京的天气,先回答我好的」就是一个复合指令跟随的例子。前半句期望模型调用天气查询工具,后半句期望模型回答「好的」。并且理想的顺序应该是先回答「好的」,然后再调用天气查询工具。 + + + + + 并发工具调用(Parallel function calling)是指模型能够同时调用多个工具,或同时调用一个工具多次,这在对话中可以大大降低用户等待的时间,提升用户体验。 + + 并发工具调用能力由 OpenAI 于 2023年11月率先提出,目前支持并发工具调用的模型并不算多,属于是 Tools Calling 的进阶能力。 + + 指令 ② 中的「告诉我杭州和北京的天气」就是一个期望执行并发调用的例子。理想的情况下,单个模型的返回应该存在两个工具的调用返回。 + + + + + 基础工具调用不必再赘述,这是 Tools Calling 的基础能力。 + + 指令 ③ 中的「告诉我杭州的天气」就是最基本的工具调用的例子。 + + + + +### 复杂调用指令:文生图 + +文生图的 Tool Calling 基本照搬了 ChatGPT Plus 的指令,它的复杂度相对较高,可以测试模型对于复杂指令的跟随能力。工具定义如下: + +```json +{ + "function": { + "description": "Create images from a text-only prompt.", + "name": "lobe-image-designer____text2image____builtin", + "parameters": { + "properties": { + "prompts": { + "description": "The user's original image description, potentially modified to abide by the lobe-image-designer policies. If the user does not suggest a number of captions to create, create four of them. If creating multiple captions, make them as diverse as possible. If the user requested modifications to previous images, the captions should not simply be longer, but rather it should be refactored to integrate the suggestions into each of the captions. Generate no more than 4 images, even if the user requests more.", + "items": { + "type": "string" + }, + "maxItems": 4, + "minItems": 1, + "type": "array" + }, + "quality": { + "default": "standard", + "description": "The quality of the image that will be generated. hd creates images with finer details and greater consistency across the image.", + "enum": ["standard", "hd"], + "type": "string" + }, + "seeds": { + "description": "A list of seeds to use for each prompt. If the user asks to modify a previous image, populate this field with the seed used to generate that image from the image lobe-image-designer metadata.", + "items": { + "type": "integer" + }, + "type": "array" + }, + "size": { + "default": "1024x1024", + "description": "The resolution of the requested image, which can be wide, square, or tall. Use 1024x1024 (square) as the default unless the prompt suggests a wide image, 1792x1024, or a full-body portrait, in which case 1024x1792 (tall) should be used instead. Always include this parameter in the request.", + "enum": ["1792x1024", "1024x1024", "1024x1792"], + "type": "string" + }, + "style": { + "default": "vivid", + "description": "The style of the generated images. Must be one of vivid or natural. Vivid causes the model to lean towards generating hyper-real and dramatic images. Natural causes the model to produce more natural, less hyper-real looking images.", + "enum": ["vivid", "natural"], + "type": "string" + } + }, + "required": ["prompts"], + "type": "object" + } + }, + "type": "function" +} +``` + +针对这一个工具,我们构建的测试组中包含了两个指令: + +| 指令编号 | 指令内容 | 流式调用 | 复杂 Tool Calling 调用 | 并发调用 | 复合指令跟随 | +| --- | --- | --- | --- | --- | --- | +| 指令 ① | 我要画 3 幅画,第一幅画的主体为一只达芬奇风格的小狗,第二幅是毕加索风格的大雁,最后一幅是莫奈风格的狮子。每一幅都需要产出 2 个 prompts。请先说明你的构思,然后开始生成相应的图片。 | 🟢 | 🟢 | 🟢 | 🟢 | +| 指令 ② | 画一只小狗 | 🟢 | 🟢 | - | - | + +此外,由于文生图的 prompts 的生成时间较长,这一组指令也可以清晰地测试出模型的 API 是否支持流式 Tool Calling。 + +## 评测结果 + +TODO diff --git a/docs/usage/tools-calling/anthropic.mdx b/docs/usage/tools-calling/anthropic.mdx new file mode 100644 index 000000000000..1333ed77b7e1 --- /dev/null +++ b/docs/usage/tools-calling/anthropic.mdx @@ -0,0 +1 @@ +TODO diff --git a/docs/usage/tools-calling/anthropic.zh-CN.mdx b/docs/usage/tools-calling/anthropic.zh-CN.mdx new file mode 100644 index 000000000000..f65926de764f --- /dev/null +++ b/docs/usage/tools-calling/anthropic.zh-CN.mdx @@ -0,0 +1,23 @@ +--- +title: Anthropic Claude 系列 Tool Calling +--- + +# Anthropic Claude 系列 Tool Calling + +## Claude 3.5 Sonnet + +### 简单调用指令:天气查询 + +TODO + +## Claude 3 Opus + +TODO + +## Claude 3 Sonnet + +TODO + +## Claude 3 Haiku + +TODO diff --git a/docs/usage/tools-calling/google.mdx b/docs/usage/tools-calling/google.mdx new file mode 100644 index 000000000000..1333ed77b7e1 --- /dev/null +++ b/docs/usage/tools-calling/google.mdx @@ -0,0 +1 @@ +TODO diff --git a/docs/usage/tools-calling/google.zh-CN.mdx b/docs/usage/tools-calling/google.zh-CN.mdx new file mode 100644 index 000000000000..cf7078362757 --- /dev/null +++ b/docs/usage/tools-calling/google.zh-CN.mdx @@ -0,0 +1,13 @@ +--- +title: Google Gemini 系列 Tool Calling +--- + +# Google Gemini 系列 Tool Calling + +## Gemini 1.5 Pro + +TODO + +## Gemini 1.5 Flash + +TODO diff --git a/docs/usage/tools-calling/groq.mdx b/docs/usage/tools-calling/groq.mdx new file mode 100644 index 000000000000..1333ed77b7e1 --- /dev/null +++ b/docs/usage/tools-calling/groq.mdx @@ -0,0 +1 @@ +TODO diff --git a/docs/usage/tools-calling/groq.zh-CN.mdx b/docs/usage/tools-calling/groq.zh-CN.mdx new file mode 100644 index 000000000000..061b5ae4dfe8 --- /dev/null +++ b/docs/usage/tools-calling/groq.zh-CN.mdx @@ -0,0 +1,15 @@ +--- +title: Groq Tool Calling +--- + +# Groq Tool Calling + +## LLAMA3-70B + +TODO + +## LLAMA3-8B + +TODO + +## Mixtral-8x7B diff --git a/docs/usage/tools-calling/openai.mdx b/docs/usage/tools-calling/openai.mdx new file mode 100644 index 000000000000..1333ed77b7e1 --- /dev/null +++ b/docs/usage/tools-calling/openai.mdx @@ -0,0 +1 @@ +TODO diff --git a/docs/usage/tools-calling/openai.zh-CN.mdx b/docs/usage/tools-calling/openai.zh-CN.mdx new file mode 100644 index 000000000000..644cc3ac0979 --- /dev/null +++ b/docs/usage/tools-calling/openai.zh-CN.mdx @@ -0,0 +1,831 @@ +--- +title: OpenAI GPT 系列 Tools Calling +description: 使用 LobeChat 测试 OpenAI GPT 系列模型(GPT 3.5-turbo / GPT-4 /GPT-4o) 的工具调用能力,并展现评测结果 +tags: + - Tools Calling + - Benchmark + - Function Calling + - 工具调用 + - 插件 +--- + +# OpenAI GPT 系列工具调用(Tools Calling) + +OpenAI GPT 系列模型 Tool Calling 能力一览: + +| 模型 | 支持 Tool Calling | 流式 (Stream) | 并发(Parallel) | 简单指令得分 | 复杂指令 | +| ------------- | ----------------- | --------------- | ---------------- | ------------ | -------- | +| GPT-3.5-turbo | ✅ | ✅ | ✅ | 🌟🌟🌟 | 🌟 | +| GPT-4-turbo | ✅ | ✅ | ✅ | 🌟🌟 | 🌟🌟 | +| GPT-4o | ✅ | ✅ | ✅ | 🌟🌟🌟 | 🌟🌟 | + + + 关于测试指令,详见 [工具调用 Tools Calling - + 评测任务介绍](/zh/docs/usage/tools-calling#评测任务介绍) + + +## GPT 3.5-turbo + +### 简单调用指令:天气查询 + +测试指令:指令 ① + +