diff --git a/DigitalHumanWeb/.bunfig.toml b/DigitalHumanWeb/.bunfig.toml new file mode 100644 index 0000000..d6bb75b --- /dev/null +++ b/DigitalHumanWeb/.bunfig.toml @@ -0,0 +1,3 @@ +[install.lockfile] + +save = false diff --git a/DigitalHumanWeb/.changelogrc.js b/DigitalHumanWeb/.changelogrc.js new file mode 100644 index 0000000..9a2f5f9 --- /dev/null +++ b/DigitalHumanWeb/.changelogrc.js @@ -0,0 +1 @@ +module.exports = require('@lobehub/lint').changelog; diff --git a/DigitalHumanWeb/.commitlintrc.js b/DigitalHumanWeb/.commitlintrc.js new file mode 100644 index 0000000..9b8c6ac --- /dev/null +++ b/DigitalHumanWeb/.commitlintrc.js @@ -0,0 +1 @@ +module.exports = require('@lobehub/lint').commitlint; diff --git a/DigitalHumanWeb/.dockerignore b/DigitalHumanWeb/.dockerignore new file mode 100644 index 0000000..fc4c2e7 --- /dev/null +++ b/DigitalHumanWeb/.dockerignore @@ -0,0 +1,9 @@ +Dockerfile +.dockerignore +node_modules +npm-debug.log +.next +.git +.github +*.md +.env.example diff --git a/DigitalHumanWeb/.editorconfig b/DigitalHumanWeb/.editorconfig new file mode 100644 index 0000000..7e3649a --- /dev/null +++ b/DigitalHumanWeb/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false + +[Makefile] +indent_style = tab diff --git a/DigitalHumanWeb/.env.example b/DigitalHumanWeb/.env.example new file mode 100644 index 0000000..cc8b4a5 --- /dev/null +++ b/DigitalHumanWeb/.env.example @@ -0,0 +1,195 @@ +# add a access code to lock your lobe-chat application, you can set a long password to avoid leaking. If this value contains a comma, it is a password array. +# ACCESS_CODE=lobe66 + +# Specify your API Key selection method, currently supporting `random` and `turn`. +# API_KEY_SELECT_MODE=random + + +######################################## +######## Model Provider Service ######## +######################################## + +### OpenAI ### + +# you openai api key +OPENAI_API_KEY=sk-xxxxxxxxx + +# use a proxy to connect to the OpenAI API +# OPENAI_PROXY_URL=https://api.openai.com/v1 + +# add your custom model name, multi model separate by comma. for example gpt-3.5-1106,gpt-4-1106 +# OPENAI_MODEL_LIST=gpt-3.5-turbo + + +### Azure OpenAI ### + +# you can learn azure OpenAI Service on https://learn.microsoft.com/en-us/azure/ai-services/openai/overview +# use Azure OpenAI Service by uncomment the following line + +# The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section. +# AZURE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +# The endpoint you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section. +# AZURE_ENDPOINT=https://docs-test-001.openai.azure.com + +# Azure's API version, follows the YYYY-MM-DD format +# AZURE_API_VERSION=2024-06-01 + + +### Anthropic Service #### + +# ANTHROPIC_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +# use a proxy to connect to the Anthropic API +# ANTHROPIC_PROXY_URL=https://api.anthropic.com + + +### Google AI #### + +# GOOGLE_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + +### AWS Bedrock ### + +# AWS_REGION=us-east-1 +# AWS_ACCESS_KEY_ID=xxxxxxxxxxxxxxxxxxx +# AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + + +### Ollama AI #### + +# You can use ollama to get and run LLM locally, learn more about it via https://github.com/ollama/ollama + +# The local/remote ollama service url +# OLLAMA_PROXY_URL=http://127.0.0.1:11434 + +# OLLAMA_MODEL_LIST=your_ollama_model_names + + +### OpenRouter Service ### + +# OPENROUTER_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx +# OPENROUTER_MODEL_LIST=model1,model2,model3 + + +### Mistral AI ### + +# MISTRAL_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### Perplexity Service ### + +# PERPLEXITY_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### Groq Service #### + +# GROQ_API_KEY=gsk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +#### 01.AI Service #### + +# ZEROONE_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### TogetherAI Service ### + +# TOGETHERAI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### ZhiPu AI ### + +# ZHIPU_API_KEY=xxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxx + +### Moonshot AI #### + +# MOONSHOT_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### Minimax AI #### + +# MINIMAX_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### DeepSeek AI #### + +# DEEPSEEK_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### Qwen AI #### + +# QWEN_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +### SiliconCloud AI #### + +# SILICONCLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + +######################################## +############ Market Service ############ +######################################## + +# The LobeChat agents market index url +# AGENTS_INDEX_URL=https://chat-agents.lobehub.com + +######################################## +############ Plugin Service ############ +######################################## + +# The LobeChat plugins store index url +# PLUGINS_INDEX_URL=https://chat-plugins.lobehub.com + +# 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 +#S3_PUBLIC_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 + + +# NextAuth related configurations +# NEXT_AUTH_SECRET= + +# Auth0 configurations +# AUTH0_CLIENT_ID= +# AUTH0_CLIENT_SECRET= +# AUTH0_ISSUER=https://your-domain.auth0.com + +######################################## +########## 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/DigitalHumanWeb/.eslintignore b/DigitalHumanWeb/.eslintignore new file mode 100644 index 0000000..a0afbcb --- /dev/null +++ b/DigitalHumanWeb/.eslintignore @@ -0,0 +1,31 @@ +# Eslintignore for LobeHub +################################################################ + +# dependencies +node_modules + +# ci +coverage +.coverage + +# test +jest* +*.test.ts +*.test.tsx + +# umi +.umi +.umi-production +.umi-test +.dumi/tmp* +!.dumirc.ts + +# production +dist +es +lib +logs + +# misc +# add other ignore file below +.next \ No newline at end of file diff --git a/DigitalHumanWeb/.eslintrc.js b/DigitalHumanWeb/.eslintrc.js new file mode 100644 index 0000000..827b016 --- /dev/null +++ b/DigitalHumanWeb/.eslintrc.js @@ -0,0 +1,37 @@ +const config = require('@lobehub/lint').eslint; + +config.extends.push('plugin:@next/next/recommended'); + +config.rules['unicorn/no-negated-condition'] = 0; +config.rules['unicorn/prefer-type-error'] = 0; +config.rules['unicorn/prefer-logical-operator-over-ternary'] = 0; +config.rules['unicorn/no-null'] = 0; +config.rules['unicorn/no-typeof-undefined'] = 0; +config.rules['unicorn/explicit-length-check'] = 0; +config.rules['unicorn/prefer-code-point'] = 0; +config.rules['no-extra-boolean-cast'] = 0; +config.rules['unicorn/no-useless-undefined'] = 0; +config.rules['react/no-unknown-property'] = 0; +config.rules['unicorn/prefer-ternary'] = 0; +config.rules['unicorn/prefer-spread'] = 0; +config.rules['unicorn/catch-error-name'] = 0; +config.rules['unicorn/no-array-for-each'] = 0; +config.rules['unicorn/prefer-number-properties'] = 0; + +config.overrides = [ + { + extends: ['plugin:mdx/recommended'], + files: ['*.mdx'], + rules: { + '@typescript-eslint/no-unused-vars': 1, + 'no-undef': 0, + 'react/jsx-no-undef': 0, + 'react/no-unescaped-entities': 0, + }, + settings: { + 'mdx/code-blocks': false, + }, + }, +]; + +module.exports = config; diff --git a/DigitalHumanWeb/.gitignore b/DigitalHumanWeb/.gitignore new file mode 100644 index 0000000..9893f27 --- /dev/null +++ b/DigitalHumanWeb/.gitignore @@ -0,0 +1,69 @@ +# Gitignore for LobeHub +################################################################ + +# general +.DS_Store +.idea +.vscode +.history +.temp +.env.local +venv +temp +tmp + +# dependencies +node_modules +*.log +*.lock +package-lock.json + +# ci +coverage +.coverage +.eslintcache +.stylelintcache + +# production +dist +es +lib +logs +test-output + +# umi +.umi +.umi-production +.umi-test +.dumi/tmp* + +# husky +.husky/prepare-commit-msg + +# misc +# add other ignore file below + +# local env files +.env*.local + +# vercel +.vercel + +# typescript +*.tsbuildinfo +next-env.d.ts +.next +.env +public/*.js +public/sitemap.xml +public/sitemap-index.xml +bun.lockb +sitemap*.xml +robots.txt + +# Serwist +public/sw* +public/swe-worker* + +*.patch +*.pdf diff --git a/DigitalHumanWeb/.husky/pre-commit b/DigitalHumanWeb/.husky/pre-commit new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/DigitalHumanWeb/.husky/pre-commit @@ -0,0 +1 @@ + diff --git a/DigitalHumanWeb/.i18nrc.js b/DigitalHumanWeb/.i18nrc.js new file mode 100644 index 0000000..767573e --- /dev/null +++ b/DigitalHumanWeb/.i18nrc.js @@ -0,0 +1,46 @@ +const { defineConfig } = require('@lobehub/i18n-cli'); + +module.exports = defineConfig({ + entry: 'locales/zh-CN', + entryLocale: 'zh-CN', + output: 'locales', + outputLocales: [ + 'ar', + 'bg-BG', + 'zh-TW', + 'en-US', + 'ru-RU', + 'ja-JP', + 'ko-KR', + 'fr-FR', + 'tr-TR', + 'es-ES', + 'pt-BR', + 'de-DE', + 'it-IT', + 'nl-NL', + 'pl-PL', + 'vi-VN', + ], + temperature: 0, + modelName: 'gpt-4o-mini', + experimental: { + jsonMode: true, + }, + markdown: { + // reference: '你需要保持 mdx 的组件格式,输出文本不需要在最外层包裹任何代码块语法', + entry: ['./README.zh-CN.md', './contributing/**/*.zh-CN.md', './docs/**/*.zh-CN.mdx'], + entryLocale: 'zh-CN', + outputLocales: ['en-US'], + exclude: ['./contributing/_Sidebar.md', './contributing/_Footer.md', './contributing/Home.md'], + outputExtensions: (locale, { filePath }) => { + if (filePath.includes('.mdx')) { + if (locale === 'en-US') return '.mdx'; + return `.${locale}.mdx`; + } else { + if (locale === 'en-US') return '.md'; + return `.${locale}.md`; + } + }, + }, +}); diff --git a/DigitalHumanWeb/.npmrc b/DigitalHumanWeb/.npmrc new file mode 100644 index 0000000..5d733a8 --- /dev/null +++ b/DigitalHumanWeb/.npmrc @@ -0,0 +1,19 @@ +lockfile=false +resolution-mode=highest + +enable-pre-post-scripts=true + +public-hoist-pattern[]=*@umijs/lint* +public-hoist-pattern[]=*changelog* +public-hoist-pattern[]=*commitlint* +public-hoist-pattern[]=*eslint* +public-hoist-pattern[]=*postcss* +public-hoist-pattern[]=*prettier* +public-hoist-pattern[]=*remark* +public-hoist-pattern[]=*semantic-release* +public-hoist-pattern[]=*stylelint* + +public-hoist-pattern[]=@auth/core +public-hoist-pattern[]=@clerk/backend +public-hoist-pattern[]=@clerk/types +public-hoist-pattern[]=pdfjs-dist diff --git a/DigitalHumanWeb/.nvmrc b/DigitalHumanWeb/.nvmrc new file mode 100644 index 0000000..9de2256 --- /dev/null +++ b/DigitalHumanWeb/.nvmrc @@ -0,0 +1 @@ +lts/iron diff --git a/DigitalHumanWeb/.prettierignore b/DigitalHumanWeb/.prettierignore new file mode 100644 index 0000000..3e459cb --- /dev/null +++ b/DigitalHumanWeb/.prettierignore @@ -0,0 +1,63 @@ +# Prettierignore for LobeHub +################################################################ + +# general +.DS_Store +.editorconfig +.idea +.vscode +.history +.temp +.env.local +.husky +.npmrc +.gitkeep +venv +temp +tmp +LICENSE + +# dependencies +node_modules +*.log +*.lock +package-lock.json + +# ci +coverage +.coverage +.eslintcache +.stylelintcache +test-output +__snapshots__ +*.snap + +# production +dist +es +lib +logs + +# umi +.umi +.umi-production +.umi-test +.dumi/tmp* + +# ignore files +.*ignore + +# docker +docker +Dockerfile* + +# image +*.webp +*.gif +*.png +*.jpg +*.svg + +# misc +# add other ignore file below +.next \ No newline at end of file diff --git a/DigitalHumanWeb/.prettierrc.js b/DigitalHumanWeb/.prettierrc.js new file mode 100644 index 0000000..f0355a9 --- /dev/null +++ b/DigitalHumanWeb/.prettierrc.js @@ -0,0 +1 @@ +module.exports = require('@lobehub/lint').prettier; diff --git a/DigitalHumanWeb/.releaserc.js b/DigitalHumanWeb/.releaserc.js new file mode 100644 index 0000000..3793001 --- /dev/null +++ b/DigitalHumanWeb/.releaserc.js @@ -0,0 +1 @@ +module.exports = require('@lobehub/lint').semanticRelease; diff --git a/DigitalHumanWeb/.remarkrc.js b/DigitalHumanWeb/.remarkrc.js new file mode 100644 index 0000000..b673c10 --- /dev/null +++ b/DigitalHumanWeb/.remarkrc.js @@ -0,0 +1 @@ +module.exports = require('@lobehub/lint').remarklint; diff --git a/DigitalHumanWeb/.seorc.cjs b/DigitalHumanWeb/.seorc.cjs new file mode 100644 index 0000000..5626a1a --- /dev/null +++ b/DigitalHumanWeb/.seorc.cjs @@ -0,0 +1,9 @@ +const { defineConfig } = require('@lobehub/seo-cli'); + +module.exports = defineConfig({ + entry: ['./docs/**/*.mdx'], + modelName: 'gpt-4o-mini', + experimental: { + jsonMode: true, + }, +}); diff --git a/DigitalHumanWeb/.stylelintrc.js b/DigitalHumanWeb/.stylelintrc.js new file mode 100644 index 0000000..d1ac674 --- /dev/null +++ b/DigitalHumanWeb/.stylelintrc.js @@ -0,0 +1,9 @@ +const config = require('@lobehub/lint').stylelint; + +module.exports = { + ...config, + rules: { + 'selector-id-pattern': null, + ...config.rules, + }, +}; diff --git a/DigitalHumanWeb/CHANGELOG.md b/DigitalHumanWeb/CHANGELOG.md new file mode 100644 index 0000000..9412782 --- /dev/null +++ b/DigitalHumanWeb/CHANGELOG.md @@ -0,0 +1,22838 @@ + + +# Changelog + +### [Version 1.19.33](https://github.com/lobehub/lobe-chat/compare/v1.19.32...v1.19.33) + +Released on **2024-09-25** + +#### 🐛 Bug Fixes + +- **misc**: MiniMax output long content interrupted by non-existent error. + +#### 💄 Styles + +- **misc**: Update google provider model info. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: MiniMax output long content interrupted by non-existent error, closes [#4088](https://github.com/lobehub/lobe-chat/issues/4088) ([4f6e20d](https://github.com/lobehub/lobe-chat/commit/4f6e20d)) + +#### Styles + +- **misc**: Update google provider model info, closes [#4129](https://github.com/lobehub/lobe-chat/issues/4129) ([b1442b9](https://github.com/lobehub/lobe-chat/commit/b1442b9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.32](https://github.com/lobehub/lobe-chat/compare/v1.19.31...v1.19.32) + +Released on **2024-09-25** + +#### 💄 Styles + +- **misc**: Add function call for `taichu_llm`. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add function call for `taichu_llm`, closes [#4119](https://github.com/lobehub/lobe-chat/issues/4119) ([8f629d8](https://github.com/lobehub/lobe-chat/commit/8f629d8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.31](https://github.com/lobehub/lobe-chat/compare/v1.19.30...v1.19.31) + +Released on **2024-09-24** + +#### 💄 Styles + +- **misc**: Add google gemini 1.5 002 series. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add google gemini 1.5 002 series, closes [#4118](https://github.com/lobehub/lobe-chat/issues/4118) ([10145fa](https://github.com/lobehub/lobe-chat/commit/10145fa)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.30](https://github.com/lobehub/lobe-chat/compare/v1.19.29...v1.19.30) + +Released on **2024-09-24** + +#### 💄 Styles + +- **misc**: Disable taichu2.0 functioncall & default disable taichu2.0v model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Disable taichu2.0 functioncall & default disable taichu2.0v model, closes [#4117](https://github.com/lobehub/lobe-chat/issues/4117) ([00da53b](https://github.com/lobehub/lobe-chat/commit/00da53b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.29](https://github.com/lobehub/lobe-chat/compare/v1.19.28...v1.19.29) + +Released on **2024-09-24** + +#### 💄 Styles + +- **misc**: Update taichu provider info & add taichu vision model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update taichu provider info & add taichu vision model, closes [#4114](https://github.com/lobehub/lobe-chat/issues/4114) ([e5331db](https://github.com/lobehub/lobe-chat/commit/e5331db)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.28](https://github.com/lobehub/lobe-chat/compare/v1.19.27...v1.19.28) + +Released on **2024-09-24** + +#### 💄 Styles + +- **misc**: Add function call support for Stepfun. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add function call support for Stepfun, closes [#4101](https://github.com/lobehub/lobe-chat/issues/4101) ([8d7d96e](https://github.com/lobehub/lobe-chat/commit/8d7d96e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.27](https://github.com/lobehub/lobe-chat/compare/v1.19.26...v1.19.27) + +Released on **2024-09-24** + +#### 💄 Styles + +- **misc**: Improve images display in chat messages. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve images display in chat messages, closes [#3475](https://github.com/lobehub/lobe-chat/issues/3475) ([c54c7ed](https://github.com/lobehub/lobe-chat/commit/c54c7ed)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.26](https://github.com/lobehub/lobe-chat/compare/v1.19.25...v1.19.26) + +Released on **2024-09-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix url config import after user state init. + +#### 💄 Styles + +- **misc**: Add support function call for 360AI, left sidebar has only assistants. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix url config import after user state init, closes [#4072](https://github.com/lobehub/lobe-chat/issues/4072) ([18a240c](https://github.com/lobehub/lobe-chat/commit/18a240c)) + +#### Styles + +- **misc**: Add support function call for 360AI, closes [#4099](https://github.com/lobehub/lobe-chat/issues/4099) ([536696b](https://github.com/lobehub/lobe-chat/commit/536696b)) +- **misc**: Left sidebar has only assistants, closes [#4108](https://github.com/lobehub/lobe-chat/issues/4108) ([db1f81c](https://github.com/lobehub/lobe-chat/commit/db1f81c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.25](https://github.com/lobehub/lobe-chat/compare/v1.19.24...v1.19.25) + +Released on **2024-09-24** + +#### 🐛 Bug Fixes + +- **misc**: Add missing translations. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add missing translations, closes [#4106](https://github.com/lobehub/lobe-chat/issues/4106) ([c24bf45](https://github.com/lobehub/lobe-chat/commit/c24bf45)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.24](https://github.com/lobehub/lobe-chat/compare/v1.19.23...v1.19.24) + +Released on **2024-09-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix artifacts code language highlight. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix artifacts code language highlight, closes [#4096](https://github.com/lobehub/lobe-chat/issues/4096) ([2d956a3](https://github.com/lobehub/lobe-chat/commit/2d956a3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.23](https://github.com/lobehub/lobe-chat/compare/v1.19.22...v1.19.23) + +Released on **2024-09-23** + +#### 💄 Styles + +- **misc**: Add spark max-32k model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add spark max-32k model, closes [#4071](https://github.com/lobehub/lobe-chat/issues/4071) ([c11b57b](https://github.com/lobehub/lobe-chat/commit/c11b57b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.22](https://github.com/lobehub/lobe-chat/compare/v1.19.21...v1.19.22) + +Released on **2024-09-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix ollama model download panel. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix ollama model download panel, closes [#4070](https://github.com/lobehub/lobe-chat/issues/4070) ([fc33336](https://github.com/lobehub/lobe-chat/commit/fc33336)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.21](https://github.com/lobehub/lobe-chat/compare/v1.19.20...v1.19.21) + +Released on **2024-09-21** + +#### ♻ Code Refactoring + +- **misc**: Refactor to improve branding customization. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to improve branding customization, closes [#4061](https://github.com/lobehub/lobe-chat/issues/4061) ([6199e68](https://github.com/lobehub/lobe-chat/commit/6199e68)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.20](https://github.com/lobehub/lobe-chat/compare/v1.19.19...v1.19.20) + +Released on **2024-09-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix Content-Security-Policy. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Content-Security-Policy, closes [#4056](https://github.com/lobehub/lobe-chat/issues/4056) ([d186062](https://github.com/lobehub/lobe-chat/commit/d186062)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.19](https://github.com/lobehub/lobe-chat/compare/v1.19.18...v1.19.19) + +Released on **2024-09-21** + +#### 🐛 Bug Fixes + +- **misc**: Casdoor webhooks providerAccountId not found. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Casdoor webhooks providerAccountId not found, closes [#4055](https://github.com/lobehub/lobe-chat/issues/4055) ([b832289](https://github.com/lobehub/lobe-chat/commit/b832289)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.18](https://github.com/lobehub/lobe-chat/compare/v1.19.17...v1.19.18) + +Released on **2024-09-21** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.17](https://github.com/lobehub/lobe-chat/compare/v1.19.16...v1.19.17) + +Released on **2024-09-21** + +#### 🐛 Bug Fixes + +- **misc**: `providerAccountId` not exist in provider. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: `providerAccountId` not exist in provider, closes [#4053](https://github.com/lobehub/lobe-chat/issues/4053) ([91d8999](https://github.com/lobehub/lobe-chat/commit/91d8999)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.16](https://github.com/lobehub/lobe-chat/compare/v1.19.15...v1.19.16) + +Released on **2024-09-21** + +#### 💄 Styles + +- **misc**: Improve i18n for discover and improve version check. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve i18n for discover and improve version check, closes [#4052](https://github.com/lobehub/lobe-chat/issues/4052) ([ef93712](https://github.com/lobehub/lobe-chat/commit/ef93712)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.15](https://github.com/lobehub/lobe-chat/compare/v1.19.14...v1.19.15) + +Released on **2024-09-20** + +#### 💄 Styles + +- **misc**: Improve i18n in discover. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve i18n in discover, closes [#4049](https://github.com/lobehub/lobe-chat/issues/4049) ([8170889](https://github.com/lobehub/lobe-chat/commit/8170889)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.14](https://github.com/lobehub/lobe-chat/compare/v1.19.13...v1.19.14) + +Released on **2024-09-20** + +#### 🐛 Bug Fixes + +- **misc**: Pin `shiki@1.17.7` to fix code highlight. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin `shiki@1.17.7` to fix code highlight, closes [#4047](https://github.com/lobehub/lobe-chat/issues/4047) ([d12bf4c](https://github.com/lobehub/lobe-chat/commit/d12bf4c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.13](https://github.com/lobehub/lobe-chat/compare/v1.19.12...v1.19.13) + +Released on **2024-09-20** + +#### 🐛 Bug Fixes + +- **misc**: Try to implement better ssrf-protect. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Try to implement better ssrf-protect, closes [#4044](https://github.com/lobehub/lobe-chat/issues/4044) ([e960a23](https://github.com/lobehub/lobe-chat/commit/e960a23)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.12](https://github.com/lobehub/lobe-chat/compare/v1.19.11...v1.19.12) + +Released on **2024-09-20** + +#### 💄 Styles + +- **misc**: Support webhooks for casdoor. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Support webhooks for casdoor, closes [#3942](https://github.com/lobehub/lobe-chat/issues/3942) ([1f2f6a5](https://github.com/lobehub/lobe-chat/commit/1f2f6a5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.11](https://github.com/lobehub/lobe-chat/compare/v1.19.10...v1.19.11) + +Released on **2024-09-20** + +#### 🐛 Bug Fixes + +- **misc**: Custom model initialization not taking effect error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Custom model initialization not taking effect error, closes [#4038](https://github.com/lobehub/lobe-chat/issues/4038) ([0e0d208](https://github.com/lobehub/lobe-chat/commit/0e0d208)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.10](https://github.com/lobehub/lobe-chat/compare/v1.19.9...v1.19.10) + +Released on **2024-09-20** + +#### 💄 Styles + +- **misc**: Add qwen2.5 math and coder model for siliconcloud provider. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add qwen2.5 math and coder model for siliconcloud provider, closes [#4043](https://github.com/lobehub/lobe-chat/issues/4043) ([d16578f](https://github.com/lobehub/lobe-chat/commit/d16578f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.9](https://github.com/lobehub/lobe-chat/compare/v1.19.8...v1.19.9) + +Released on **2024-09-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug with server agent config when user not exist. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug with server agent config when user not exist, closes [#4034](https://github.com/lobehub/lobe-chat/issues/4034) ([f6a232b](https://github.com/lobehub/lobe-chat/commit/f6a232b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.8](https://github.com/lobehub/lobe-chat/compare/v1.19.7...v1.19.8) + +Released on **2024-09-19** + +#### 💄 Styles + +- **misc**: Delete siliconflow outdated model & disable stepfun functioncall. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Delete siliconflow outdated model & disable stepfun functioncall, closes [#4033](https://github.com/lobehub/lobe-chat/issues/4033) ([08c53eb](https://github.com/lobehub/lobe-chat/commit/08c53eb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.7](https://github.com/lobehub/lobe-chat/compare/v1.19.6...v1.19.7) + +Released on **2024-09-19** + +#### 💄 Styles + +- **misc**: Add siliconflow qwen2.5 model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add siliconflow qwen2.5 model, closes [#4024](https://github.com/lobehub/lobe-chat/issues/4024) ([06ffd99](https://github.com/lobehub/lobe-chat/commit/06ffd99)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.6](https://github.com/lobehub/lobe-chat/compare/v1.19.5...v1.19.6) + +Released on **2024-09-19** + +#### ♻ Code Refactoring + +- **misc**: Refactor the tts route url. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the tts route url, closes [#4030](https://github.com/lobehub/lobe-chat/issues/4030) ([60dcf19](https://github.com/lobehub/lobe-chat/commit/60dcf19)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.5](https://github.com/lobehub/lobe-chat/compare/v1.19.4...v1.19.5) + +Released on **2024-09-19** + +#### 💄 Styles + +- **misc**: Enable functioncall for stepfun models, Update qwen models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Enable functioncall for stepfun models, closes [#4022](https://github.com/lobehub/lobe-chat/issues/4022) ([afb3509](https://github.com/lobehub/lobe-chat/commit/afb3509)) +- **misc**: Update qwen models, closes [#4026](https://github.com/lobehub/lobe-chat/issues/4026) ([6169e8f](https://github.com/lobehub/lobe-chat/commit/6169e8f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.4](https://github.com/lobehub/lobe-chat/compare/v1.19.3...v1.19.4) + +Released on **2024-09-19** + +#### ♻ Code Refactoring + +- **misc**: Refactor the sitemap implement. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the sitemap implement, closes [#4012](https://github.com/lobehub/lobe-chat/issues/4012) ([d93a161](https://github.com/lobehub/lobe-chat/commit/d93a161)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.3](https://github.com/lobehub/lobe-chat/compare/v1.19.2...v1.19.3) + +Released on **2024-09-19** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.2](https://github.com/lobehub/lobe-chat/compare/v1.19.1...v1.19.2) + +Released on **2024-09-19** + +#### 💄 Styles + +- **misc**: Updata qwen model info & add qwen2.5 & reorder provider list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Updata qwen model info & add qwen2.5 & reorder provider list, closes [#4020](https://github.com/lobehub/lobe-chat/issues/4020) ([d5e7578](https://github.com/lobehub/lobe-chat/commit/d5e7578)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.19.1](https://github.com/lobehub/lobe-chat/compare/v1.19.0...v1.19.1) + +Released on **2024-09-19** + +#### 💄 Styles + +- **misc**: Add mistral provider new models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add mistral provider new models, closes [#4014](https://github.com/lobehub/lobe-chat/issues/4014) ([0b70d57](https://github.com/lobehub/lobe-chat/commit/0b70d57)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.19.0](https://github.com/lobehub/lobe-chat/compare/v1.18.2...v1.19.0) + +Released on **2024-09-18** + +#### ✨ Features + +- **misc**: Add Ai21Labs model provider, add Github Models provider, support native Artifacts just like Claude. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Ai21Labs model provider, closes [#3727](https://github.com/lobehub/lobe-chat/issues/3727) ([d2fe0f0](https://github.com/lobehub/lobe-chat/commit/d2fe0f0)) +- **misc**: Add Github Models provider, closes [#3869](https://github.com/lobehub/lobe-chat/issues/3869) ([8eac1bd](https://github.com/lobehub/lobe-chat/commit/8eac1bd)) +- **misc**: Support native Artifacts just like Claude, closes [#3985](https://github.com/lobehub/lobe-chat/issues/3985) ([0c42c46](https://github.com/lobehub/lobe-chat/commit/0c42c46)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.18.2](https://github.com/lobehub/lobe-chat/compare/v1.18.1...v1.18.2) + +Released on **2024-09-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix InterceptingRoutes in discover. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix InterceptingRoutes in discover, closes [#4011](https://github.com/lobehub/lobe-chat/issues/4011) ([2b75040](https://github.com/lobehub/lobe-chat/commit/2b75040)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.18.1](https://github.com/lobehub/lobe-chat/compare/v1.18.0...v1.18.1) + +Released on **2024-09-18** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.18.0](https://github.com/lobehub/lobe-chat/compare/v1.17.7...v1.18.0) + +Released on **2024-09-18** + +#### ✨ Features + +- **misc**: Add Discover Page. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Discover Page, closes [#3848](https://github.com/lobehub/lobe-chat/issues/3848) ([f83cab6](https://github.com/lobehub/lobe-chat/commit/f83cab6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.7](https://github.com/lobehub/lobe-chat/compare/v1.17.6...v1.17.7) + +Released on **2024-09-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix a corner case of `tools_call` with empty object. + +#### 💄 Styles + +- **misc**: Delete duplicate models in ollama. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a corner case of `tools_call` with empty object, closes [#3955](https://github.com/lobehub/lobe-chat/issues/3955) ([d3fabdc](https://github.com/lobehub/lobe-chat/commit/d3fabdc)) + +#### Styles + +- **misc**: Delete duplicate models in ollama, closes [#3989](https://github.com/lobehub/lobe-chat/issues/3989) ([ece60ee](https://github.com/lobehub/lobe-chat/commit/ece60ee)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.6](https://github.com/lobehub/lobe-chat/compare/v1.17.5...v1.17.6) + +Released on **2024-09-15** + +#### ♻ Code Refactoring + +- **misc**: Rename artifacts to plugins in portal. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Rename artifacts to plugins in portal, closes [#3986](https://github.com/lobehub/lobe-chat/issues/3986) ([073b936](https://github.com/lobehub/lobe-chat/commit/073b936)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.5](https://github.com/lobehub/lobe-chat/compare/v1.17.4...v1.17.5) + +Released on **2024-09-15** + +#### 💄 Styles + +- **misc**: Add MiniCPM-V 8B model entries to Ollama model providers. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add MiniCPM-V 8B model entries to Ollama model providers, closes [#3984](https://github.com/lobehub/lobe-chat/issues/3984) ([f9c26de](https://github.com/lobehub/lobe-chat/commit/f9c26de)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.4](https://github.com/lobehub/lobe-chat/compare/v1.17.3...v1.17.4) + +Released on **2024-09-15** + +#### 💄 Styles + +- **misc**: Update fullscreen loading style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update fullscreen loading style, closes [#3948](https://github.com/lobehub/lobe-chat/issues/3948) ([aec21d2](https://github.com/lobehub/lobe-chat/commit/aec21d2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.3](https://github.com/lobehub/lobe-chat/compare/v1.17.2...v1.17.3) + +Released on **2024-09-14** + +#### 💄 Styles + +- **misc**: Delete "-" in deepseek displayname. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Delete "-" in deepseek displayname, closes [#3958](https://github.com/lobehub/lobe-chat/issues/3958) ([c0e89f5](https://github.com/lobehub/lobe-chat/commit/c0e89f5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.2](https://github.com/lobehub/lobe-chat/compare/v1.17.1...v1.17.2) + +Released on **2024-09-13** + +#### 🐛 Bug Fixes + +- **misc**: Fix o1 model list. + +#### 💄 Styles + +- **misc**: Update openrouter model list. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix o1 model list, closes [#3957](https://github.com/lobehub/lobe-chat/issues/3957) ([e04cdd9](https://github.com/lobehub/lobe-chat/commit/e04cdd9)) + +#### Styles + +- **misc**: Update openrouter model list, closes [#3954](https://github.com/lobehub/lobe-chat/issues/3954) ([1a1572b](https://github.com/lobehub/lobe-chat/commit/1a1572b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.17.1](https://github.com/lobehub/lobe-chat/compare/v1.17.0...v1.17.1) + +Released on **2024-09-13** + +#### 💄 Styles + +- **misc**: Update zhipu model info. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update zhipu model info, closes [#3949](https://github.com/lobehub/lobe-chat/issues/3949) ([bbdbfde](https://github.com/lobehub/lobe-chat/commit/bbdbfde)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.17.0](https://github.com/lobehub/lobe-chat/compare/v1.16.14...v1.17.0) + +Released on **2024-09-13** + +#### ✨ Features + +- **misc**: Support openai new OpenAI o1-preview/o1-mini models. + +#### 💄 Styles + +- **misc**: Support Google Model List. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support openai new OpenAI o1-preview/o1-mini models, closes [#3943](https://github.com/lobehub/lobe-chat/issues/3943) ([61bfeb2](https://github.com/lobehub/lobe-chat/commit/61bfeb2)) + +#### Styles + +- **misc**: Support Google Model List, closes [#3938](https://github.com/lobehub/lobe-chat/issues/3938) ([be4efc7](https://github.com/lobehub/lobe-chat/commit/be4efc7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.14](https://github.com/lobehub/lobe-chat/compare/v1.16.13...v1.16.14) + +Released on **2024-09-13** + +#### 💄 Styles + +- **model**: Remove `OpenAI` deprecated model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **model**: Remove `OpenAI` deprecated model, closes [#3465](https://github.com/lobehub/lobe-chat/issues/3465) ([68a4fb2](https://github.com/lobehub/lobe-chat/commit/68a4fb2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.13](https://github.com/lobehub/lobe-chat/compare/v1.16.12...v1.16.13) + +Released on **2024-09-13** + +#### 💄 Styles + +- **misc**: Update siliconcloud model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update siliconcloud model, closes [#3935](https://github.com/lobehub/lobe-chat/issues/3935) ([882e981](https://github.com/lobehub/lobe-chat/commit/882e981)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.12](https://github.com/lobehub/lobe-chat/compare/v1.16.11...v1.16.12) + +Released on **2024-09-12** + +#### 💄 Styles + +- **misc**: Remove brackets from model names with dates in OpenAI. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Remove brackets from model names with dates in OpenAI, closes [#3927](https://github.com/lobehub/lobe-chat/issues/3927) ([2a937bc](https://github.com/lobehub/lobe-chat/commit/2a937bc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.11](https://github.com/lobehub/lobe-chat/compare/v1.16.10...v1.16.11) + +Released on **2024-09-12** + +#### 🐛 Bug Fixes + +- **misc**: Support webhooks for logto. + +#### 💄 Styles + +- **misc**: Default disable mistral provider useless models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Support webhooks for logto, closes [#3774](https://github.com/lobehub/lobe-chat/issues/3774) ([0cfee6b](https://github.com/lobehub/lobe-chat/commit/0cfee6b)) + +#### Styles + +- **misc**: Default disable mistral provider useless models, closes [#3922](https://github.com/lobehub/lobe-chat/issues/3922) ([bdbc647](https://github.com/lobehub/lobe-chat/commit/bdbc647)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.10](https://github.com/lobehub/lobe-chat/compare/v1.16.9...v1.16.10) + +Released on **2024-09-12** + +#### ♻ Code Refactoring + +- **misc**: Support Environment Variable Inference For NextAuth. + +#### 🐛 Bug Fixes + +- **misc**: Qwen model param error. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Support Environment Variable Inference For NextAuth, closes [#3701](https://github.com/lobehub/lobe-chat/issues/3701) ([b956755](https://github.com/lobehub/lobe-chat/commit/b956755)) + +#### What's fixed + +- **misc**: Qwen model param error, closes [#3902](https://github.com/lobehub/lobe-chat/issues/3902) ([c9f00e5](https://github.com/lobehub/lobe-chat/commit/c9f00e5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.9](https://github.com/lobehub/lobe-chat/compare/v1.16.8...v1.16.9) + +Released on **2024-09-12** + +#### 💄 Styles + +- **misc**: Add model and provider desc and url. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add model and provider desc and url, closes [#3920](https://github.com/lobehub/lobe-chat/issues/3920) ([ea9ff00](https://github.com/lobehub/lobe-chat/commit/ea9ff00)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.8](https://github.com/lobehub/lobe-chat/compare/v1.16.7...v1.16.8) + +Released on **2024-09-12** + +#### 💄 Styles + +- **misc**: Improve models and add more info for providers and models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve models and add more info for providers and models, closes [#3911](https://github.com/lobehub/lobe-chat/issues/3911) ([8a8fc6a](https://github.com/lobehub/lobe-chat/commit/8a8fc6a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.7](https://github.com/lobehub/lobe-chat/compare/v1.16.6...v1.16.7) + +Released on **2024-09-11** + +#### 💄 Styles + +- **misc**: Optimize model token display method. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Optimize model token display method, closes [#3697](https://github.com/lobehub/lobe-chat/issues/3697) ([249795c](https://github.com/lobehub/lobe-chat/commit/249795c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.6](https://github.com/lobehub/lobe-chat/compare/v1.16.5...v1.16.6) + +Released on **2024-09-11** + +#### 🐛 Bug Fixes + +- **misc**: Pin `next@14.2.8` to fix Internal error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin `next@14.2.8` to fix Internal error, closes [#3905](https://github.com/lobehub/lobe-chat/issues/3905) ([1013652](https://github.com/lobehub/lobe-chat/commit/1013652)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.5](https://github.com/lobehub/lobe-chat/compare/v1.16.4...v1.16.5) + +Released on **2024-09-11** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.4](https://github.com/lobehub/lobe-chat/compare/v1.16.3...v1.16.4) + +Released on **2024-09-11** + +#### 💄 Styles + +- **ui**: Improve UI layout and text. + +
+ +
+Improvements and Fixes + +#### Styles + +- **ui**: Improve UI layout and text, closes [#3762](https://github.com/lobehub/lobe-chat/issues/3762) ([7c08f29](https://github.com/lobehub/lobe-chat/commit/7c08f29)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.3](https://github.com/lobehub/lobe-chat/compare/v1.16.2...v1.16.3) + +Released on **2024-09-11** + +#### 🐛 Bug Fixes + +- **misc**: Add `LLM_VISION_IMAGE_USE_BASE64` to support local s3 in vision model. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add `LLM_VISION_IMAGE_USE_BASE64` to support local s3 in vision model, closes [#3887](https://github.com/lobehub/lobe-chat/issues/3887) ([16e57ed](https://github.com/lobehub/lobe-chat/commit/16e57ed)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.2](https://github.com/lobehub/lobe-chat/compare/v1.16.1...v1.16.2) + +Released on **2024-09-11** + +#### 💄 Styles + +- **misc**: Update Upstage model list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Upstage model list, closes [#3890](https://github.com/lobehub/lobe-chat/issues/3890) ([82e2570](https://github.com/lobehub/lobe-chat/commit/82e2570)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.16.1](https://github.com/lobehub/lobe-chat/compare/v1.16.0...v1.16.1) + +Released on **2024-09-10** + +#### 💄 Styles + +- **misc**: Reorder the provider list, update spark check model to spark-lite & default disable useless model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Reorder the provider list, closes [#3886](https://github.com/lobehub/lobe-chat/issues/3886) ([4d641f5](https://github.com/lobehub/lobe-chat/commit/4d641f5)) +- **misc**: Update spark check model to spark-lite & default disable useless model, closes [#3885](https://github.com/lobehub/lobe-chat/issues/3885) ([9d7e47c](https://github.com/lobehub/lobe-chat/commit/9d7e47c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.16.0](https://github.com/lobehub/lobe-chat/compare/v1.15.35...v1.16.0) + +Released on **2024-09-10** + +#### ✨ Features + +- **misc**: Add Fireworks AI Model Provider, Add Spark model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Fireworks AI Model Provider, closes [#3392](https://github.com/lobehub/lobe-chat/issues/3392) [#48](https://github.com/lobehub/lobe-chat/issues/48) ([fa0d84d](https://github.com/lobehub/lobe-chat/commit/fa0d84d)) +- **misc**: Add Spark model provider, closes [#3098](https://github.com/lobehub/lobe-chat/issues/3098) [#25](https://github.com/lobehub/lobe-chat/issues/25) ([fc85c20](https://github.com/lobehub/lobe-chat/commit/fc85c20)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.35](https://github.com/lobehub/lobe-chat/compare/v1.15.34...v1.15.35) + +Released on **2024-09-10** + +#### 💄 Styles + +- **misc**: Update CustomLogo. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update CustomLogo, closes [#3874](https://github.com/lobehub/lobe-chat/issues/3874) ([dd7c8df](https://github.com/lobehub/lobe-chat/commit/dd7c8df)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.34](https://github.com/lobehub/lobe-chat/compare/v1.15.33...v1.15.34) + +Released on **2024-09-10** + +#### ♻ Code Refactoring + +- **misc**: Change empty content stream behavior. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Change empty content stream behavior, closes [#3883](https://github.com/lobehub/lobe-chat/issues/3883) ([e910f68](https://github.com/lobehub/lobe-chat/commit/e910f68)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.33](https://github.com/lobehub/lobe-chat/compare/v1.15.32...v1.15.33) + +Released on **2024-09-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix `/etc/resolv.conf`edit permission in docker image. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `/etc/resolv.conf`edit permission in docker image, closes [#3880](https://github.com/lobehub/lobe-chat/issues/3880) ([fdaa190](https://github.com/lobehub/lobe-chat/commit/fdaa190)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.32](https://github.com/lobehub/lobe-chat/compare/v1.15.31...v1.15.32) + +Released on **2024-09-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix tools calling in some edge cases. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix tools calling in some edge cases, closes [#3872](https://github.com/lobehub/lobe-chat/issues/3872) ([2ed759d](https://github.com/lobehub/lobe-chat/commit/2ed759d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.31](https://github.com/lobehub/lobe-chat/compare/v1.15.30...v1.15.31) + +Released on **2024-09-10** + +#### 🐛 Bug Fixes + +- **misc**: Baichuan should not introduce `freequency_penality` parameters. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Baichuan should not introduce `freequency_penality` parameters, closes [#3871](https://github.com/lobehub/lobe-chat/issues/3871) ([66a061e](https://github.com/lobehub/lobe-chat/commit/66a061e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.30](https://github.com/lobehub/lobe-chat/compare/v1.15.29...v1.15.30) + +Released on **2024-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix claude 3.5 image with s3 url. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix claude 3.5 image with s3 url, closes [#3870](https://github.com/lobehub/lobe-chat/issues/3870) ([89c8dd4](https://github.com/lobehub/lobe-chat/commit/89c8dd4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.29](https://github.com/lobehub/lobe-chat/compare/v1.15.28...v1.15.29) + +Released on **2024-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Gemini cannot input images when server database is enabled. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Gemini cannot input images when server database is enabled, closes [#3370](https://github.com/lobehub/lobe-chat/issues/3370) ([eb552d2](https://github.com/lobehub/lobe-chat/commit/eb552d2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.28](https://github.com/lobehub/lobe-chat/compare/v1.15.27...v1.15.28) + +Released on **2024-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Update baichuan param. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Update baichuan param, closes [#3356](https://github.com/lobehub/lobe-chat/issues/3356) ([29bced1](https://github.com/lobehub/lobe-chat/commit/29bced1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.27](https://github.com/lobehub/lobe-chat/compare/v1.15.26...v1.15.27) + +Released on **2024-09-09** + +#### ♻ Code Refactoring + +- **misc**: Refactor brand implement for better custom. + +#### 💄 Styles + +- **misc**: Add siliconcloud new model. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor brand implement for better custom, closes [#3868](https://github.com/lobehub/lobe-chat/issues/3868) ([815b366](https://github.com/lobehub/lobe-chat/commit/815b366)) + +#### Styles + +- **misc**: Add siliconcloud new model, closes [#3865](https://github.com/lobehub/lobe-chat/issues/3865) ([c6b5a45](https://github.com/lobehub/lobe-chat/commit/c6b5a45)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.26](https://github.com/lobehub/lobe-chat/compare/v1.15.25...v1.15.26) + +Released on **2024-09-09** + +#### 💄 Styles + +- **misc**: Update perplexity model list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update perplexity model list, closes [#3836](https://github.com/lobehub/lobe-chat/issues/3836) ([b70671b](https://github.com/lobehub/lobe-chat/commit/b70671b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.25](https://github.com/lobehub/lobe-chat/compare/v1.15.24...v1.15.25) + +Released on **2024-09-09** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.24](https://github.com/lobehub/lobe-chat/compare/v1.15.23...v1.15.24) + +Released on **2024-09-09** + +#### 💄 Styles + +- **misc**: Fix title in about settings. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix title in about settings, closes [#3841](https://github.com/lobehub/lobe-chat/issues/3841) ([6b7a366](https://github.com/lobehub/lobe-chat/commit/6b7a366)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.23](https://github.com/lobehub/lobe-chat/compare/v1.15.22...v1.15.23) + +Released on **2024-09-08** + +#### ♻ Code Refactoring + +- **misc**: Improve branding implement. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Improve branding implement, closes [#3832](https://github.com/lobehub/lobe-chat/issues/3832) ([b5e6b8b](https://github.com/lobehub/lobe-chat/commit/b5e6b8b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.22](https://github.com/lobehub/lobe-chat/compare/v1.15.21...v1.15.22) + +Released on **2024-09-08** + +#### 💄 Styles + +- **misc**: Update model display name & Remove Qwen preview model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update model display name & Remove Qwen preview model, closes [#3757](https://github.com/lobehub/lobe-chat/issues/3757) ([dd439ba](https://github.com/lobehub/lobe-chat/commit/dd439ba)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.21](https://github.com/lobehub/lobe-chat/compare/v1.15.20...v1.15.21) + +Released on **2024-09-08** + +#### ♻ Code Refactoring + +- **misc**: Temperature range from 0 to 2. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Temperature range from 0 to 2, closes [#3355](https://github.com/lobehub/lobe-chat/issues/3355) ([4a9114e](https://github.com/lobehub/lobe-chat/commit/4a9114e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.20](https://github.com/lobehub/lobe-chat/compare/v1.15.19...v1.15.20) + +Released on **2024-09-08** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.19](https://github.com/lobehub/lobe-chat/compare/v1.15.18...v1.15.19) + +Released on **2024-09-08** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.18](https://github.com/lobehub/lobe-chat/compare/v1.15.17...v1.15.18) + +Released on **2024-09-06** + +#### 💄 Styles + +- **misc**: Support anthropic browser request. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Support anthropic browser request, closes [#3798](https://github.com/lobehub/lobe-chat/issues/3798) ([743df51](https://github.com/lobehub/lobe-chat/commit/743df51)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.17](https://github.com/lobehub/lobe-chat/compare/v1.15.16...v1.15.17) + +Released on **2024-09-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix auth log. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auth log, closes [#3795](https://github.com/lobehub/lobe-chat/issues/3795) ([71aa405](https://github.com/lobehub/lobe-chat/commit/71aa405)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.16](https://github.com/lobehub/lobe-chat/compare/v1.15.15...v1.15.16) + +Released on **2024-09-06** + +#### 💄 Styles + +- **misc**: Update Bedrock model list & add `AWS_BEDROCK_MODEL_LIST` support. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Bedrock model list & add `AWS_BEDROCK_MODEL_LIST` support, closes [#3723](https://github.com/lobehub/lobe-chat/issues/3723) ([0aad972](https://github.com/lobehub/lobe-chat/commit/0aad972)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.15](https://github.com/lobehub/lobe-chat/compare/v1.15.14...v1.15.15) + +Released on **2024-09-06** + +#### 💄 Styles + +- **misc**: Add `LLaVA 1.5 7B` model in Groq. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add `LLaVA 1.5 7B` model in Groq, closes [#3769](https://github.com/lobehub/lobe-chat/issues/3769) ([f78a0b1](https://github.com/lobehub/lobe-chat/commit/f78a0b1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.14](https://github.com/lobehub/lobe-chat/compare/v1.15.13...v1.15.14) + +Released on **2024-09-06** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.13](https://github.com/lobehub/lobe-chat/compare/v1.15.12...v1.15.13) + +Released on **2024-09-06** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.12](https://github.com/lobehub/lobe-chat/compare/v1.15.11...v1.15.12) + +Released on **2024-09-04** + +#### 🐛 Bug Fixes + +- **misc**: Fix typo in RAG prompt. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix typo in RAG prompt, closes [#3764](https://github.com/lobehub/lobe-chat/issues/3764) ([ff61fa6](https://github.com/lobehub/lobe-chat/commit/ff61fa6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.11](https://github.com/lobehub/lobe-chat/compare/v1.15.10...v1.15.11) + +Released on **2024-09-04** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.10](https://github.com/lobehub/lobe-chat/compare/v1.15.9...v1.15.10) + +Released on **2024-09-03** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.9](https://github.com/lobehub/lobe-chat/compare/v1.15.8...v1.15.9) + +Released on **2024-09-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix speed and rag prompt. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix speed and rag prompt, closes [#3751](https://github.com/lobehub/lobe-chat/issues/3751) ([dce200c](https://github.com/lobehub/lobe-chat/commit/dce200c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.8](https://github.com/lobehub/lobe-chat/compare/v1.15.7...v1.15.8) + +Released on **2024-09-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix `.PDF` can not be chunked. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `.PDF` can not be chunked, closes [#3720](https://github.com/lobehub/lobe-chat/issues/3720) ([4244c04](https://github.com/lobehub/lobe-chat/commit/4244c04)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.7](https://github.com/lobehub/lobe-chat/compare/v1.15.6...v1.15.7) + +Released on **2024-09-03** + +#### 💄 Styles + +- **misc**: Fix provider disabled title style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix provider disabled title style, closes [#3743](https://github.com/lobehub/lobe-chat/issues/3743) ([2c72452](https://github.com/lobehub/lobe-chat/commit/2c72452)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.6](https://github.com/lobehub/lobe-chat/compare/v1.15.5...v1.15.6) + +Released on **2024-09-01** + +#### 💄 Styles + +- **misc**: Stepfun default enabled model, update Groq model list & add `GROQ_MODEL_LIST` support. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Stepfun default enabled model, closes [#3712](https://github.com/lobehub/lobe-chat/issues/3712) ([7e41d54](https://github.com/lobehub/lobe-chat/commit/7e41d54)) +- **misc**: Update Groq model list & add `GROQ_MODEL_LIST` support, closes [#3716](https://github.com/lobehub/lobe-chat/issues/3716) ([75c9247](https://github.com/lobehub/lobe-chat/commit/75c9247)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.5](https://github.com/lobehub/lobe-chat/compare/v1.15.4...v1.15.5) + +Released on **2024-09-01** + +#### 💄 Styles + +- **misc**: Update Together AI model list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Together AI model list, closes [#3713](https://github.com/lobehub/lobe-chat/issues/3713) ([0dde3b1](https://github.com/lobehub/lobe-chat/commit/0dde3b1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.4](https://github.com/lobehub/lobe-chat/compare/v1.15.3...v1.15.4) + +Released on **2024-09-01** + +#### 💄 Styles + +- **misc**: Update Novita AI model info & add `NOVITA_MODEL_LIST` support. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Novita AI model info & add `NOVITA_MODEL_LIST` support, closes [#3715](https://github.com/lobehub/lobe-chat/issues/3715) ([4ab33f6](https://github.com/lobehub/lobe-chat/commit/4ab33f6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.3](https://github.com/lobehub/lobe-chat/compare/v1.15.2...v1.15.3) + +Released on **2024-09-01** + +#### 💄 Styles + +- **misc**: Add `*_MODEL_LIST` for Qwen and ZeroOne, fix model info, update Claude 3.5 Sonnet maxOutput vaule. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add `*_MODEL_LIST` for Qwen and ZeroOne, closes [#3704](https://github.com/lobehub/lobe-chat/issues/3704) ([05419dc](https://github.com/lobehub/lobe-chat/commit/05419dc)) +- **misc**: Fix model info, closes [#3696](https://github.com/lobehub/lobe-chat/issues/3696) ([4d98037](https://github.com/lobehub/lobe-chat/commit/4d98037)) +- **misc**: Update Claude 3.5 Sonnet maxOutput vaule, closes [#3705](https://github.com/lobehub/lobe-chat/issues/3705) ([685bd74](https://github.com/lobehub/lobe-chat/commit/685bd74)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.2](https://github.com/lobehub/lobe-chat/compare/v1.15.1...v1.15.2) + +Released on **2024-08-30** + +#### 💄 Styles + +- **misc**: Update Qwen and Gemini models info. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Qwen and Gemini models info, closes [#3693](https://github.com/lobehub/lobe-chat/issues/3693) ([ba01641](https://github.com/lobehub/lobe-chat/commit/ba01641)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.15.1](https://github.com/lobehub/lobe-chat/compare/v1.15.0...v1.15.1) + +Released on **2024-08-30** + +#### 💄 Styles + +- **misc**: Update the sorting of each provider model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update the sorting of each provider model, closes [#3689](https://github.com/lobehub/lobe-chat/issues/3689) ([e82c9dd](https://github.com/lobehub/lobe-chat/commit/e82c9dd)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.15.0](https://github.com/lobehub/lobe-chat/compare/v1.14.12...v1.15.0) + +Released on **2024-08-30** + +#### ✨ Features + +- **misc**: Add Upstage model provider support. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Upstage model provider support, closes [#3670](https://github.com/lobehub/lobe-chat/issues/3670) ([4b8591b](https://github.com/lobehub/lobe-chat/commit/4b8591b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.12](https://github.com/lobehub/lobe-chat/compare/v1.14.11...v1.14.12) + +Released on **2024-08-30** + +#### 💄 Styles + +- **misc**: Fix ms doc file preview, Update the sorting of each provider model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix ms doc file preview, closes [#3686](https://github.com/lobehub/lobe-chat/issues/3686) ([2cd78cf](https://github.com/lobehub/lobe-chat/commit/2cd78cf)) +- **misc**: Update the sorting of each provider model, closes [#3688](https://github.com/lobehub/lobe-chat/issues/3688) ([2630bbc](https://github.com/lobehub/lobe-chat/commit/2630bbc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.11](https://github.com/lobehub/lobe-chat/compare/v1.14.10...v1.14.11) + +Released on **2024-08-30** + +#### 💄 Styles + +- **misc**: Update Stepfun models info. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Stepfun models info, closes [#3685](https://github.com/lobehub/lobe-chat/issues/3685) ([478b40a](https://github.com/lobehub/lobe-chat/commit/478b40a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.10](https://github.com/lobehub/lobe-chat/compare/v1.14.9...v1.14.10) + +Released on **2024-08-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix file relative chunks. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix file relative chunks, closes [#3676](https://github.com/lobehub/lobe-chat/issues/3676) ([afe1906](https://github.com/lobehub/lobe-chat/commit/afe1906)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.9](https://github.com/lobehub/lobe-chat/compare/v1.14.8...v1.14.9) + +Released on **2024-08-29** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.8](https://github.com/lobehub/lobe-chat/compare/v1.14.7...v1.14.8) + +Released on **2024-08-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix whisper-1 typo. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix whisper-1 typo, closes [#3665](https://github.com/lobehub/lobe-chat/issues/3665) ([084c971](https://github.com/lobehub/lobe-chat/commit/084c971)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.7](https://github.com/lobehub/lobe-chat/compare/v1.14.6...v1.14.7) + +Released on **2024-08-28** + +#### 🐛 Bug Fixes + +- **misc**: Disable ChatGPT-4o Tools Calling. + +#### 💄 Styles + +- **misc**: Improve chunk and file preview. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Disable ChatGPT-4o Tools Calling, closes [#3659](https://github.com/lobehub/lobe-chat/issues/3659) ([c94077d](https://github.com/lobehub/lobe-chat/commit/c94077d)) + +#### Styles + +- **misc**: Improve chunk and file preview, closes [#3658](https://github.com/lobehub/lobe-chat/issues/3658) ([4c9155c](https://github.com/lobehub/lobe-chat/commit/4c9155c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.6](https://github.com/lobehub/lobe-chat/compare/v1.14.5...v1.14.6) + +Released on **2024-08-28** + +#### 💄 Styles + +- **misc**: Update Gemini models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Gemini models, closes [#3653](https://github.com/lobehub/lobe-chat/issues/3653) ([b61ca4c](https://github.com/lobehub/lobe-chat/commit/b61ca4c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.5](https://github.com/lobehub/lobe-chat/compare/v1.14.4...v1.14.5) + +Released on **2024-08-28** + +#### 🐛 Bug Fixes + +- **misc**: No user name if Cloudflare Zero Trust with onetimepin. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: No user name if Cloudflare Zero Trust with onetimepin, closes [#3649](https://github.com/lobehub/lobe-chat/issues/3649) ([5bfee5a](https://github.com/lobehub/lobe-chat/commit/5bfee5a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.4](https://github.com/lobehub/lobe-chat/compare/v1.14.3...v1.14.4) + +Released on **2024-08-28** + +#### 💄 Styles + +- **misc**: Move model and provider icon components to `@lobehub/icons`. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Move model and provider icon components to `@lobehub/icons`, closes [#3634](https://github.com/lobehub/lobe-chat/issues/3634) ([5c7e17a](https://github.com/lobehub/lobe-chat/commit/5c7e17a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.3](https://github.com/lobehub/lobe-chat/compare/v1.14.2...v1.14.3) + +Released on **2024-08-27** + +#### 🐛 Bug Fixes + +- **misc**: Improve aysnc error type. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Improve aysnc error type, closes [#3638](https://github.com/lobehub/lobe-chat/issues/3638) ([dbae456](https://github.com/lobehub/lobe-chat/commit/dbae456)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.2](https://github.com/lobehub/lobe-chat/compare/v1.14.1...v1.14.2) + +Released on **2024-08-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent setting. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent setting, closes [#3633](https://github.com/lobehub/lobe-chat/issues/3633) ([298fddb](https://github.com/lobehub/lobe-chat/commit/298fddb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.14.1](https://github.com/lobehub/lobe-chat/compare/v1.14.0...v1.14.1) + +Released on **2024-08-27** + +#### 💄 Styles + +- **misc**: Improve zhipu model config. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve zhipu model config, closes [#3635](https://github.com/lobehub/lobe-chat/issues/3635) ([1274e6a](https://github.com/lobehub/lobe-chat/commit/1274e6a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.14.0](https://github.com/lobehub/lobe-chat/compare/v1.13.2...v1.14.0) + +Released on **2024-08-27** + +#### ✨ Features + +- **misc**: Supports Cloudflare Zero Trust login. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Supports Cloudflare Zero Trust login, closes [#3624](https://github.com/lobehub/lobe-chat/issues/3624) ([ac2bf68](https://github.com/lobehub/lobe-chat/commit/ac2bf68)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.13.2](https://github.com/lobehub/lobe-chat/compare/v1.13.1...v1.13.2) + +Released on **2024-08-27** + +#### 🐛 Bug Fixes + +- **misc**: Bypass vercel deployment protection, fix can send message on uploading files. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Bypass vercel deployment protection, closes [#3627](https://github.com/lobehub/lobe-chat/issues/3627) ([47da20d](https://github.com/lobehub/lobe-chat/commit/47da20d)) +- **misc**: Fix can send message on uploading files, closes [#3618](https://github.com/lobehub/lobe-chat/issues/3618) ([fe4329a](https://github.com/lobehub/lobe-chat/commit/fe4329a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.13.1](https://github.com/lobehub/lobe-chat/compare/v1.13.0...v1.13.1) + +Released on **2024-08-27** + +#### 💄 Styles + +- **misc**: Update Qwen models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Qwen models, closes [#3626](https://github.com/lobehub/lobe-chat/issues/3626) ([4393386](https://github.com/lobehub/lobe-chat/commit/4393386)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.13.0](https://github.com/lobehub/lobe-chat/compare/v1.12.20...v1.13.0) + +Released on **2024-08-27** + +#### ✨ Features + +- **misc**: Supports Authelia login. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Supports Authelia login, closes [#3589](https://github.com/lobehub/lobe-chat/issues/3589) ([2141ae7](https://github.com/lobehub/lobe-chat/commit/2141ae7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.20](https://github.com/lobehub/lobe-chat/compare/v1.12.19...v1.12.20) + +Released on **2024-08-26** + +#### 🐛 Bug Fixes + +- **misc**: Feature flag `knowledge_base` doesn't affect ActionBar. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Feature flag `knowledge_base` doesn't affect ActionBar, closes [#3609](https://github.com/lobehub/lobe-chat/issues/3609) ([1a5286b](https://github.com/lobehub/lobe-chat/commit/1a5286b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.19](https://github.com/lobehub/lobe-chat/compare/v1.12.18...v1.12.19) + +Released on **2024-08-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix cannot clone agent when imported from client. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix cannot clone agent when imported from client, closes [#3606](https://github.com/lobehub/lobe-chat/issues/3606) ([1fd2fa0](https://github.com/lobehub/lobe-chat/commit/1fd2fa0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.18](https://github.com/lobehub/lobe-chat/compare/v1.12.17...v1.12.18) + +Released on **2024-08-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix dayjs error in en-US language. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix dayjs error in en-US language, closes [#3604](https://github.com/lobehub/lobe-chat/issues/3604) ([174f4df](https://github.com/lobehub/lobe-chat/commit/174f4df)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.17](https://github.com/lobehub/lobe-chat/compare/v1.12.16...v1.12.17) + +Released on **2024-08-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix multi file upload dupicate. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix multi file upload dupicate, closes [#3603](https://github.com/lobehub/lobe-chat/issues/3603) ([60dbed7](https://github.com/lobehub/lobe-chat/commit/60dbed7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.16](https://github.com/lobehub/lobe-chat/compare/v1.12.15...v1.12.16) + +Released on **2024-08-24** + +#### 🐛 Bug Fixes + +- **misc**: Session not found error on mobile. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Session not found error on mobile, closes [#3428](https://github.com/lobehub/lobe-chat/issues/3428) ([7e9c15e](https://github.com/lobehub/lobe-chat/commit/7e9c15e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.15](https://github.com/lobehub/lobe-chat/compare/v1.12.14...v1.12.15) + +Released on **2024-08-24** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.14](https://github.com/lobehub/lobe-chat/compare/v1.12.13...v1.12.14) + +Released on **2024-08-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix tts file saving in server mode. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix tts file saving in server mode, closes [#3585](https://github.com/lobehub/lobe-chat/issues/3585) ([ab1cb47](https://github.com/lobehub/lobe-chat/commit/ab1cb47)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.13](https://github.com/lobehub/lobe-chat/compare/v1.12.12...v1.12.13) + +Released on **2024-08-24** + +#### 💄 Styles + +- **misc**: Update 01.AI models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update 01.AI models, closes [#3586](https://github.com/lobehub/lobe-chat/issues/3586) ([c4a7f70](https://github.com/lobehub/lobe-chat/commit/c4a7f70)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.12](https://github.com/lobehub/lobe-chat/compare/v1.12.11...v1.12.12) + +Released on **2024-08-24** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.11](https://github.com/lobehub/lobe-chat/compare/v1.12.10...v1.12.11) + +Released on **2024-08-23** + +#### 🐛 Bug Fixes + +- **misc**: Remove orphan chunks if there is no related file. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Remove orphan chunks if there is no related file, closes [#3578](https://github.com/lobehub/lobe-chat/issues/3578) ([36bcaf3](https://github.com/lobehub/lobe-chat/commit/36bcaf3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.10](https://github.com/lobehub/lobe-chat/compare/v1.12.9...v1.12.10) + +Released on **2024-08-23** + +#### 🐛 Bug Fixes + +- **misc**: Refactor and fix dalle. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Refactor and fix dalle, closes [#3572](https://github.com/lobehub/lobe-chat/issues/3572) ([8b39b61](https://github.com/lobehub/lobe-chat/commit/8b39b61)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.9](https://github.com/lobehub/lobe-chat/compare/v1.12.8...v1.12.9) + +Released on **2024-08-23** + +#### 🐛 Bug Fixes + +- **misc**: Improve s3 path-style url. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Improve s3 path-style url, closes [#3567](https://github.com/lobehub/lobe-chat/issues/3567) ([96bb38a](https://github.com/lobehub/lobe-chat/commit/96bb38a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.8](https://github.com/lobehub/lobe-chat/compare/v1.12.7...v1.12.8) + +Released on **2024-08-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix `NEXT_PUBLIC_S3_DOMAIN` error on Docker. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `NEXT_PUBLIC_S3_DOMAIN` error on Docker, closes [#3564](https://github.com/lobehub/lobe-chat/issues/3564) ([bc6b64c](https://github.com/lobehub/lobe-chat/commit/bc6b64c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.7](https://github.com/lobehub/lobe-chat/compare/v1.12.6...v1.12.7) + +Released on **2024-08-22** + +#### 🐛 Bug Fixes + +- **misc**: Logout button not shown on mobile view when using nextauth. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Logout button not shown on mobile view when using nextauth, closes [#3561](https://github.com/lobehub/lobe-chat/issues/3561) ([0c4efe4](https://github.com/lobehub/lobe-chat/commit/0c4efe4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.6](https://github.com/lobehub/lobe-chat/compare/v1.12.5...v1.12.6) + +Released on **2024-08-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor s3 env and support path-style for minio. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor s3 env and support path-style for minio, closes [#3559](https://github.com/lobehub/lobe-chat/issues/3559) ([1658403](https://github.com/lobehub/lobe-chat/commit/1658403)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.5](https://github.com/lobehub/lobe-chat/compare/v1.12.4...v1.12.5) + +Released on **2024-08-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix clipboard copy issue and improve upload cors feedback. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix clipboard copy issue and improve upload cors feedback, closes [#3557](https://github.com/lobehub/lobe-chat/issues/3557) ([86c5a99](https://github.com/lobehub/lobe-chat/commit/86c5a99)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.4](https://github.com/lobehub/lobe-chat/compare/v1.12.3...v1.12.4) + +Released on **2024-08-22** + +#### 💄 Styles + +- **misc**: Fix link style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix link style, closes [#3552](https://github.com/lobehub/lobe-chat/issues/3552) ([aa936c8](https://github.com/lobehub/lobe-chat/commit/aa936c8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.3](https://github.com/lobehub/lobe-chat/compare/v1.12.2...v1.12.3) + +Released on **2024-08-22** + +#### 💄 Styles + +- **misc**: Hide settings in repo. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Hide settings in repo, closes [#3540](https://github.com/lobehub/lobe-chat/issues/3540) ([86c1165](https://github.com/lobehub/lobe-chat/commit/86c1165)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.2](https://github.com/lobehub/lobe-chat/compare/v1.12.1...v1.12.2) + +Released on **2024-08-22** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.12.1](https://github.com/lobehub/lobe-chat/compare/v1.12.0...v1.12.1) + +Released on **2024-08-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix embeddings multi-insert when there is issues with async task. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix embeddings multi-insert when there is issues with async task, closes [#3530](https://github.com/lobehub/lobe-chat/issues/3530) ([e2cfff7](https://github.com/lobehub/lobe-chat/commit/e2cfff7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.12.0](https://github.com/lobehub/lobe-chat/compare/v1.11.9...v1.12.0) + +Released on **2024-08-21** + +#### ✨ Features + +- **misc**: Files and knowledge base. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Files and knowledge base, closes [#3487](https://github.com/lobehub/lobe-chat/issues/3487) ([6574c01](https://github.com/lobehub/lobe-chat/commit/6574c01)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.9](https://github.com/lobehub/lobe-chat/compare/v1.11.8...v1.11.9) + +Released on **2024-08-19** + +#### 🐛 Bug Fixes + +- **misc**: Fixed bedrock llama model id. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fixed bedrock llama model id, closes [#3518](https://github.com/lobehub/lobe-chat/issues/3518) ([34b4c69](https://github.com/lobehub/lobe-chat/commit/34b4c69)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.8](https://github.com/lobehub/lobe-chat/compare/v1.11.7...v1.11.8) + +Released on **2024-08-19** + +#### 💄 Styles + +- **misc**: Update zhipu models. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update zhipu models, closes [#3509](https://github.com/lobehub/lobe-chat/issues/3509) ([e323b50](https://github.com/lobehub/lobe-chat/commit/e323b50)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.7](https://github.com/lobehub/lobe-chat/compare/v1.11.6...v1.11.7) + +Released on **2024-08-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix topic scroll issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix topic scroll issue, closes [#3505](https://github.com/lobehub/lobe-chat/issues/3505) ([c719c7a](https://github.com/lobehub/lobe-chat/commit/c719c7a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.6](https://github.com/lobehub/lobe-chat/compare/v1.11.5...v1.11.6) + +Released on **2024-08-18** + +#### ♻ Code Refactoring + +- **misc**: Refactor the `SITE_URL` to `APP_URL`. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the `SITE_URL` to `APP_URL`, closes [#3504](https://github.com/lobehub/lobe-chat/issues/3504) ([46bdcea](https://github.com/lobehub/lobe-chat/commit/46bdcea)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.5](https://github.com/lobehub/lobe-chat/compare/v1.11.4...v1.11.5) + +Released on **2024-08-18** + +#### ♻ Code Refactoring + +- **misc**: Refactor the fetch method to fix `response.undefined`. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the fetch method to fix `response.undefined`, closes [#3493](https://github.com/lobehub/lobe-chat/issues/3493) ([30d0609](https://github.com/lobehub/lobe-chat/commit/30d0609)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.4](https://github.com/lobehub/lobe-chat/compare/v1.11.3...v1.11.4) + +Released on **2024-08-18** + +#### 💄 Styles + +- **misc**: Add `SILICONCLOUD_MODEL_LIST` & `SILICONCLOUD_PROXY_URL` support for SiliconCloud. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add `SILICONCLOUD_MODEL_LIST` & `SILICONCLOUD_PROXY_URL` support for SiliconCloud, closes [#3492](https://github.com/lobehub/lobe-chat/issues/3492) ([e41be6d](https://github.com/lobehub/lobe-chat/commit/e41be6d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.3](https://github.com/lobehub/lobe-chat/compare/v1.11.2...v1.11.3) + +Released on **2024-08-17** + +#### ♻ Code Refactoring + +- **misc**: Refactor PanelTitle and move commit from file uploading. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor PanelTitle and move commit from file uploading, closes [#3491](https://github.com/lobehub/lobe-chat/issues/3491) ([d03d9f6](https://github.com/lobehub/lobe-chat/commit/d03d9f6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.2](https://github.com/lobehub/lobe-chat/compare/v1.11.1...v1.11.2) + +Released on **2024-08-17** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.11.1](https://github.com/lobehub/lobe-chat/compare/v1.11.0...v1.11.1) + +Released on **2024-08-15** + +#### 🐛 Bug Fixes + +- **misc**: Make S3 upload ACL setting optional. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Make S3 upload ACL setting optional, closes [#3464](https://github.com/lobehub/lobe-chat/issues/3464) ([53a0b47](https://github.com/lobehub/lobe-chat/commit/53a0b47)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.11.0](https://github.com/lobehub/lobe-chat/compare/v1.10.1...v1.11.0) + +Released on **2024-08-14** + +#### ✨ Features + +- **misc**: Add 2 new models to openai provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add 2 new models to openai provider, closes [#3470](https://github.com/lobehub/lobe-chat/issues/3470) ([cc9ffdd](https://github.com/lobehub/lobe-chat/commit/cc9ffdd)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.10.1](https://github.com/lobehub/lobe-chat/compare/v1.10.0...v1.10.1) + +Released on **2024-08-14** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.10.0](https://github.com/lobehub/lobe-chat/compare/v1.9.8...v1.10.0) + +Released on **2024-08-14** + +#### ✨ Features + +- **misc**: Add SiliconCloud model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add SiliconCloud model provider, closes [#3092](https://github.com/lobehub/lobe-chat/issues/3092) ([0781dc5](https://github.com/lobehub/lobe-chat/commit/0781dc5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.8](https://github.com/lobehub/lobe-chat/compare/v1.9.7...v1.9.8) + +Released on **2024-08-13** + +#### 💄 Styles + +- **misc**: Resize the image size in chat message. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Resize the image size in chat message, closes [#3462](https://github.com/lobehub/lobe-chat/issues/3462) ([37c7429](https://github.com/lobehub/lobe-chat/commit/37c7429)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.7](https://github.com/lobehub/lobe-chat/compare/v1.9.6...v1.9.7) + +Released on **2024-08-13** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.6](https://github.com/lobehub/lobe-chat/compare/v1.9.5...v1.9.6) + +Released on **2024-08-09** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.5](https://github.com/lobehub/lobe-chat/compare/v1.9.4...v1.9.5) + +Released on **2024-08-08** + +#### 💄 Styles + +- **misc**: Updated AWS bedrock model list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Updated AWS bedrock model list, closes [#3315](https://github.com/lobehub/lobe-chat/issues/3315) ([042f2d3](https://github.com/lobehub/lobe-chat/commit/042f2d3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.4](https://github.com/lobehub/lobe-chat/compare/v1.9.3...v1.9.4) + +Released on **2024-08-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix import clerk `AuthObject` from public api. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix import clerk `AuthObject` from public api, closes [#3416](https://github.com/lobehub/lobe-chat/issues/3416) ([af8960d](https://github.com/lobehub/lobe-chat/commit/af8960d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.3](https://github.com/lobehub/lobe-chat/compare/v1.9.2...v1.9.3) + +Released on **2024-08-06** + +#### ♻ Code Refactoring + +- **misc**: Refactor server db schema for better code organize. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor server db schema for better code organize, closes [#3410](https://github.com/lobehub/lobe-chat/issues/3410) ([4743bfd](https://github.com/lobehub/lobe-chat/commit/4743bfd)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.2](https://github.com/lobehub/lobe-chat/compare/v1.9.1...v1.9.2) + +Released on **2024-08-05** + +#### 💄 Styles + +- **config**: Update Azure model and API versions. + +
+ +
+Improvements and Fixes + +#### Styles + +- **config**: Update Azure model and API versions, closes [#3405](https://github.com/lobehub/lobe-chat/issues/3405) ([a4938eb](https://github.com/lobehub/lobe-chat/commit/a4938eb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.9.1](https://github.com/lobehub/lobe-chat/compare/v1.9.0...v1.9.1) + +Released on **2024-08-05** + +#### 🐛 Bug Fixes + +- **misc**: Azure modelTag icon display. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Azure modelTag icon display, closes [#3394](https://github.com/lobehub/lobe-chat/issues/3394) ([ee6baa8](https://github.com/lobehub/lobe-chat/commit/ee6baa8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.9.0](https://github.com/lobehub/lobe-chat/compare/v1.8.2...v1.9.0) + +Released on **2024-08-05** + +#### ✨ Features + +- **misc**: Skip login page if only one provider exists. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Skip login page if only one provider exists, closes [#3400](https://github.com/lobehub/lobe-chat/issues/3400) ([52da1d8](https://github.com/lobehub/lobe-chat/commit/52da1d8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.8.2](https://github.com/lobehub/lobe-chat/compare/v1.8.1...v1.8.2) + +Released on **2024-08-03** + +#### 🐛 Bug Fixes + +- **misc**: Add `PROXY_URL` in docker with proxychains-ng. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add `PROXY_URL` in docker with proxychains-ng, closes [#3362](https://github.com/lobehub/lobe-chat/issues/3362) ([920de7c](https://github.com/lobehub/lobe-chat/commit/920de7c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.8.1](https://github.com/lobehub/lobe-chat/compare/v1.8.0...v1.8.1) + +Released on **2024-08-03** + +#### 💄 Styles + +- **misc**: Fix `aya`, `mathstral` model tag icon & update ollama model info. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix `aya`, `mathstral` model tag icon & update ollama model info, closes [#3382](https://github.com/lobehub/lobe-chat/issues/3382) ([ced95a8](https://github.com/lobehub/lobe-chat/commit/ced95a8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.8.0](https://github.com/lobehub/lobe-chat/compare/v1.7.10...v1.8.0) + +Released on **2024-08-02** + +#### ✨ Features + +- **misc**: Add NextAuth as authentication service in server database. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add NextAuth as authentication service in server database, closes [#2935](https://github.com/lobehub/lobe-chat/issues/2935) ([5a0b972](https://github.com/lobehub/lobe-chat/commit/5a0b972)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.10](https://github.com/lobehub/lobe-chat/compare/v1.7.9...v1.7.10) + +Released on **2024-08-02** + +#### 💄 Styles + +- **misc**: Add Gemini 1.5 Pro Exp model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add Gemini 1.5 Pro Exp model, closes [#3384](https://github.com/lobehub/lobe-chat/issues/3384) ([0de8b7b](https://github.com/lobehub/lobe-chat/commit/0de8b7b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.9](https://github.com/lobehub/lobe-chat/compare/v1.7.8...v1.7.9) + +Released on **2024-08-01** + +#### 🐛 Bug Fixes + +- **misc**: Fix Mistral models calling & update model info. + +#### 💄 Styles + +- **misc**: Fix stepfun & baichuan model tag icon missing, update Perplexity models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Mistral models calling & update model info, closes [#3377](https://github.com/lobehub/lobe-chat/issues/3377) [#3098](https://github.com/lobehub/lobe-chat/issues/3098) ([66274d0](https://github.com/lobehub/lobe-chat/commit/66274d0)) + +#### Styles + +- **misc**: Fix stepfun & baichuan model tag icon missing, closes [#3379](https://github.com/lobehub/lobe-chat/issues/3379) ([e283ef4](https://github.com/lobehub/lobe-chat/commit/e283ef4)) +- **misc**: Update Perplexity models, closes [#3380](https://github.com/lobehub/lobe-chat/issues/3380) ([06cb946](https://github.com/lobehub/lobe-chat/commit/06cb946)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.8](https://github.com/lobehub/lobe-chat/compare/v1.7.7...v1.7.8) + +Released on **2024-07-30** + +#### 💄 Styles + +- **ui**: Modify and repair UI layout. + +
+ +
+Improvements and Fixes + +#### Styles + +- **ui**: Modify and repair UI layout, closes [#3321](https://github.com/lobehub/lobe-chat/issues/3321) ([cda776f](https://github.com/lobehub/lobe-chat/commit/cda776f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.7](https://github.com/lobehub/lobe-chat/compare/v1.7.6...v1.7.7) + +Released on **2024-07-30** + +#### 💄 Styles + +- **misc**: Improve tools calling UI. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve tools calling UI, closes [#3326](https://github.com/lobehub/lobe-chat/issues/3326) ([36cabc0](https://github.com/lobehub/lobe-chat/commit/36cabc0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.6](https://github.com/lobehub/lobe-chat/compare/v1.7.5...v1.7.6) + +Released on **2024-07-29** + +#### 🐛 Bug Fixes + +- **misc**: Disable anthropic browser request. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Disable anthropic browser request, closes [#3359](https://github.com/lobehub/lobe-chat/issues/3359) ([a519837](https://github.com/lobehub/lobe-chat/commit/a519837)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.5](https://github.com/lobehub/lobe-chat/compare/v1.7.4...v1.7.5) + +Released on **2024-07-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix `create_session ` `edit_agent` feature flags and add more flags. + +#### 💄 Styles + +- **misc**: Update 360GPT model (360GPT2 Pro). + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `create_session ` `edit_agent` feature flags and add more flags, closes [#3289](https://github.com/lobehub/lobe-chat/issues/3289) ([ebfd3cf](https://github.com/lobehub/lobe-chat/commit/ebfd3cf)) + +#### Styles + +- **misc**: Update 360GPT model (360GPT2 Pro), closes [#3339](https://github.com/lobehub/lobe-chat/issues/3339) ([c8ed85e](https://github.com/lobehub/lobe-chat/commit/c8ed85e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.4](https://github.com/lobehub/lobe-chat/compare/v1.7.3...v1.7.4) + +Released on **2024-07-29** + +#### 🐛 Bug Fixes + +- **misc**: Improve remote model list fetching for Novita AI. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Improve remote model list fetching for Novita AI, closes [#3311](https://github.com/lobehub/lobe-chat/issues/3311) ([67b9ff0](https://github.com/lobehub/lobe-chat/commit/67b9ff0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.3](https://github.com/lobehub/lobe-chat/compare/v1.7.2...v1.7.3) + +Released on **2024-07-28** + +#### 🐛 Bug Fixes + +- **misc**: Update minimax models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Update minimax models, closes [#3354](https://github.com/lobehub/lobe-chat/issues/3354) ([8113729](https://github.com/lobehub/lobe-chat/commit/8113729)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.2](https://github.com/lobehub/lobe-chat/compare/v1.7.1...v1.7.2) + +Released on **2024-07-26** + +#### 🐛 Bug Fixes + +- **misc**: Avoid baseURL being an empty string, resulting in incorrect client fetch. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Avoid baseURL being an empty string, resulting in incorrect client fetch, closes [#3308](https://github.com/lobehub/lobe-chat/issues/3308) ([15a9bc1](https://github.com/lobehub/lobe-chat/commit/15a9bc1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.7.1](https://github.com/lobehub/lobe-chat/compare/v1.7.0...v1.7.1) + +Released on **2024-07-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix dalle tools calling prompts to avoid content risk. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix dalle tools calling prompts to avoid content risk, closes [#3325](https://github.com/lobehub/lobe-chat/issues/3325) ([3e21240](https://github.com/lobehub/lobe-chat/commit/3e21240)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.7.0](https://github.com/lobehub/lobe-chat/compare/v1.6.15...v1.7.0) + +Released on **2024-07-26** + +#### ✨ Features + +- **misc**: Enabled function calling on Deepseek models. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Enabled function calling on Deepseek models, closes [#3312](https://github.com/lobehub/lobe-chat/issues/3312) ([35f31cb](https://github.com/lobehub/lobe-chat/commit/35f31cb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.15](https://github.com/lobehub/lobe-chat/compare/v1.6.14...v1.6.15) + +Released on **2024-07-26** + +#### 💄 Styles + +- **misc**: Fix file upload height. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix file upload height, closes [#3319](https://github.com/lobehub/lobe-chat/issues/3319) ([8343f35](https://github.com/lobehub/lobe-chat/commit/8343f35)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.14](https://github.com/lobehub/lobe-chat/compare/v1.6.13...v1.6.14) + +Released on **2024-07-26** + +#### 💄 Styles + +- **misc**: Improve input file upload. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve input file upload, closes [#3314](https://github.com/lobehub/lobe-chat/issues/3314) ([de85553](https://github.com/lobehub/lobe-chat/commit/de85553)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.13](https://github.com/lobehub/lobe-chat/compare/v1.6.12...v1.6.13) + +Released on **2024-07-25** + +#### 💄 Styles + +- **misc**: Updated Groq model list to include llama-3.1 and llama3-Groq. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Updated Groq model list to include llama-3.1 and llama3-Groq, closes [#3313](https://github.com/lobehub/lobe-chat/issues/3313) ([a9cfad6](https://github.com/lobehub/lobe-chat/commit/a9cfad6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.12](https://github.com/lobehub/lobe-chat/compare/v1.6.11...v1.6.12) + +Released on **2024-07-25** + +#### 💄 Styles + +- **misc**: Add new models to groq which are llama 3.1. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add new models to groq which are llama 3.1, closes [#3301](https://github.com/lobehub/lobe-chat/issues/3301) ([ec20fd0](https://github.com/lobehub/lobe-chat/commit/ec20fd0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.11](https://github.com/lobehub/lobe-chat/compare/v1.6.10...v1.6.11) + +Released on **2024-07-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix `UNAUTHORIZED` issue with clerk auth provider. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `UNAUTHORIZED` issue with clerk auth provider, closes [#3299](https://github.com/lobehub/lobe-chat/issues/3299) ([97bea09](https://github.com/lobehub/lobe-chat/commit/97bea09)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.10](https://github.com/lobehub/lobe-chat/compare/v1.6.9...v1.6.10) + +Released on **2024-07-23** + +#### ♻ Code Refactoring + +- **misc**: Upgrade snapshot version. + +#### 💄 Styles + +- **misc**: Fix the scrolling of the return result area of function calling. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Upgrade snapshot version, closes [#3296](https://github.com/lobehub/lobe-chat/issues/3296) ([2c14fef](https://github.com/lobehub/lobe-chat/commit/2c14fef)) + +#### Styles + +- **misc**: Fix the scrolling of the return result area of function calling, closes [#3295](https://github.com/lobehub/lobe-chat/issues/3295) ([9c8f469](https://github.com/lobehub/lobe-chat/commit/9c8f469)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.9](https://github.com/lobehub/lobe-chat/compare/v1.6.8...v1.6.9) + +Released on **2024-07-23** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.8](https://github.com/lobehub/lobe-chat/compare/v1.6.7...v1.6.8) + +Released on **2024-07-23** + +#### ♻ Code Refactoring + +- **misc**: Move server modules. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move server modules, closes [#3291](https://github.com/lobehub/lobe-chat/issues/3291) ([c7c9f39](https://github.com/lobehub/lobe-chat/commit/c7c9f39)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.7](https://github.com/lobehub/lobe-chat/compare/v1.6.6...v1.6.7) + +Released on **2024-07-23** + +#### 💄 Styles + +- **misc**: Add new model provider Novita AI. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add new model provider Novita AI, closes [#3177](https://github.com/lobehub/lobe-chat/issues/3177) ([08b063f](https://github.com/lobehub/lobe-chat/commit/08b063f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.6](https://github.com/lobehub/lobe-chat/compare/v1.6.5...v1.6.6) + +Released on **2024-07-22** + +#### ♻ Code Refactoring + +- **model**: Clear and add models. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **model**: Clear and add models, closes [#3208](https://github.com/lobehub/lobe-chat/issues/3208) ([ef54191](https://github.com/lobehub/lobe-chat/commit/ef54191)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.5](https://github.com/lobehub/lobe-chat/compare/v1.6.4...v1.6.5) + +Released on **2024-07-22** + +#### 🐛 Bug Fixes + +- **misc**: Content lost unexpectedly on Qwen provider when `finish_reason` is `stop`. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Content lost unexpectedly on Qwen provider when `finish_reason` is `stop`, closes [#3252](https://github.com/lobehub/lobe-chat/issues/3252) ([d35c5b0](https://github.com/lobehub/lobe-chat/commit/d35c5b0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.4](https://github.com/lobehub/lobe-chat/compare/v1.6.3...v1.6.4) + +Released on **2024-07-21** + +#### ♻ Code Refactoring + +- **misc**: Add trpc query client with react-query. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Add trpc query client with react-query, closes [#3282](https://github.com/lobehub/lobe-chat/issues/3282) ([013ee54](https://github.com/lobehub/lobe-chat/commit/013ee54)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.3](https://github.com/lobehub/lobe-chat/compare/v1.6.2...v1.6.3) + +Released on **2024-07-21** + +#### 💄 Styles + +- **misc**: Update Zhipu models (GLM-4-AllTools & CodeGeeX-4). + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Zhipu models (GLM-4-AllTools & CodeGeeX-4), closes [#3255](https://github.com/lobehub/lobe-chat/issues/3255) ([a92939f](https://github.com/lobehub/lobe-chat/commit/a92939f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.2](https://github.com/lobehub/lobe-chat/compare/v1.6.1...v1.6.2) + +Released on **2024-07-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix dayjs render on server. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix dayjs render on server, closes [#3278](https://github.com/lobehub/lobe-chat/issues/3278) ([8c08dd5](https://github.com/lobehub/lobe-chat/commit/8c08dd5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.6.1](https://github.com/lobehub/lobe-chat/compare/v1.6.0...v1.6.1) + +Released on **2024-07-19** + +#### ♻ Code Refactoring + +- **misc**: Refactor the DragUpload. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the DragUpload, closes [#3263](https://github.com/lobehub/lobe-chat/issues/3263) ([19186eb](https://github.com/lobehub/lobe-chat/commit/19186eb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.6.0](https://github.com/lobehub/lobe-chat/compare/v1.5.5...v1.6.0) + +Released on **2024-07-19** + +#### ✨ Features + +- **misc**: Add `gpt-4o-mini` in OpenAI Provider and set it as the default model. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add `gpt-4o-mini` in OpenAI Provider and set it as the default model, closes [#3256](https://github.com/lobehub/lobe-chat/issues/3256) ([a84d807](https://github.com/lobehub/lobe-chat/commit/a84d807)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.5.5](https://github.com/lobehub/lobe-chat/compare/v1.5.4...v1.5.5) + +Released on **2024-07-19** + +#### 💄 Styles + +- **misc**: Added Gemma2 instead of outdated Gemma. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Added Gemma2 instead of outdated Gemma, closes [#3231](https://github.com/lobehub/lobe-chat/issues/3231) ([03173b7](https://github.com/lobehub/lobe-chat/commit/03173b7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.5.4](https://github.com/lobehub/lobe-chat/compare/v1.5.3...v1.5.4) + +Released on **2024-07-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix delete session group. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix delete session group, closes [#3245](https://github.com/lobehub/lobe-chat/issues/3245) ([8f7167d](https://github.com/lobehub/lobe-chat/commit/8f7167d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.5.3](https://github.com/lobehub/lobe-chat/compare/v1.5.2...v1.5.3) + +Released on **2024-07-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix `OpenAI` deployment restrictions, fix cant duplicate assistant. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `OpenAI` deployment restrictions, closes [#3206](https://github.com/lobehub/lobe-chat/issues/3206) ([3d7a35d](https://github.com/lobehub/lobe-chat/commit/3d7a35d)) +- **misc**: Fix cant duplicate assistant, closes [#3242](https://github.com/lobehub/lobe-chat/issues/3242) ([0edc851](https://github.com/lobehub/lobe-chat/commit/0edc851)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.5.2](https://github.com/lobehub/lobe-chat/compare/v1.5.1...v1.5.2) + +Released on **2024-07-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix session not reorder after send message. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix session not reorder after send message, closes [#3239](https://github.com/lobehub/lobe-chat/issues/3239) ([7245a08](https://github.com/lobehub/lobe-chat/commit/7245a08)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.5.1](https://github.com/lobehub/lobe-chat/compare/v1.5.0...v1.5.1) + +Released on **2024-07-17** + +#### 💄 Styles + +- **misc**: Improve brand url. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve brand url, closes [#3238](https://github.com/lobehub/lobe-chat/issues/3238) ([eef066f](https://github.com/lobehub/lobe-chat/commit/eef066f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.5.0](https://github.com/lobehub/lobe-chat/compare/v1.4.3...v1.5.0) + +Released on **2024-07-17** + +#### ✨ Features + +- **misc**: Spport qwen-vl and tool call for qwen. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Spport qwen-vl and tool call for qwen, closes [#3114](https://github.com/lobehub/lobe-chat/issues/3114) ([5216a85](https://github.com/lobehub/lobe-chat/commit/5216a85)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.4.3](https://github.com/lobehub/lobe-chat/compare/v1.4.2...v1.4.3) + +Released on **2024-07-15** + +#### 🐛 Bug Fixes + +- **misc**: Save assistant info on blur. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Save assistant info on blur, closes [#3223](https://github.com/lobehub/lobe-chat/issues/3223) ([0987a42](https://github.com/lobehub/lobe-chat/commit/0987a42)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.4.2](https://github.com/lobehub/lobe-chat/compare/v1.4.1...v1.4.2) + +Released on **2024-07-13** + +#### ♻ Code Refactoring + +- **misc**: Remove code related to `gemini-pro-vision`. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Remove code related to `gemini-pro-vision`, closes [#2860](https://github.com/lobehub/lobe-chat/issues/2860) ([e2ba302](https://github.com/lobehub/lobe-chat/commit/e2ba302)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.4.1](https://github.com/lobehub/lobe-chat/compare/v1.4.0...v1.4.1) + +Released on **2024-07-13** + +#### 💄 Styles + +- **ui**: Confirmation when `adding a new topic`. +- **misc**: Add cloud promotion banner. + +
+ +
+Improvements and Fixes + +#### Styles + +- **ui**: Confirmation when `adding a new topic`, closes [#3030](https://github.com/lobehub/lobe-chat/issues/3030) ([dc38cd4](https://github.com/lobehub/lobe-chat/commit/dc38cd4)) +- **misc**: Add cloud promotion banner, closes [#3194](https://github.com/lobehub/lobe-chat/issues/3194) ([62db0f8](https://github.com/lobehub/lobe-chat/commit/62db0f8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.4.0](https://github.com/lobehub/lobe-chat/compare/v1.3.6...v1.4.0) + +Released on **2024-07-12** + +#### ✨ Features + +- **misc**: Add 360AI model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add 360AI model provider, closes [#3130](https://github.com/lobehub/lobe-chat/issues/3130) ([79c5f86](https://github.com/lobehub/lobe-chat/commit/79c5f86)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.6](https://github.com/lobehub/lobe-chat/compare/v1.3.5...v1.3.6) + +Released on **2024-07-11** + +#### ♻ Code Refactoring + +- **misc**: Improve agent runtime code. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Improve agent runtime code, closes [#3199](https://github.com/lobehub/lobe-chat/issues/3199) ([9f211e2](https://github.com/lobehub/lobe-chat/commit/9f211e2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.5](https://github.com/lobehub/lobe-chat/compare/v1.3.4...v1.3.5) + +Released on **2024-07-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix assistant meta change race issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix assistant meta change race issue, closes [#3184](https://github.com/lobehub/lobe-chat/issues/3184) ([6335be4](https://github.com/lobehub/lobe-chat/commit/6335be4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.4](https://github.com/lobehub/lobe-chat/compare/v1.3.3...v1.3.4) + +Released on **2024-07-09** + +#### ♻ Code Refactoring + +- **misc**: Support disable clientFetch by default. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Support disable clientFetch by default, closes [#3133](https://github.com/lobehub/lobe-chat/issues/3133) [#3108](https://github.com/lobehub/lobe-chat/issues/3108) ([4415652](https://github.com/lobehub/lobe-chat/commit/4415652)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.3](https://github.com/lobehub/lobe-chat/compare/v1.3.2...v1.3.3) + +Released on **2024-07-09** + +#### 🐛 Bug Fixes + +- **misc**: Allow user to use their own WebRTC signaling. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Allow user to use their own WebRTC signaling, closes [#3182](https://github.com/lobehub/lobe-chat/issues/3182) ([c7f8f38](https://github.com/lobehub/lobe-chat/commit/c7f8f38)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.2](https://github.com/lobehub/lobe-chat/compare/v1.3.1...v1.3.2) + +Released on **2024-07-09** + +#### 🐛 Bug Fixes + +- **misc**: Automatic refresh when change language. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Automatic refresh when change language, closes [#3181](https://github.com/lobehub/lobe-chat/issues/3181) ([b597c5a](https://github.com/lobehub/lobe-chat/commit/b597c5a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.3.1](https://github.com/lobehub/lobe-chat/compare/v1.3.0...v1.3.1) + +Released on **2024-07-09** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.3.0](https://github.com/lobehub/lobe-chat/compare/v1.2.14...v1.3.0) + +Released on **2024-07-09** + +#### ✨ Features + +- **misc**: Add Taichu model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Taichu model provider, closes [#3129](https://github.com/lobehub/lobe-chat/issues/3129) ([a4580e9](https://github.com/lobehub/lobe-chat/commit/a4580e9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.14](https://github.com/lobehub/lobe-chat/compare/v1.2.13...v1.2.14) + +Released on **2024-07-08** + +#### 💄 Styles + +- **misc**: Provider changes with model in model settings. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Provider changes with model in model settings, closes [#3146](https://github.com/lobehub/lobe-chat/issues/3146) ([e53bb5a](https://github.com/lobehub/lobe-chat/commit/e53bb5a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.13](https://github.com/lobehub/lobe-chat/compare/v1.2.12...v1.2.13) + +Released on **2024-07-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix tool message order. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix tool message order, closes [#3155](https://github.com/lobehub/lobe-chat/issues/3155) ([6171b2a](https://github.com/lobehub/lobe-chat/commit/6171b2a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.12](https://github.com/lobehub/lobe-chat/compare/v1.2.11...v1.2.12) + +Released on **2024-07-07** + +#### 🐛 Bug Fixes + +- **misc**: Fixed mobile web page navigation issue with inbox assistant, support to disable clerk signup with feature flag. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fixed mobile web page navigation issue with inbox assistant, closes [#2693](https://github.com/lobehub/lobe-chat/issues/2693) ([4476a5e](https://github.com/lobehub/lobe-chat/commit/4476a5e)) +- **misc**: Support to disable clerk signup with feature flag, closes [#3126](https://github.com/lobehub/lobe-chat/issues/3126) ([4ead315](https://github.com/lobehub/lobe-chat/commit/4ead315)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.11](https://github.com/lobehub/lobe-chat/compare/v1.2.10...v1.2.11) + +Released on **2024-07-07** + +#### 💄 Styles + +- **misc**: Update deepseek max token. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update deepseek max token, closes [#3143](https://github.com/lobehub/lobe-chat/issues/3143) ([4a241b9](https://github.com/lobehub/lobe-chat/commit/4a241b9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.10](https://github.com/lobehub/lobe-chat/compare/v1.2.9...v1.2.10) + +Released on **2024-07-05** + +#### 🐛 Bug Fixes + +- **misc**: Improve tools calling error feedback when arguments are not correctly. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Improve tools calling error feedback when arguments are not correctly, closes [#3150](https://github.com/lobehub/lobe-chat/issues/3150) ([1fa160f](https://github.com/lobehub/lobe-chat/commit/1fa160f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.9](https://github.com/lobehub/lobe-chat/compare/v1.2.8...v1.2.9) + +Released on **2024-07-04** + +#### 💄 Styles + +- **misc**: Fix tool message suspense loading. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Fix tool message suspense loading, closes [#3138](https://github.com/lobehub/lobe-chat/issues/3138) ([3ce59ca](https://github.com/lobehub/lobe-chat/commit/3ce59ca)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.8](https://github.com/lobehub/lobe-chat/compare/v1.2.7...v1.2.8) + +Released on **2024-07-03** + +#### 🐛 Bug Fixes + +- **misc**: Allow builtin tools to trigger AI message. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Allow builtin tools to trigger AI message, closes [#3135](https://github.com/lobehub/lobe-chat/issues/3135) ([6c4c8f7](https://github.com/lobehub/lobe-chat/commit/6c4c8f7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.7](https://github.com/lobehub/lobe-chat/compare/v1.2.6...v1.2.7) + +Released on **2024-07-03** + +#### 💄 Styles + +- **misc**: Improve delete assistant message with tools. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve delete assistant message with tools, closes [#3127](https://github.com/lobehub/lobe-chat/issues/3127) ([1230777](https://github.com/lobehub/lobe-chat/commit/1230777)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.6](https://github.com/lobehub/lobe-chat/compare/v1.2.5...v1.2.6) + +Released on **2024-07-03** + +#### 🐛 Bug Fixes + +- **misc**: Clerk provider refreshes continously. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Clerk provider refreshes continously, closes [#3131](https://github.com/lobehub/lobe-chat/issues/3131) ([ffbb399](https://github.com/lobehub/lobe-chat/commit/ffbb399)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.5](https://github.com/lobehub/lobe-chat/compare/v1.2.4...v1.2.5) + +Released on **2024-07-02** + +#### 🐛 Bug Fixes + +- **misc**: Fix clerk appearance is not applied correctly. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix clerk appearance is not applied correctly, closes [#3105](https://github.com/lobehub/lobe-chat/issues/3105) ([cf9c145](https://github.com/lobehub/lobe-chat/commit/cf9c145)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.4](https://github.com/lobehub/lobe-chat/compare/v1.2.3...v1.2.4) + +Released on **2024-07-02** + +#### 💄 Styles + +- **misc**: Update ProviderAvatar for Baichuan & Stepfun. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update ProviderAvatar for Baichuan & Stepfun, closes [#3112](https://github.com/lobehub/lobe-chat/issues/3112) ([ae5987a](https://github.com/lobehub/lobe-chat/commit/ae5987a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.3](https://github.com/lobehub/lobe-chat/compare/v1.2.2...v1.2.3) + +Released on **2024-07-01** + +#### ♻ Code Refactoring + +- **misc**: Refactor the portal implement. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the portal implement, closes [#3110](https://github.com/lobehub/lobe-chat/issues/3110) ([53fb292](https://github.com/lobehub/lobe-chat/commit/53fb292)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.2](https://github.com/lobehub/lobe-chat/compare/v1.2.1...v1.2.2) + +Released on **2024-07-01** + +#### 🐛 Bug Fixes + +- **misc**: Display issue when select default model in System Agent. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Display issue when select default model in System Agent, closes [#3095](https://github.com/lobehub/lobe-chat/issues/3095) ([49f7f33](https://github.com/lobehub/lobe-chat/commit/49f7f33)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.2.1](https://github.com/lobehub/lobe-chat/compare/v1.2.0...v1.2.1) + +Released on **2024-07-01** + +#### ♻ Code Refactoring + +- **misc**: Refactor the portal file. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the portal file, closes [#3106](https://github.com/lobehub/lobe-chat/issues/3106) ([2d9635f](https://github.com/lobehub/lobe-chat/commit/2d9635f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 1.2.0](https://github.com/lobehub/lobe-chat/compare/v1.1.18...v1.2.0) + +Released on **2024-07-01** + +#### ✨ Features + +- **misc**: Add Baichuan model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Baichuan model provider, closes [#3097](https://github.com/lobehub/lobe-chat/issues/3097) ([378cf02](https://github.com/lobehub/lobe-chat/commit/378cf02)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.18](https://github.com/lobehub/lobe-chat/compare/v1.1.17...v1.1.18) + +Released on **2024-07-01** + +#### 💄 Styles + +- **misc**: Add Gemini 1.5 stable version model & 2M context window. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add Gemini 1.5 stable version model & 2M context window, closes [#2744](https://github.com/lobehub/lobe-chat/issues/2744) ([a35143b](https://github.com/lobehub/lobe-chat/commit/a35143b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.17](https://github.com/lobehub/lobe-chat/compare/v1.1.16...v1.1.17) + +Released on **2024-07-01** + +#### ♻ Code Refactoring + +- **misc**: Refactor to prepare for Chat Portal. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to prepare for Chat Portal, closes [#3093](https://github.com/lobehub/lobe-chat/issues/3093) ([e7c1ba8](https://github.com/lobehub/lobe-chat/commit/e7c1ba8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.16](https://github.com/lobehub/lobe-chat/compare/v1.1.15...v1.1.16) + +Released on **2024-06-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix clerk `UNAUTHORIZED` error after long-time hang-up. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix clerk `UNAUTHORIZED` error after long-time hang-up, closes [#3084](https://github.com/lobehub/lobe-chat/issues/3084) ([a148c3b](https://github.com/lobehub/lobe-chat/commit/a148c3b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.15](https://github.com/lobehub/lobe-chat/compare/v1.1.14...v1.1.15) + +Released on **2024-06-28** + +#### 🐛 Bug Fixes + +- **misc**: Pin `@azure/core-rest-pipeline@1.16.0` to fix azure openai issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin `@azure/core-rest-pipeline@1.16.0` to fix azure openai issue, closes [#3066](https://github.com/lobehub/lobe-chat/issues/3066) ([f3b29f6](https://github.com/lobehub/lobe-chat/commit/f3b29f6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.14](https://github.com/lobehub/lobe-chat/compare/v1.1.13...v1.1.14) + +Released on **2024-06-27** + +#### ♻ Code Refactoring + +- **misc**: Refactor plugin state. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor plugin state, closes [#3059](https://github.com/lobehub/lobe-chat/issues/3059) ([6448570](https://github.com/lobehub/lobe-chat/commit/6448570)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.13](https://github.com/lobehub/lobe-chat/compare/v1.1.12...v1.1.13) + +Released on **2024-06-27** + +#### 🐛 Bug Fixes + +- **misc**: -check_updates cannot be set by FEATURE_FLAGS. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: -check_updates cannot be set by FEATURE_FLAGS, closes [#3038](https://github.com/lobehub/lobe-chat/issues/3038) ([bdadfee](https://github.com/lobehub/lobe-chat/commit/bdadfee)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.12](https://github.com/lobehub/lobe-chat/compare/v1.1.11...v1.1.12) + +Released on **2024-06-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix azure tools calling. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix azure tools calling, closes [#3046](https://github.com/lobehub/lobe-chat/issues/3046) ([b929985](https://github.com/lobehub/lobe-chat/commit/b929985)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.11](https://github.com/lobehub/lobe-chat/compare/v1.1.10...v1.1.11) + +Released on **2024-06-25** + +#### ♻ Code Refactoring + +- **misc**: Refactor format utils. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor format utils, closes [#3034](https://github.com/lobehub/lobe-chat/issues/3034) ([8e54ca0](https://github.com/lobehub/lobe-chat/commit/8e54ca0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.10](https://github.com/lobehub/lobe-chat/compare/v1.1.9...v1.1.10) + +Released on **2024-06-24** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.9](https://github.com/lobehub/lobe-chat/compare/v1.1.8...v1.1.9) + +Released on **2024-06-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent tags. + +#### 💄 Styles + +- **ui**: Fixed incorrect text display on connect check. +- **misc**: Always show action on mobile. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent tags, closes [#3015](https://github.com/lobehub/lobe-chat/issues/3015) ([01e965b](https://github.com/lobehub/lobe-chat/commit/01e965b)) + +#### Styles + +- **ui**: Fixed incorrect text display on connect check, closes [#2994](https://github.com/lobehub/lobe-chat/issues/2994) ([5160f23](https://github.com/lobehub/lobe-chat/commit/5160f23)) +- **misc**: Always show action on mobile, closes [#1863](https://github.com/lobehub/lobe-chat/issues/1863) ([f40292e](https://github.com/lobehub/lobe-chat/commit/f40292e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.8](https://github.com/lobehub/lobe-chat/compare/v1.1.7...v1.1.8) + +Released on **2024-06-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix anthropic parallel tools calling. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix anthropic parallel tools calling, closes [#3010](https://github.com/lobehub/lobe-chat/issues/3010) ([1d891ac](https://github.com/lobehub/lobe-chat/commit/1d891ac)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 1.1.7](https://github.com/lobehub/lobe-chat/compare/v1.1.6...v1.1.7) + +Released on **2024-06-24** + +#### 💄 Styles + +- **misc**: Add AES-GCM footer and tooltip. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add AES-GCM footer and tooltip, closes [#2976](https://github.com/lobehub/lobe-chat/issues/2976) ([5d9bef4](https://github.com/lobehub/lobe-chat/commit/5d9bef4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [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** + +#### 💄 Styles + +- **misc**: Optimized MaxToken Slider. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Optimized MaxToken Slider, closes [#2258](https://github.com/lobehub/lobe-chat/issues/2258) ([dfb892b](https://github.com/lobehub/lobe-chat/commit/dfb892b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.155.2](https://github.com/lobehub/lobe-chat/compare/v0.155.1...v0.155.2) + +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.1](https://github.com/lobehub/lobe-chat/compare/v0.155.0...v0.155.1) + +Released on **2024-05-07** + +#### 💄 Styles + +- **misc**: Improve llm list when all closed. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve llm list when all closed, closes [#2409](https://github.com/lobehub/lobe-chat/issues/2409) ([1eb20c7](https://github.com/lobehub/lobe-chat/commit/1eb20c7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.155.0](https://github.com/lobehub/lobe-chat/compare/v0.154.7...v0.155.0) + +Released on **2024-05-07** + +#### ✨ Features + +- **misc**: Add DataStatistics. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add DataStatistics ([cf474bb](https://github.com/lobehub/lobe-chat/commit/cf474bb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.7](https://github.com/lobehub/lobe-chat/compare/v0.154.6...v0.154.7) + +Released on **2024-05-07** + +#### ♻ Code Refactoring + +- **misc**: Refactor the message slice internal method name. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the message slice internal method name, closes [#2407](https://github.com/lobehub/lobe-chat/issues/2407) ([8c70bdd](https://github.com/lobehub/lobe-chat/commit/8c70bdd)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.6](https://github.com/lobehub/lobe-chat/compare/v0.154.5...v0.154.6) + +Released on **2024-05-07** + +#### 💄 Styles + +- **misc**: Add gemini-1.0-pro-002. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add gemini-1.0-pro-002, closes [#2406](https://github.com/lobehub/lobe-chat/issues/2406) ([44b29a9](https://github.com/lobehub/lobe-chat/commit/44b29a9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.5](https://github.com/lobehub/lobe-chat/compare/v0.154.4...v0.154.5) + +Released on **2024-05-06** + +#### 💄 Styles + +- **misc**: Update LLM Settings Form styles. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update LLM Settings Form styles, closes [#2393](https://github.com/lobehub/lobe-chat/issues/2393) ([4f98e6c](https://github.com/lobehub/lobe-chat/commit/4f98e6c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.4](https://github.com/lobehub/lobe-chat/compare/v0.154.3...v0.154.4) + +Released on **2024-05-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix next auth config. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix next auth config, closes [#2390](https://github.com/lobehub/lobe-chat/issues/2390) ([dbda107](https://github.com/lobehub/lobe-chat/commit/dbda107)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.3](https://github.com/lobehub/lobe-chat/compare/v0.154.2...v0.154.3) + +Released on **2024-05-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker build. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker build ([80a270d](https://github.com/lobehub/lobe-chat/commit/80a270d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.2](https://github.com/lobehub/lobe-chat/compare/v0.154.1...v0.154.2) + +Released on **2024-05-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker build. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker build, closes [#2385](https://github.com/lobehub/lobe-chat/issues/2385) ([9cf60b5](https://github.com/lobehub/lobe-chat/commit/9cf60b5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.154.1](https://github.com/lobehub/lobe-chat/compare/v0.154.0...v0.154.1) + +Released on **2024-05-05** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent meta input disabled. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent meta input disabled, closes [#2381](https://github.com/lobehub/lobe-chat/issues/2381) ([d1fc512](https://github.com/lobehub/lobe-chat/commit/d1fc512)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.154.0](https://github.com/lobehub/lobe-chat/compare/v0.153.1...v0.154.0) + +Released on **2024-05-05** + +#### ✨ Features + +- **misc**: Support clerk as auth provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support clerk as auth provider, closes [#2374](https://github.com/lobehub/lobe-chat/issues/2374) ([bf8ef1f](https://github.com/lobehub/lobe-chat/commit/bf8ef1f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.153.1](https://github.com/lobehub/lobe-chat/compare/v0.153.0...v0.153.1) + +Released on **2024-05-04** + +#### 💄 Styles + +- **misc**: Imporve mobile styles and loading skeleton. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Imporve mobile styles and loading skeleton, closes [#2363](https://github.com/lobehub/lobe-chat/issues/2363) ([8ee3591](https://github.com/lobehub/lobe-chat/commit/8ee3591)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.153.0](https://github.com/lobehub/lobe-chat/compare/v0.152.12...v0.153.0) + +Released on **2024-05-04** + +#### ✨ Features + +- **misc**: Add Settings Intercepting Routes. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Settings Intercepting Routes, closes [#2346](https://github.com/lobehub/lobe-chat/issues/2346) ([29b6442](https://github.com/lobehub/lobe-chat/commit/29b6442)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.12](https://github.com/lobehub/lobe-chat/compare/v0.152.11...v0.152.12) + +Released on **2024-05-04** + +#### 🐛 Bug Fixes + +- **misc**: Disabled autogenerate field icon when empty system role. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Disabled autogenerate field icon when empty system role, closes [#2076](https://github.com/lobehub/lobe-chat/issues/2076) ([27095f5](https://github.com/lobehub/lobe-chat/commit/27095f5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.11](https://github.com/lobehub/lobe-chat/compare/v0.152.10...v0.152.11) + +Released on **2024-05-03** + +#### 💄 Styles + +- **misc**: Add user panel and refactor the next-auth. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add user panel and refactor the next-auth, closes [#2349](https://github.com/lobehub/lobe-chat/issues/2349) ([5cecee0](https://github.com/lobehub/lobe-chat/commit/5cecee0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.10](https://github.com/lobehub/lobe-chat/compare/v0.152.9...v0.152.10) + +Released on **2024-05-03** + +#### 💄 Styles + +- **misc**: Improve market layout styles and mobile style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve market layout styles and mobile style, closes [#2347](https://github.com/lobehub/lobe-chat/issues/2347) ([79b8115](https://github.com/lobehub/lobe-chat/commit/79b8115)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.9](https://github.com/lobehub/lobe-chat/compare/v0.152.8...v0.152.9) + +Released on **2024-05-03** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.8](https://github.com/lobehub/lobe-chat/compare/v0.152.7...v0.152.8) + +Released on **2024-05-03** + +#### ♻ Code Refactoring + +- **misc**: User store add an auth slice. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: User store add an auth slice, closes [#2214](https://github.com/lobehub/lobe-chat/issues/2214) ([948b257](https://github.com/lobehub/lobe-chat/commit/948b257)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.7](https://github.com/lobehub/lobe-chat/compare/v0.152.6...v0.152.7) + +Released on **2024-05-02** + +#### 💄 Styles + +- **misc**: Refactor setting layout and improve setting design. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Refactor setting layout and improve setting design, closes [#2344](https://github.com/lobehub/lobe-chat/issues/2344) ([fa16721](https://github.com/lobehub/lobe-chat/commit/fa16721)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.6](https://github.com/lobehub/lobe-chat/compare/v0.152.5...v0.152.6) + +Released on **2024-05-02** + +#### 💄 Styles + +- **misc**: AutoScroll to the fully end. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: AutoScroll to the fully end, closes [#2345](https://github.com/lobehub/lobe-chat/issues/2345) ([5458e98](https://github.com/lobehub/lobe-chat/commit/5458e98)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.5](https://github.com/lobehub/lobe-chat/compare/v0.152.4...v0.152.5) + +Released on **2024-05-02** + +#### 🐛 Bug Fixes + +- **misc**: Fix Setings Layout. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Setings Layout, closes [#2340](https://github.com/lobehub/lobe-chat/issues/2340) ([6a2e9a9](https://github.com/lobehub/lobe-chat/commit/6a2e9a9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.152.1](https://github.com/lobehub/lobe-chat/compare/v0.152.0...v0.152.1) + +Released on **2024-05-01** + +#### ♻ Code Refactoring + +- **misc**: Refactor Market Layout. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor Market Layout, closes [#2320](https://github.com/lobehub/lobe-chat/issues/2320) ([c05c3c1](https://github.com/lobehub/lobe-chat/commit/c05c3c1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.152.0](https://github.com/lobehub/lobe-chat/compare/v0.151.11...v0.152.0) + +Released on **2024-04-30** + +#### ✨ Features + +- **misc**: Import settings from url. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Import settings from url, closes [#2226](https://github.com/lobehub/lobe-chat/issues/2226) ([b1f6c20](https://github.com/lobehub/lobe-chat/commit/b1f6c20)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.11](https://github.com/lobehub/lobe-chat/compare/v0.151.10...v0.151.11) + +Released on **2024-04-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix telemetry preference modal and default agent config error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix telemetry preference modal and default agent config error, closes [#2312](https://github.com/lobehub/lobe-chat/issues/2312) ([8900445](https://github.com/lobehub/lobe-chat/commit/8900445)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.10](https://github.com/lobehub/lobe-chat/compare/v0.151.9...v0.151.10) + +Released on **2024-04-30** + +#### ♻ Code Refactoring + +- **misc**: Refactor Welcome Layout. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor Welcome Layout, closes [#2314](https://github.com/lobehub/lobe-chat/issues/2314) ([1040051](https://github.com/lobehub/lobe-chat/commit/1040051)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.9](https://github.com/lobehub/lobe-chat/compare/v0.151.8...v0.151.9) + +Released on **2024-04-30** + +#### 🐛 Bug Fixes + +- **misc**: Minimax truncationed output. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Minimax truncationed output, closes [#2308](https://github.com/lobehub/lobe-chat/issues/2308) ([488f319](https://github.com/lobehub/lobe-chat/commit/488f319)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.8](https://github.com/lobehub/lobe-chat/compare/v0.151.7...v0.151.8) + +Released on **2024-04-30** + +#### ♻ Code Refactoring + +- **misc**: Move NavBar to `[@nav](https://github.com/nav)` slot route. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move NavBar to `[@nav](https://github.com/nav)` slot route, closes [#2306](https://github.com/lobehub/lobe-chat/issues/2306) ([aee7231](https://github.com/lobehub/lobe-chat/commit/aee7231)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.7](https://github.com/lobehub/lobe-chat/compare/v0.151.6...v0.151.7) + +Released on **2024-04-30** + +#### 💄 Styles + +- **misc**: Add 404 and Error page. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add 404 and Error page, closes [#2299](https://github.com/lobehub/lobe-chat/issues/2299) ([938a3e9](https://github.com/lobehub/lobe-chat/commit/938a3e9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.6](https://github.com/lobehub/lobe-chat/compare/v0.151.5...v0.151.6) + +Released on **2024-04-30** + +#### 🐛 Bug Fixes + +- **misc**: Plugins with multiple settings cannot be correctly configured. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Plugins with multiple settings cannot be correctly configured, closes [#1991](https://github.com/lobehub/lobe-chat/issues/1991) ([0c041aa](https://github.com/lobehub/lobe-chat/commit/0c041aa)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.5](https://github.com/lobehub/lobe-chat/compare/v0.151.4...v0.151.5) + +Released on **2024-04-30** + +#### 🐛 Bug Fixes + +- **misc**: Effectively interrupt auto scrolling. + +#### 💄 Styles + +- **misc**: Revise some text. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Effectively interrupt auto scrolling, closes [#2223](https://github.com/lobehub/lobe-chat/issues/2223) ([afe4974](https://github.com/lobehub/lobe-chat/commit/afe4974)) + +#### Styles + +- **misc**: Revise some text, closes [#2296](https://github.com/lobehub/lobe-chat/issues/2296) ([018427f](https://github.com/lobehub/lobe-chat/commit/018427f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.4](https://github.com/lobehub/lobe-chat/compare/v0.151.3...v0.151.4) + +Released on **2024-04-29** + +#### ♻ Code Refactoring + +- **misc**: Move app page to the `(main)` layout group. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move app page to the `(main)` layout group, closes [#2297](https://github.com/lobehub/lobe-chat/issues/2297) ([6cc2c38](https://github.com/lobehub/lobe-chat/commit/6cc2c38)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.3](https://github.com/lobehub/lobe-chat/compare/v0.151.2...v0.151.3) + +Released on **2024-04-29** + +#### 💄 Styles + +- **misc**: Patching models info. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Patching models info, closes [#2269](https://github.com/lobehub/lobe-chat/issues/2269) [#22802280](https://github.com/lobehub/lobe-chat/issues/22802280) ([03bcb06](https://github.com/lobehub/lobe-chat/commit/03bcb06)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.2](https://github.com/lobehub/lobe-chat/compare/v0.151.1...v0.151.2) + +Released on **2024-04-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix only inject welcome question in inbox. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix only inject welcome question in inbox, closes [#2289](https://github.com/lobehub/lobe-chat/issues/2289) ([cc8edd3](https://github.com/lobehub/lobe-chat/commit/cc8edd3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.151.1](https://github.com/lobehub/lobe-chat/compare/v0.151.0...v0.151.1) + +Released on **2024-04-29** + +#### 💄 Styles + +- **misc**: Improve Inbox Assistant Welcome Guide. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve Inbox Assistant Welcome Guide, closes [#2086](https://github.com/lobehub/lobe-chat/issues/2086) ([df37212](https://github.com/lobehub/lobe-chat/commit/df37212)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.151.0](https://github.com/lobehub/lobe-chat/compare/v0.150.10...v0.151.0) + +Released on **2024-04-29** + +#### ✨ Features + +- **misc**: Support minimax as a new provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support minimax as a new provider, closes [#2087](https://github.com/lobehub/lobe-chat/issues/2087) ([00abd82](https://github.com/lobehub/lobe-chat/commit/00abd82)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.10](https://github.com/lobehub/lobe-chat/compare/v0.150.9...v0.150.10) + +Released on **2024-04-28** + +#### ♻ Code Refactoring + +- **misc**: Rename globalStore to userStore. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Rename globalStore to userStore, closes [#2264](https://github.com/lobehub/lobe-chat/issues/2264) ([a3cb538](https://github.com/lobehub/lobe-chat/commit/a3cb538)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.9](https://github.com/lobehub/lobe-chat/compare/v0.150.8...v0.150.9) + +Released on **2024-04-28** + +#### ♻ Code Refactoring + +- **misc**: Refactor feature flags store to server config store. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor feature flags store to server config store, closes [#2263](https://github.com/lobehub/lobe-chat/issues/2263) ([2e991d7](https://github.com/lobehub/lobe-chat/commit/2e991d7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.8](https://github.com/lobehub/lobe-chat/compare/v0.150.7...v0.150.8) + +Released on **2024-04-28** + +#### 💄 Styles + +- **ollama**: Phi3 Instruct models and its model icons. + +
+ +
+Improvements and Fixes + +#### Styles + +- **ollama**: Phi3 Instruct models and its model icons, closes [#2254](https://github.com/lobehub/lobe-chat/issues/2254) ([c9b55cc](https://github.com/lobehub/lobe-chat/commit/c9b55cc)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.7](https://github.com/lobehub/lobe-chat/compare/v0.150.6...v0.150.7) + +Released on **2024-04-28** + +#### 🐛 Bug Fixes + +- **misc**: Suport to fetch model list on client. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Suport to fetch model list on client, closes [#2252](https://github.com/lobehub/lobe-chat/issues/2252) ([76310a8](https://github.com/lobehub/lobe-chat/commit/76310a8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.6](https://github.com/lobehub/lobe-chat/compare/v0.150.5...v0.150.6) + +Released on **2024-04-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix `/api/proxy` internal proxy attack. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `/api/proxy` internal proxy attack, closes [#2255](https://github.com/lobehub/lobe-chat/issues/2255) ([465665a](https://github.com/lobehub/lobe-chat/commit/465665a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.5](https://github.com/lobehub/lobe-chat/compare/v0.150.4...v0.150.5) + +Released on **2024-04-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix the plugin string env and search error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the plugin string env and search error, closes [#2239](https://github.com/lobehub/lobe-chat/issues/2239) ([74b1ae0](https://github.com/lobehub/lobe-chat/commit/74b1ae0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.4](https://github.com/lobehub/lobe-chat/compare/v0.150.3...v0.150.4) + +Released on **2024-04-27** + +#### 💄 Styles + +- **misc**: Hide default model tag and show ollama provider by default. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Hide default model tag and show ollama provider by default, closes [#2238](https://github.com/lobehub/lobe-chat/issues/2238) ([baa4780](https://github.com/lobehub/lobe-chat/commit/baa4780)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.3](https://github.com/lobehub/lobe-chat/compare/v0.150.2...v0.150.3) + +Released on **2024-04-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker build. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker build, closes [#2236](https://github.com/lobehub/lobe-chat/issues/2236) ([749a843](https://github.com/lobehub/lobe-chat/commit/749a843)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.2](https://github.com/lobehub/lobe-chat/compare/v0.150.1...v0.150.2) + +Released on **2024-04-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix display error when using `DEFAULT_AGENT_CONFIG` env. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix display error when using `DEFAULT_AGENT_CONFIG` env, closes [#2231](https://github.com/lobehub/lobe-chat/issues/2231) ([42bc734](https://github.com/lobehub/lobe-chat/commit/42bc734)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.150.1](https://github.com/lobehub/lobe-chat/compare/v0.150.0...v0.150.1) + +Released on **2024-04-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix display error when using DEFAULT_AGENT_CONFIG env. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix display error when using DEFAULT_AGENT_CONFIG env ([e46215c](https://github.com/lobehub/lobe-chat/commit/e46215c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.150.0](https://github.com/lobehub/lobe-chat/compare/v0.149.6...v0.150.0) + +Released on **2024-04-26** + +#### ✨ Features + +- **misc**: Support feature flags. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support feature flags, closes [#2213](https://github.com/lobehub/lobe-chat/issues/2213) ([4532be5](https://github.com/lobehub/lobe-chat/commit/4532be5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.6](https://github.com/lobehub/lobe-chat/compare/v0.149.5...v0.149.6) + +Released on **2024-04-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix ollama host issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix ollama host issue, closes [#2210](https://github.com/lobehub/lobe-chat/issues/2210) ([c49d4c7](https://github.com/lobehub/lobe-chat/commit/c49d4c7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.5](https://github.com/lobehub/lobe-chat/compare/v0.149.4...v0.149.5) + +Released on **2024-04-25** + +#### ♻ Code Refactoring + +- **misc**: Sperate SessionStore to a new AgentStore. + +#### 🐛 Bug Fixes + +- **misc**: Fix not handle ollama error correctly. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Sperate SessionStore to a new AgentStore, closes [#2197](https://github.com/lobehub/lobe-chat/issues/2197) ([49c0ba6](https://github.com/lobehub/lobe-chat/commit/49c0ba6)) + +#### What's fixed + +- **misc**: Fix not handle ollama error correctly ([efdf174](https://github.com/lobehub/lobe-chat/commit/efdf174)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.4](https://github.com/lobehub/lobe-chat/compare/v0.149.3...v0.149.4) + +Released on **2024-04-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix chat client request not support abort. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix chat client request not support abort, closes [#2193](https://github.com/lobehub/lobe-chat/issues/2193) ([d22ef2c](https://github.com/lobehub/lobe-chat/commit/d22ef2c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.3](https://github.com/lobehub/lobe-chat/compare/v0.149.2...v0.149.3) + +Released on **2024-04-25** + +#### 💄 Styles + +- **misc**: Add displaying the message "Reset Successfully.". + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add displaying the message "Reset Successfully.", closes [#2158](https://github.com/lobehub/lobe-chat/issues/2158) ([27913ef](https://github.com/lobehub/lobe-chat/commit/27913ef)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.2](https://github.com/lobehub/lobe-chat/compare/v0.149.1...v0.149.2) + +Released on **2024-04-24** + +#### 💄 Styles + +- **misc**: Support to create ai message. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Support to create ai message, closes [#2185](https://github.com/lobehub/lobe-chat/issues/2185) ([ba3ba6a](https://github.com/lobehub/lobe-chat/commit/ba3ba6a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.149.1](https://github.com/lobehub/lobe-chat/compare/v0.149.0...v0.149.1) + +Released on **2024-04-24** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.149.0](https://github.com/lobehub/lobe-chat/compare/v0.148.10...v0.149.0) + +Released on **2024-04-24** + +#### ✨ Features + +- **misc**: Fully support ollama with browser request mode. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Fully support ollama with browser request mode, closes [#2168](https://github.com/lobehub/lobe-chat/issues/2168) ([562d189](https://github.com/lobehub/lobe-chat/commit/562d189)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.10](https://github.com/lobehub/lobe-chat/compare/v0.148.9...v0.148.10) + +Released on **2024-04-24** + +#### 💄 Styles + +- **misc**: Update Ollama model 240421. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Ollama model 240421, closes [#2130](https://github.com/lobehub/lobe-chat/issues/2130) ([e797af0](https://github.com/lobehub/lobe-chat/commit/e797af0)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.9](https://github.com/lobehub/lobe-chat/compare/v0.148.8...v0.148.9) + +Released on **2024-04-23** + +#### ♻ Code Refactoring + +- **misc**: Refactor for session server mode. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor for session server mode, closes [#2163](https://github.com/lobehub/lobe-chat/issues/2163) ([e012597](https://github.com/lobehub/lobe-chat/commit/e012597)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.8](https://github.com/lobehub/lobe-chat/compare/v0.148.7...v0.148.8) + +Released on **2024-04-23** + +#### 💄 Styles + +- **misc**: update some `gemini` deployment restrictions. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: update some `gemini` deployment restrictions, closes [#2149](https://github.com/lobehub/lobe-chat/issues/2149) ([6d36863](https://github.com/lobehub/lobe-chat/commit/6d36863)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.7](https://github.com/lobehub/lobe-chat/compare/v0.148.6...v0.148.7) + +Released on **2024-04-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix qwen-1.5-chat-72B context window in togetherai. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix qwen-1.5-chat-72B context window in togetherai, closes [#2142](https://github.com/lobehub/lobe-chat/issues/2142) ([d0753cf](https://github.com/lobehub/lobe-chat/commit/d0753cf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.6](https://github.com/lobehub/lobe-chat/compare/v0.148.5...v0.148.6) + +Released on **2024-04-22** + +#### 🐛 Bug Fixes + +- **misc**: Add Windows Phone, iPadOS, BlackBerry OS, Linux OS and Chrome OS sync icons. + +#### 💄 Styles + +- **misc**: Support more model Icons: dbrx, command-r, openchat, rwkv, Bert-vits2, Stable Diffusion, WizardLM, adobe firefly, skylark. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add Windows Phone, iPadOS, BlackBerry OS, Linux OS and Chrome OS sync icons, closes [#2139](https://github.com/lobehub/lobe-chat/issues/2139) ([8ed1f07](https://github.com/lobehub/lobe-chat/commit/8ed1f07)) + +#### Styles + +- **misc**: Support more model Icons: dbrx, command-r, openchat, rwkv, Bert-vits2, Stable Diffusion, WizardLM, adobe firefly, skylark, closes [#2107](https://github.com/lobehub/lobe-chat/issues/2107) ([4268d8b](https://github.com/lobehub/lobe-chat/commit/4268d8b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.5](https://github.com/lobehub/lobe-chat/compare/v0.148.4...v0.148.5) + +Released on **2024-04-22** + +#### 💄 Styles + +- **misc**: Support together ai to fetch model list. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Support together ai to fetch model list, closes [#2138](https://github.com/lobehub/lobe-chat/issues/2138) ([e6d3e4a](https://github.com/lobehub/lobe-chat/commit/e6d3e4a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.4](https://github.com/lobehub/lobe-chat/compare/v0.148.3...v0.148.4) + +Released on **2024-04-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix model list menu not display correctly. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix model list menu not display correctly, closes [#2133](https://github.com/lobehub/lobe-chat/issues/2133) ([98c844b](https://github.com/lobehub/lobe-chat/commit/98c844b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.3](https://github.com/lobehub/lobe-chat/compare/v0.148.2...v0.148.3) + +Released on **2024-04-21** + +#### 💄 Styles + +- **ollama**: Show size info while download, support cancel donwload, optimize calculation for speed. + +
+ +
+Improvements and Fixes + +#### Styles + +- **ollama**: Show size info while download, support cancel donwload, optimize calculation for speed, closes [#1664](https://github.com/lobehub/lobe-chat/issues/1664) ([9b18f47](https://github.com/lobehub/lobe-chat/commit/9b18f47)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.2](https://github.com/lobehub/lobe-chat/compare/v0.148.1...v0.148.2) + +Released on **2024-04-21** + +#### 💄 Styles + +- **misc**: Add LLaMA 3 in groq + Mixtral 8x22B model. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add LLaMA 3 in groq + Mixtral 8x22B model, closes [#2128](https://github.com/lobehub/lobe-chat/issues/2128) ([6144448](https://github.com/lobehub/lobe-chat/commit/6144448)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.148.1](https://github.com/lobehub/lobe-chat/compare/v0.148.0...v0.148.1) + +Released on **2024-04-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix topic title not auto generate. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix topic title not auto generate, closes [#2114](https://github.com/lobehub/lobe-chat/issues/2114) ([5979de3](https://github.com/lobehub/lobe-chat/commit/5979de3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.148.0](https://github.com/lobehub/lobe-chat/compare/v0.147.22...v0.148.0) + +Released on **2024-04-20** + +#### ✨ Features + +- **misc**: Support chat completion call at client side. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support chat completion call at client side, closes [#2041](https://github.com/lobehub/lobe-chat/issues/2041) ([9f5858f](https://github.com/lobehub/lobe-chat/commit/9f5858f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.22](https://github.com/lobehub/lobe-chat/compare/v0.147.21...v0.147.22) + +Released on **2024-04-19** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.21](https://github.com/lobehub/lobe-chat/compare/v0.147.20...v0.147.21) + +Released on **2024-04-19** + +#### 💄 Styles + +- **misc**: Optimized file upload buttons and prompts. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Optimized file upload buttons and prompts, closes [#2050](https://github.com/lobehub/lobe-chat/issues/2050) ([c23087e](https://github.com/lobehub/lobe-chat/commit/c23087e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.20](https://github.com/lobehub/lobe-chat/compare/v0.147.19...v0.147.20) + +Released on **2024-04-18** + +#### 💄 Styles + +- **misc**: Improve aync session experience. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve aync session experience, closes [#2075](https://github.com/lobehub/lobe-chat/issues/2075) ([0f3b19b](https://github.com/lobehub/lobe-chat/commit/0f3b19b)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.19](https://github.com/lobehub/lobe-chat/compare/v0.147.18...v0.147.19) + +Released on **2024-04-18** + +#### 💄 Styles + +- **misc**: Add M and B support max token in ModelInfoTags. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add M and B support max token in ModelInfoTags, closes [#2073](https://github.com/lobehub/lobe-chat/issues/2073) ([a985d8f](https://github.com/lobehub/lobe-chat/commit/a985d8f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.18](https://github.com/lobehub/lobe-chat/compare/v0.147.17...v0.147.18) + +Released on **2024-04-17** + +#### 💄 Styles + +- **misc**: Add claude 3 opus to AWS Bedrock, remove custom models from providers, and update Perplexity model names. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add claude 3 opus to AWS Bedrock, closes [#2072](https://github.com/lobehub/lobe-chat/issues/2072) ([479f562](https://github.com/lobehub/lobe-chat/commit/479f562)) +- **misc**: Remove custom models from providers, and update Perplexity model names, closes [#2069](https://github.com/lobehub/lobe-chat/issues/2069) ([e04754d](https://github.com/lobehub/lobe-chat/commit/e04754d)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.17](https://github.com/lobehub/lobe-chat/compare/v0.147.16...v0.147.17) + +Released on **2024-04-16** + +#### ♻ Code Refactoring + +- **misc**: Refactor service to a uniform interface. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor service to a uniform interface, closes [#2062](https://github.com/lobehub/lobe-chat/issues/2062) ([86779e2](https://github.com/lobehub/lobe-chat/commit/86779e2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.16](https://github.com/lobehub/lobe-chat/compare/v0.147.15...v0.147.16) + +Released on **2024-04-14** + +#### ♻ Code Refactoring + +- **misc**: Refactor the auth. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the auth, closes [#2043](https://github.com/lobehub/lobe-chat/issues/2043) ([37ecb41](https://github.com/lobehub/lobe-chat/commit/37ecb41)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.15](https://github.com/lobehub/lobe-chat/compare/v0.147.14...v0.147.15) + +Released on **2024-04-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix tool call error with gpt-4-turbo. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix tool call error with gpt-4-turbo, closes [#2042](https://github.com/lobehub/lobe-chat/issues/2042) ([63d91b8](https://github.com/lobehub/lobe-chat/commit/63d91b8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.14](https://github.com/lobehub/lobe-chat/compare/v0.147.13...v0.147.14) + +Released on **2024-04-14** + +#### 💄 Styles + +- **misc**: Enable `gemini-1.5-pro-latest` model by default. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Enable `gemini-1.5-pro-latest` model by default, closes [#2034](https://github.com/lobehub/lobe-chat/issues/2034) ([e8c65a9](https://github.com/lobehub/lobe-chat/commit/e8c65a9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.13](https://github.com/lobehub/lobe-chat/compare/v0.147.12...v0.147.13) + +Released on **2024-04-14** + +#### ♻ Code Refactoring + +- **misc**: Refactor the service with browser db invoke. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the service with browser db invoke, closes [#2038](https://github.com/lobehub/lobe-chat/issues/2038) ([43a2791](https://github.com/lobehub/lobe-chat/commit/43a2791)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.12](https://github.com/lobehub/lobe-chat/compare/v0.147.11...v0.147.12) + +Released on **2024-04-14** + +#### ♻ Code Refactoring + +- **misc**: Move client db to a new folder. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Move client db to a new folder, closes [#2037](https://github.com/lobehub/lobe-chat/issues/2037) ([ebe65bb](https://github.com/lobehub/lobe-chat/commit/ebe65bb)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.11](https://github.com/lobehub/lobe-chat/compare/v0.147.10...v0.147.11) + +Released on **2024-04-14** + +#### 🐛 Bug Fixes + +- **misc**: Support drag or copy to upload file by model ability. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Support drag or copy to upload file by model ability, closes [#2016](https://github.com/lobehub/lobe-chat/issues/2016) ([2abe37e](https://github.com/lobehub/lobe-chat/commit/2abe37e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.10](https://github.com/lobehub/lobe-chat/compare/v0.147.9...v0.147.10) + +Released on **2024-04-13** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.9](https://github.com/lobehub/lobe-chat/compare/v0.147.8...v0.147.9) + +Released on **2024-04-12** + +#### 🐛 Bug Fixes + +- **misc**: Fix custom model list not display correctly. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix custom model list not display correctly, closes [#2009](https://github.com/lobehub/lobe-chat/issues/2009) ([7d0e220](https://github.com/lobehub/lobe-chat/commit/7d0e220)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.8](https://github.com/lobehub/lobe-chat/compare/v0.147.7...v0.147.8) + +Released on **2024-04-12** + +#### ♻ Code Refactoring + +- **misc**: Update README.md. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Update README.md ([44b5a23](https://github.com/lobehub/lobe-chat/commit/44b5a23)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.7](https://github.com/lobehub/lobe-chat/compare/v0.147.6...v0.147.7) + +Released on **2024-04-12** + +#### 🐛 Bug Fixes + +- **misc**: Pin next to `14.1.4` to fix deployment. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin next to `14.1.4` to fix deployment, closes [#1998](https://github.com/lobehub/lobe-chat/issues/1998) ([dfa1872](https://github.com/lobehub/lobe-chat/commit/dfa1872)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.6](https://github.com/lobehub/lobe-chat/compare/v0.147.5...v0.147.6) + +Released on **2024-04-11** + +#### 💄 Styles + +- **misc**: Add GPT-4-turbo and 2024-04-09 Turbo Vision model and mistral new model name. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add GPT-4-turbo and 2024-04-09 Turbo Vision model and mistral new model name, closes [#1984](https://github.com/lobehub/lobe-chat/issues/1984) ([f1795b1](https://github.com/lobehub/lobe-chat/commit/f1795b1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.5](https://github.com/lobehub/lobe-chat/compare/v0.147.4...v0.147.5) + +Released on **2024-04-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix only search topics in current session. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix only search topics in current session, closes [#1834](https://github.com/lobehub/lobe-chat/issues/1834) ([9fdcfa4](https://github.com/lobehub/lobe-chat/commit/9fdcfa4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.4](https://github.com/lobehub/lobe-chat/compare/v0.147.3...v0.147.4) + +Released on **2024-04-11** + +#### 🐛 Bug Fixes + +- **misc**: Add more builtin OpenRouter models. + +#### 💄 Styles + +- **misc**: Adjust minimum width value for DraggablePanel component. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add more builtin OpenRouter models, closes [#1973](https://github.com/lobehub/lobe-chat/issues/1973) ([0000b1a](https://github.com/lobehub/lobe-chat/commit/0000b1a)) + +#### Styles + +- **misc**: Adjust minimum width value for DraggablePanel component, closes [#1901](https://github.com/lobehub/lobe-chat/issues/1901) ([a696d37](https://github.com/lobehub/lobe-chat/commit/a696d37)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.3](https://github.com/lobehub/lobe-chat/compare/v0.147.2...v0.147.3) + +Released on **2024-04-11** + +#### 💄 Styles + +- **misc**: Support Google Proxy URL. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Support Google Proxy URL, closes [#1979](https://github.com/lobehub/lobe-chat/issues/1979) ([fbf2c24](https://github.com/lobehub/lobe-chat/commit/fbf2c24)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.2](https://github.com/lobehub/lobe-chat/compare/v0.147.1...v0.147.2) + +Released on **2024-04-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix custom model not display correctly. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix custom model not display correctly, closes [#1972](https://github.com/lobehub/lobe-chat/issues/1972) ([5d7cae9](https://github.com/lobehub/lobe-chat/commit/5d7cae9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.147.1](https://github.com/lobehub/lobe-chat/compare/v0.147.0...v0.147.1) + +Released on **2024-04-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix normalizeLocale with first matching locale. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix normalizeLocale with first matching locale, closes [#1767](https://github.com/lobehub/lobe-chat/issues/1767) ([182ff23](https://github.com/lobehub/lobe-chat/commit/182ff23)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.147.0](https://github.com/lobehub/lobe-chat/compare/v0.146.2...v0.147.0) + +Released on **2024-04-10** + +#### ♻ Code Refactoring + +- **misc**: Add db migration, add migrations from v3 to v4, clean openai azure code, refactor agent runtime with openai compatible factory, refactor api key form locale, refactor openAI to openai and azure, refactor the hidden to enabled, refactor the key, refactor the model config selector, refactor the route auth as a middleware, refactor the server config to migrate model provider env, refactor the server config to migrate model provider env, rename the key to enabledModels. + +#### ✨ Features + +- **misc**: Refactor to support azure openai provider, support close openai, support display model list, support model config modal, support model list with model providers, support open router auto model list, support openai model fetcher, support update model config, support user config model. + +#### 🐛 Bug Fixes + +- **misc**: Fix db migration, fix db migration. + +#### 💄 Styles + +- **misc**: Fix i18n of model list fetcher, improve detail design, improve logo style, update locale. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Add db migration ([6ceb818](https://github.com/lobehub/lobe-chat/commit/6ceb818)) +- **misc**: Add migrations from v3 to v4 ([199ded2](https://github.com/lobehub/lobe-chat/commit/199ded2)) +- **misc**: Clean openai azure code ([be4bcca](https://github.com/lobehub/lobe-chat/commit/be4bcca)) +- **misc**: Refactor agent runtime with openai compatible factory ([89adf9d](https://github.com/lobehub/lobe-chat/commit/89adf9d)) +- **misc**: Refactor api key form locale ([a069169](https://github.com/lobehub/lobe-chat/commit/a069169)) +- **misc**: Refactor openAI to openai and azure ([2190a95](https://github.com/lobehub/lobe-chat/commit/2190a95)) +- **misc**: Refactor the hidden to enabled ([78a1aac](https://github.com/lobehub/lobe-chat/commit/78a1aac)) +- **misc**: Refactor the key ([d5c82f6](https://github.com/lobehub/lobe-chat/commit/d5c82f6)) +- **misc**: Refactor the model config selector ([d865ca1](https://github.com/lobehub/lobe-chat/commit/d865ca1)) +- **misc**: Refactor the route auth as a middleware ([ef5ee2a](https://github.com/lobehub/lobe-chat/commit/ef5ee2a)) +- **misc**: Refactor the server config to migrate model provider env ([e4f110e](https://github.com/lobehub/lobe-chat/commit/e4f110e)) +- **misc**: Refactor the server config to migrate model provider env ([c398063](https://github.com/lobehub/lobe-chat/commit/c398063)) +- **misc**: Rename the key to enabledModels ([ebfa0aa](https://github.com/lobehub/lobe-chat/commit/ebfa0aa)) + +#### What's improved + +- **misc**: Refactor to support azure openai provider ([d737afe](https://github.com/lobehub/lobe-chat/commit/d737afe)) +- **misc**: Support close openai ([1ff1aef](https://github.com/lobehub/lobe-chat/commit/1ff1aef)) +- **misc**: Support display model list ([e59635f](https://github.com/lobehub/lobe-chat/commit/e59635f)) +- **misc**: Support model config modal ([62d6bb7](https://github.com/lobehub/lobe-chat/commit/62d6bb7)) +- **misc**: Support model list with model providers, closes [#1916](https://github.com/lobehub/lobe-chat/issues/1916) ([0895dd2](https://github.com/lobehub/lobe-chat/commit/0895dd2)) +- **misc**: Support open router auto model list ([1ba90d3](https://github.com/lobehub/lobe-chat/commit/1ba90d3)) +- **misc**: Support openai model fetcher ([56032e6](https://github.com/lobehub/lobe-chat/commit/56032e6)) +- **misc**: Support update model config ([e8ed847](https://github.com/lobehub/lobe-chat/commit/e8ed847)) +- **misc**: Support user config model ([72fd873](https://github.com/lobehub/lobe-chat/commit/72fd873)) + +#### What's fixed + +- **misc**: Fix db migration ([4e75074](https://github.com/lobehub/lobe-chat/commit/4e75074)) +- **misc**: Fix db migration ([571b6dd](https://github.com/lobehub/lobe-chat/commit/571b6dd)) + +#### Styles + +- **misc**: Fix i18n of model list fetcher ([67ed8c2](https://github.com/lobehub/lobe-chat/commit/67ed8c2)) +- **misc**: Improve detail design ([adcce07](https://github.com/lobehub/lobe-chat/commit/adcce07)) +- **misc**: Improve logo style ([c5826ce](https://github.com/lobehub/lobe-chat/commit/c5826ce)) +- **misc**: Update locale ([021bf91](https://github.com/lobehub/lobe-chat/commit/021bf91)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.146.2](https://github.com/lobehub/lobe-chat/compare/v0.146.1...v0.146.2) + +Released on **2024-04-10** + +#### 🐛 Bug Fixes + +- **misc**: Pin `ai@3.0.19` to fix error with chat stream output. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin `ai@3.0.19` to fix error with chat stream output, closes [#1946](https://github.com/lobehub/lobe-chat/issues/1946) ([07d4419](https://github.com/lobehub/lobe-chat/commit/07d4419)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.146.1](https://github.com/lobehub/lobe-chat/compare/v0.146.0...v0.146.1) + +Released on **2024-04-10** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.146.0](https://github.com/lobehub/lobe-chat/compare/v0.145.13...v0.146.0) + +Released on **2024-04-08** + +#### ✨ Features + +- **misc**: Add support for ZITADEL SSO provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add support for ZITADEL SSO provider, closes [#1904](https://github.com/lobehub/lobe-chat/issues/1904) ([44152f7](https://github.com/lobehub/lobe-chat/commit/44152f7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.13](https://github.com/lobehub/lobe-chat/compare/v0.145.12...v0.145.13) + +Released on **2024-04-07** + +#### ♻ Code Refactoring + +- **misc**: Refactor the model settings for more clean code. + +#### 🐛 Bug Fixes + +- **misc**: Fix normalize russian locale. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the model settings for more clean code, closes [#1906](https://github.com/lobehub/lobe-chat/issues/1906) ([db5d3ac](https://github.com/lobehub/lobe-chat/commit/db5d3ac)) + +#### What's fixed + +- **misc**: Fix normalize russian locale, closes [#1903](https://github.com/lobehub/lobe-chat/issues/1903) ([e86b596](https://github.com/lobehub/lobe-chat/commit/e86b596)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.12](https://github.com/lobehub/lobe-chat/compare/v0.145.11...v0.145.12) + +Released on **2024-04-04** + +#### 🐛 Bug Fixes + +- **misc**: Fix typo of azure-id sso provider. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix typo of azure-id sso provider, closes [#1898](https://github.com/lobehub/lobe-chat/issues/1898) ([6925b25](https://github.com/lobehub/lobe-chat/commit/6925b25)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.11](https://github.com/lobehub/lobe-chat/compare/v0.145.10...v0.145.11) + +Released on **2024-04-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix page crash when using browser as the stt engine. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix page crash when using browser as the stt engine, closes [#1884](https://github.com/lobehub/lobe-chat/issues/1884) ([278820a](https://github.com/lobehub/lobe-chat/commit/278820a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.10](https://github.com/lobehub/lobe-chat/compare/v0.145.9...v0.145.10) + +Released on **2024-04-02** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.9](https://github.com/lobehub/lobe-chat/compare/v0.145.8...v0.145.9) + +Released on **2024-04-02** + +#### 💄 Styles + +- **misc**: Improve scrollbar style. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve scrollbar style, closes [#1869](https://github.com/lobehub/lobe-chat/issues/1869) ([33d857f](https://github.com/lobehub/lobe-chat/commit/33d857f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.8](https://github.com/lobehub/lobe-chat/compare/v0.145.7...v0.145.8) + +Released on **2024-04-02** + +#### ♻ Code Refactoring + +- **misc**: Refactor SSO providers. + +#### 🐛 Bug Fixes + +- **misc**: Fix plugins dropdown menu overflow. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor SSO providers, closes [#1865](https://github.com/lobehub/lobe-chat/issues/1865) ([290d33b](https://github.com/lobehub/lobe-chat/commit/290d33b)) + +#### What's fixed + +- **misc**: Fix plugins dropdown menu overflow, closes [#1855](https://github.com/lobehub/lobe-chat/issues/1855) ([00e9068](https://github.com/lobehub/lobe-chat/commit/00e9068)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.7](https://github.com/lobehub/lobe-chat/compare/v0.145.6...v0.145.7) + +Released on **2024-04-02** + +#### 🐛 Bug Fixes + +- **misc**: Fix DraggablePanel bar interfere with the operation of the scrollbar. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix DraggablePanel bar interfere with the operation of the scrollbar, closes [#1775](https://github.com/lobehub/lobe-chat/issues/1775) ([4b7b243](https://github.com/lobehub/lobe-chat/commit/4b7b243)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.6](https://github.com/lobehub/lobe-chat/compare/v0.145.5...v0.145.6) + +Released on **2024-04-02** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.5](https://github.com/lobehub/lobe-chat/compare/v0.145.4...v0.145.5) + +Released on **2024-03-30** + +#### 🐛 Bug Fixes + +- **misc**: Add qwen api models patch in ollama. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Add qwen api models patch in ollama, closes [#1630](https://github.com/lobehub/lobe-chat/issues/1630) ([a1e754c](https://github.com/lobehub/lobe-chat/commit/a1e754c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.4](https://github.com/lobehub/lobe-chat/compare/v0.145.3...v0.145.4) + +Released on **2024-03-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin install loading state error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix plugin install loading state error, closes [#1815](https://github.com/lobehub/lobe-chat/issues/1815) ([2412a73](https://github.com/lobehub/lobe-chat/commit/2412a73)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.3](https://github.com/lobehub/lobe-chat/compare/v0.145.2...v0.145.3) + +Released on **2024-03-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix antd locale. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix antd locale, closes [#1814](https://github.com/lobehub/lobe-chat/issues/1814) ([e7fc148](https://github.com/lobehub/lobe-chat/commit/e7fc148)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.2](https://github.com/lobehub/lobe-chat/compare/v0.145.1...v0.145.2) + +Released on **2024-03-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix google ultra model id. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix google ultra model id, closes [#1813](https://github.com/lobehub/lobe-chat/issues/1813) ([c96ba12](https://github.com/lobehub/lobe-chat/commit/c96ba12)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.145.1](https://github.com/lobehub/lobe-chat/compare/v0.145.0...v0.145.1) + +Released on **2024-03-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix Google Gemini pro 1.5 and system role not take effect. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Google Gemini pro 1.5 and system role not take effect, closes [#1801](https://github.com/lobehub/lobe-chat/issues/1801) ([0a3e3f7](https://github.com/lobehub/lobe-chat/commit/0a3e3f7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.145.0](https://github.com/lobehub/lobe-chat/compare/v0.144.1...v0.145.0) + +Released on **2024-03-29** + +#### ✨ Features + +- **misc**: Support TogetherAI as new model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support TogetherAI as new model provider, closes [#1709](https://github.com/lobehub/lobe-chat/issues/1709) ([d6921ef](https://github.com/lobehub/lobe-chat/commit/d6921ef)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.144.1](https://github.com/lobehub/lobe-chat/compare/v0.144.0...v0.144.1) + +Released on **2024-03-29** + +#### 🐛 Bug Fixes + +- **ollama**: Suppport vision for LLaVA models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **ollama**: Suppport vision for LLaVA models, closes [#1791](https://github.com/lobehub/lobe-chat/issues/1791) ([e2d3de6](https://github.com/lobehub/lobe-chat/commit/e2d3de6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.144.0](https://github.com/lobehub/lobe-chat/compare/v0.143.0...v0.144.0) + +Released on **2024-03-29** + +#### ✨ Features + +- **misc**: Support authentik as sso. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support authentik as sso, closes [#1650](https://github.com/lobehub/lobe-chat/issues/1650) ([181dfa5](https://github.com/lobehub/lobe-chat/commit/181dfa5)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.143.0](https://github.com/lobehub/lobe-chat/compare/v0.142.9...v0.143.0) + +Released on **2024-03-28** + +#### ✨ Features + +- **misc**: Add Bulgarian translation. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add Bulgarian translation, closes [#1732](https://github.com/lobehub/lobe-chat/issues/1732) ([e181dd1](https://github.com/lobehub/lobe-chat/commit/e181dd1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.9](https://github.com/lobehub/lobe-chat/compare/v0.142.8...v0.142.9) + +Released on **2024-03-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix Add agent and Converse button not jump. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix Add agent and Converse button not jump, closes [#1785](https://github.com/lobehub/lobe-chat/issues/1785) ([a52799c](https://github.com/lobehub/lobe-chat/commit/a52799c)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.8](https://github.com/lobehub/lobe-chat/compare/v0.142.7...v0.142.8) + +Released on **2024-03-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix gemini 1.5 pro model id to support gemini new models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix gemini 1.5 pro model id to support gemini new models, closes [#1776](https://github.com/lobehub/lobe-chat/issues/1776) ([591dcb3](https://github.com/lobehub/lobe-chat/commit/591dcb3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.7](https://github.com/lobehub/lobe-chat/compare/v0.142.6...v0.142.7) + +Released on **2024-03-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix the missing German locale. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the missing German locale, closes [#1753](https://github.com/lobehub/lobe-chat/issues/1753) ([a452612](https://github.com/lobehub/lobe-chat/commit/a452612)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.6](https://github.com/lobehub/lobe-chat/compare/v0.142.5...v0.142.6) + +Released on **2024-03-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix normalize german locale. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix normalize german locale, closes [#1750](https://github.com/lobehub/lobe-chat/issues/1750) ([69fcc78](https://github.com/lobehub/lobe-chat/commit/69fcc78)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.5](https://github.com/lobehub/lobe-chat/compare/v0.142.4...v0.142.5) + +Released on **2024-03-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix mobile click, fix mobile click issue. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix mobile click ([3775b28](https://github.com/lobehub/lobe-chat/commit/3775b28)) +- **misc**: Fix mobile click issue, closes [#1744](https://github.com/lobehub/lobe-chat/issues/1744) ([a6b1234](https://github.com/lobehub/lobe-chat/commit/a6b1234)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.4](https://github.com/lobehub/lobe-chat/compare/v0.142.3...v0.142.4) + +Released on **2024-03-26** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.3](https://github.com/lobehub/lobe-chat/compare/v0.142.2...v0.142.3) + +Released on **2024-03-26** + +#### 🐛 Bug Fixes + +- **misc**: Pin `next-auth` temporary to fix build error. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Pin `next-auth` temporary to fix build error, closes [#1739](https://github.com/lobehub/lobe-chat/issues/1739) ([e9ece9f](https://github.com/lobehub/lobe-chat/commit/e9ece9f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.2](https://github.com/lobehub/lobe-chat/compare/v0.142.1...v0.142.2) + +Released on **2024-03-25** + +#### 🐛 Bug Fixes + +- **misc**: Support openrouter custom models env. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Support openrouter custom models env, closes [#1647](https://github.com/lobehub/lobe-chat/issues/1647) ([78baa16](https://github.com/lobehub/lobe-chat/commit/78baa16)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.142.1](https://github.com/lobehub/lobe-chat/compare/v0.142.0...v0.142.1) + +Released on **2024-03-25** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.142.0](https://github.com/lobehub/lobe-chat/compare/v0.141.2...v0.142.0) + +Released on **2024-03-25** + +#### ✨ Features + +- **misc**: Support 01.AI as a new provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support 01.AI as a new provider, closes [#1627](https://github.com/lobehub/lobe-chat/issues/1627) ([08342fd](https://github.com/lobehub/lobe-chat/commit/08342fd)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.141.2](https://github.com/lobehub/lobe-chat/compare/v0.141.1...v0.141.2) + +Released on **2024-03-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix window icon and scrollbar style. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix window icon and scrollbar style, closes [#1691](https://github.com/lobehub/lobe-chat/issues/1691) ([4f46845](https://github.com/lobehub/lobe-chat/commit/4f46845)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.141.1](https://github.com/lobehub/lobe-chat/compare/v0.141.0...v0.141.1) + +Released on **2024-03-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor the Vercel Aanlytics and support Google Aanlytics. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the Vercel Aanlytics and support Google Aanlytics, closes [#1688](https://github.com/lobehub/lobe-chat/issues/1688) ([e07e9cf](https://github.com/lobehub/lobe-chat/commit/e07e9cf)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.141.0](https://github.com/lobehub/lobe-chat/compare/v0.140.1...v0.141.0) + +Released on **2024-03-22** + +#### ✨ Features + +- **misc**: Using YJS and WebRTC to support sync data between different devices. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Using YJS and WebRTC to support sync data between different devices, closes [#1525](https://github.com/lobehub/lobe-chat/issues/1525) ([60d9186](https://github.com/lobehub/lobe-chat/commit/60d9186)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.140.1](https://github.com/lobehub/lobe-chat/compare/v0.140.0...v0.140.1) + +Released on **2024-03-22** + +#### 💄 Styles + +- **misc**: add Moonshot Kimi Reverse model to Moonshot model provider.. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: add Moonshot Kimi Reverse model to Moonshot model provider., closes [#1659](https://github.com/lobehub/lobe-chat/issues/1659) ([5bae263](https://github.com/lobehub/lobe-chat/commit/5bae263)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.140.0](https://github.com/lobehub/lobe-chat/compare/v0.139.2...v0.140.0) + +Released on **2024-03-22** + +#### ✨ Features + +- **misc**: Add gemini 1.5 pro support. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add gemini 1.5 pro support, closes [#1669](https://github.com/lobehub/lobe-chat/issues/1669) ([2b280af](https://github.com/lobehub/lobe-chat/commit/2b280af)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.139.2](https://github.com/lobehub/lobe-chat/compare/v0.139.1...v0.139.2) + +Released on **2024-03-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix code block display issue. + +#### 💄 Styles + +- **misc**: The bottom safe area height of iOS. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix code block display issue, closes [#1675](https://github.com/lobehub/lobe-chat/issues/1675) ([7707dda](https://github.com/lobehub/lobe-chat/commit/7707dda)) + +#### Styles + +- **misc**: The bottom safe area height of iOS, closes [#1637](https://github.com/lobehub/lobe-chat/issues/1637) [#1181](https://github.com/lobehub/lobe-chat/issues/1181) ([44fae5e](https://github.com/lobehub/lobe-chat/commit/44fae5e)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.139.1](https://github.com/lobehub/lobe-chat/compare/v0.139.0...v0.139.1) + +Released on **2024-03-17** + +#### 💄 Styles + +- **misc**: Improve model tags. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Improve model tags ([11cd5f4](https://github.com/lobehub/lobe-chat/commit/11cd5f4)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.139.0](https://github.com/lobehub/lobe-chat/compare/v0.138.2...v0.139.0) + +Released on **2024-03-16** + +#### ✨ Features + +- **misc**: Support openrouter as a new model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support openrouter as a new model provider, closes [#1572](https://github.com/lobehub/lobe-chat/issues/1572) ([780b1a2](https://github.com/lobehub/lobe-chat/commit/780b1a2)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.138.2](https://github.com/lobehub/lobe-chat/compare/v0.138.1...v0.138.2) + +Released on **2024-03-15** + +#### 💄 Styles + +- **misc**: Update Markdown in ChatItem. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Update Markdown in ChatItem ([be75549](https://github.com/lobehub/lobe-chat/commit/be75549)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.138.1](https://github.com/lobehub/lobe-chat/compare/v0.138.0...v0.138.1) + +Released on **2024-03-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix URL typo. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix URL typo, closes [#1590](https://github.com/lobehub/lobe-chat/issues/1590) ([97137a9](https://github.com/lobehub/lobe-chat/commit/97137a9)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.138.0](https://github.com/lobehub/lobe-chat/compare/v0.137.0...v0.138.0) + +Released on **2024-03-15** + +#### ✨ Features + +- **misc**: Support groq as a model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support groq as a model provider, closes [#1569](https://github.com/lobehub/lobe-chat/issues/1569) [#1562](https://github.com/lobehub/lobe-chat/issues/1562) [#1570](https://github.com/lobehub/lobe-chat/issues/1570) ([a04c364](https://github.com/lobehub/lobe-chat/commit/a04c364)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.137.0](https://github.com/lobehub/lobe-chat/compare/v0.136.0...v0.137.0) + +Released on **2024-03-15** + +#### ✨ Features + +- **ollama**: Improve connection check method and provide selector for user to control model options. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **ollama**: Improve connection check method and provide selector for user to control model options, closes [#1397](https://github.com/lobehub/lobe-chat/issues/1397) ([675902f](https://github.com/lobehub/lobe-chat/commit/675902f)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.136.0](https://github.com/lobehub/lobe-chat/compare/v0.135.4...v0.136.0) + +Released on **2024-03-15** + +#### ✨ Features + +- **misc**: Support azure-ad as a new sso provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support azure-ad as a new sso provider, closes [#1456](https://github.com/lobehub/lobe-chat/issues/1456) ([6649cd1](https://github.com/lobehub/lobe-chat/commit/6649cd1)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.135.4](https://github.com/lobehub/lobe-chat/compare/v0.135.3...v0.135.4) + +Released on **2024-03-15** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.135.3](https://github.com/lobehub/lobe-chat/compare/v0.135.2...v0.135.3) + +Released on **2024-03-15** + +#### 🐛 Bug Fixes + +- **ollama**: Fix duplicate llama model and add llama2-chinese models. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **ollama**: Fix duplicate llama model and add llama2-chinese models, closes [#1579](https://github.com/lobehub/lobe-chat/issues/1579) ([6b9b5c8](https://github.com/lobehub/lobe-chat/commit/6b9b5c8)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.135.2](https://github.com/lobehub/lobe-chat/compare/v0.135.1...v0.135.2) + +Released on **2024-03-14** + +#### ♻ Code Refactoring + +- **misc**: Upgrade plugin db schema. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Upgrade plugin db schema, closes [#1571](https://github.com/lobehub/lobe-chat/issues/1571) ([757574a](https://github.com/lobehub/lobe-chat/commit/757574a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.135.1](https://github.com/lobehub/lobe-chat/compare/v0.135.0...v0.135.1) + +Released on **2024-03-14** + +#### ♻ Code Refactoring + +- **misc**: Refactor the db model. + +
+ +
+Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the db model, closes [#1567](https://github.com/lobehub/lobe-chat/issues/1567) ([3d56dd6](https://github.com/lobehub/lobe-chat/commit/3d56dd6)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.135.0](https://github.com/lobehub/lobe-chat/compare/v0.134.1...v0.135.0) + +Released on **2024-03-14** + +#### ✨ Features + +- **misc**: Add claude 3 to bedrock provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Add claude 3 to bedrock provider, closes [#1551](https://github.com/lobehub/lobe-chat/issues/1551) ([6e1fe33](https://github.com/lobehub/lobe-chat/commit/6e1fe33)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.134.1](https://github.com/lobehub/lobe-chat/compare/v0.134.0...v0.134.1) + +Released on **2024-03-13** + +#### 💄 Styles + +- **misc**: Add more model display name. + +
+ +
+Improvements and Fixes + +#### Styles + +- **misc**: Add more model display name, closes [#1554](https://github.com/lobehub/lobe-chat/issues/1554) ([31c987a](https://github.com/lobehub/lobe-chat/commit/31c987a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.134.0](https://github.com/lobehub/lobe-chat/compare/v0.133.5...v0.134.0) + +Released on **2024-03-13** + +#### ✨ Features + +- **misc**: Support anthropic proxy url. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support anthropic proxy url, closes [#1529](https://github.com/lobehub/lobe-chat/issues/1529) ([a5a9257](https://github.com/lobehub/lobe-chat/commit/a5a9257)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.133.5](https://github.com/lobehub/lobe-chat/compare/v0.133.4...v0.133.5) + +Released on **2024-03-12** + +
+ +
+Improvements and Fixes + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.133.4](https://github.com/lobehub/lobe-chat/compare/v0.133.3...v0.133.4) + +Released on **2024-03-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix sitemap missing in docker building. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix sitemap missing in docker building, closes [#1533](https://github.com/lobehub/lobe-chat/issues/1533) ([49752da](https://github.com/lobehub/lobe-chat/commit/49752da)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.133.3](https://github.com/lobehub/lobe-chat/compare/v0.133.2...v0.133.3) + +Released on **2024-03-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix the max token of claude 3. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the max token of claude 3, closes [#1526](https://github.com/lobehub/lobe-chat/issues/1526) ([222fae3](https://github.com/lobehub/lobe-chat/commit/222fae3)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.133.2](https://github.com/lobehub/lobe-chat/compare/v0.133.1...v0.133.2) + +Released on **2024-03-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix qwen model id and improve anthropic logo text color. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix qwen model id and improve anthropic logo text color, closes [#1524](https://github.com/lobehub/lobe-chat/issues/1524) ([c68f5da](https://github.com/lobehub/lobe-chat/commit/c68f5da)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ + + +# Changelog + +### [Version 0.133.1](https://github.com/lobehub/lobe-chat/compare/v0.133.0...v0.133.1) + +Released on **2024-03-08** + +#### 🐛 Bug Fixes + +- **misc**: Fix sitemap config. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix sitemap config ([a2542a7](https://github.com/lobehub/lobe-chat/commit/a2542a7)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.133.0](https://github.com/lobehub/lobe-chat/compare/v0.132.2...v0.133.0) + +Released on **2024-03-07** + +#### ✨ Features + +- **misc**: Support Mistral model provider. + +
+ +
+Improvements and Fixes + +#### What's improved + +- **misc**: Support Mistral model provider, closes [#1455](https://github.com/lobehub/lobe-chat/issues/1455) ([4f94bfe](https://github.com/lobehub/lobe-chat/commit/4f94bfe)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.132.2](https://github.com/lobehub/lobe-chat/compare/v0.132.1...v0.132.2) + +Released on **2024-03-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix anthropic streaming on Vercel/Cloudflare. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix anthropic streaming on Vercel/Cloudflare, closes [#1480](https://github.com/lobehub/lobe-chat/issues/1480) ([227101a](https://github.com/lobehub/lobe-chat/commit/227101a)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +### [Version 0.132.1](https://github.com/lobehub/lobe-chat/compare/v0.132.0...v0.132.1) + +Released on **2024-03-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix hydration error while OAuth callback. + +
+ +
+Improvements and Fixes + +#### What's fixed + +- **misc**: Fix hydration error while OAuth callback, closes [#1474](https://github.com/lobehub/lobe-chat/issues/1474) ([ff93825](https://github.com/lobehub/lobe-chat/commit/ff93825)) + +
+ +
+ +[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) + +
+ +## [Version 0.132.0](https://github.com/lobehub/lobe-chat/compare/v0.131.0...v0.132.0) + +Released on **2024-03-05** + +#### ✨ Features + +- **misc**: Support anthropic as model provider. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support anthropic as model provider, closes [#1409](https://github.com/lobehub/lobe-chat/issues/1409) ([a42cf8c](https://github.com/lobehub/lobe-chat/commit/a42cf8c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.131.0](https://github.com/lobehub/lobe-chat/compare/v0.130.7...v0.131.0) + +Released on **2024-03-05** + +#### ✨ Features + +- **misc**: Support langfuse integration. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support langfuse integration, closes [#1325](https://github.com/lobehub/lobe-chat/issues/1325) ([aaedfa7](https://github.com/lobehub/lobe-chat/commit/aaedfa7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.7](https://github.com/lobehub/lobe-chat/compare/v0.130.6...v0.130.7) + +Released on **2024-03-03** + +#### ♻ Code Refactoring + +- **misc**: Update gpt-3.5-turbo model card. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Update gpt-3.5-turbo model card, closes [#1449](https://github.com/lobehub/lobe-chat/issues/1449) ([d0be0c7](https://github.com/lobehub/lobe-chat/commit/d0be0c7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.6](https://github.com/lobehub/lobe-chat/compare/v0.130.5...v0.130.6) + +Released on **2024-03-01** + +#### ♻ Code Refactoring + +- **misc**: Refactor the plugin and tool slice. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the plugin and tool slice, closes [#1437](https://github.com/lobehub/lobe-chat/issues/1437) ([003e230](https://github.com/lobehub/lobe-chat/commit/003e230)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.5](https://github.com/lobehub/lobe-chat/compare/v0.130.4...v0.130.5) + +Released on **2024-03-01** + +#### 💄 Styles + +- **misc**: Support switch model with tag. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Support switch model with tag, closes [#1435](https://github.com/lobehub/lobe-chat/issues/1435) ([233150e](https://github.com/lobehub/lobe-chat/commit/233150e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.4](https://github.com/lobehub/lobe-chat/compare/v0.130.3...v0.130.4) + +Released on **2024-02-29** + +#### ♻ Code Refactoring + +- **misc**: Refactor the core chatStream and plugin gateway auth. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the core chatStream and plugin gateway auth, closes [#1426](https://github.com/lobehub/lobe-chat/issues/1426) ([7d3c1b6](https://github.com/lobehub/lobe-chat/commit/7d3c1b6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.3](https://github.com/lobehub/lobe-chat/compare/v0.130.2...v0.130.3) + +Released on **2024-02-29** + +#### ♻ Code Refactoring + +- **misc**: Refactor the google api route and add more tests for chat route. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the google api route and add more tests for chat route, closes [#1424](https://github.com/lobehub/lobe-chat/issues/1424) ([063a4d5](https://github.com/lobehub/lobe-chat/commit/063a4d5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.2](https://github.com/lobehub/lobe-chat/compare/v0.130.1...v0.130.2) + +Released on **2024-02-29** + +#### 🐛 Bug Fixes + +- **misc**: Update azure OpenAI api version options to latest. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Update azure OpenAI api version options to latest, closes [#1423](https://github.com/lobehub/lobe-chat/issues/1423) ([d992262](https://github.com/lobehub/lobe-chat/commit/d992262)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.130.1](https://github.com/lobehub/lobe-chat/compare/v0.130.0...v0.130.1) + +Released on **2024-02-28** + +#### 🐛 Bug Fixes + +- **google**: Add safetySettings to avoid error response with google AI model. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **google**: Add safetySettings to avoid error response with google AI model, closes [#1418](https://github.com/lobehub/lobe-chat/issues/1418) ([87bf1fb](https://github.com/lobehub/lobe-chat/commit/87bf1fb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.130.0](https://github.com/lobehub/lobe-chat/compare/v0.129.6...v0.130.0) + +Released on **2024-02-27** + +#### ✨ Features + +- **misc**: Support multiple API Keys. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support multiple API Keys, closes [#1345](https://github.com/lobehub/lobe-chat/issues/1345) ([17c5da3](https://github.com/lobehub/lobe-chat/commit/17c5da3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.6](https://github.com/lobehub/lobe-chat/compare/v0.129.5...v0.129.6) + +Released on **2024-02-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix github url. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix github url ([42ea0f5](https://github.com/lobehub/lobe-chat/commit/42ea0f5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.5](https://github.com/lobehub/lobe-chat/compare/v0.129.4...v0.129.5) + +Released on **2024-02-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix eliminate UI jitter on navigation, improving experience for users sensitive to motion. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix eliminate UI jitter on navigation, improving experience for users sensitive to motion, closes [#1381](https://github.com/lobehub/lobe-chat/issues/1381) ([9231413](https://github.com/lobehub/lobe-chat/commit/9231413)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.4](https://github.com/lobehub/lobe-chat/compare/v0.129.3...v0.129.4) + +Released on **2024-02-24** + +#### 🐛 Bug Fixes + +- **ollama**: Fix gemma model id. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **ollama**: Fix gemma model id, closes [#1377](https://github.com/lobehub/lobe-chat/issues/1377) ([3da50ff](https://github.com/lobehub/lobe-chat/commit/3da50ff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.3](https://github.com/lobehub/lobe-chat/compare/v0.129.2...v0.129.3) + +Released on **2024-02-23** + +#### 💄 Styles + +- **misc**: Add gemma model logo for ollama. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add gemma model logo for ollama, closes [#1369](https://github.com/lobehub/lobe-chat/issues/1369) ([e2fb3a3](https://github.com/lobehub/lobe-chat/commit/e2fb3a3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.2](https://github.com/lobehub/lobe-chat/compare/v0.129.1...v0.129.2) + +Released on **2024-02-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix OAuth don't get user id from session. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix OAuth don't get user id from session, closes [#1347](https://github.com/lobehub/lobe-chat/issues/1347) ([ce4d6ca](https://github.com/lobehub/lobe-chat/commit/ce4d6ca)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.129.1](https://github.com/lobehub/lobe-chat/compare/v0.129.0...v0.129.1) + +Released on **2024-02-22** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.129.0](https://github.com/lobehub/lobe-chat/compare/v0.128.10...v0.129.0) + +Released on **2024-02-22** + +#### ✨ Features + +- **misc**: Support perplexity AI provider. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support perplexity AI provider, closes [#1339](https://github.com/lobehub/lobe-chat/issues/1339) ([61c88fb](https://github.com/lobehub/lobe-chat/commit/61c88fb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.10](https://github.com/lobehub/lobe-chat/compare/v0.128.9...v0.128.10) + +Released on **2024-02-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix the robots.txt config. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the robots.txt config ([c4adfe4](https://github.com/lobehub/lobe-chat/commit/c4adfe4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.9](https://github.com/lobehub/lobe-chat/compare/v0.128.8...v0.128.9) + +Released on **2024-02-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix the robots.txt config. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the robots.txt config ([34901b4](https://github.com/lobehub/lobe-chat/commit/34901b4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.8](https://github.com/lobehub/lobe-chat/compare/v0.128.7...v0.128.8) + +Released on **2024-02-20** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.7](https://github.com/lobehub/lobe-chat/compare/v0.128.6...v0.128.7) + +Released on **2024-02-20** + +#### 💄 Styles + +- **misc**: Improve docs url and add more docs. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve docs url and add more docs, closes [#1329](https://github.com/lobehub/lobe-chat/issues/1329) ([85b3136](https://github.com/lobehub/lobe-chat/commit/85b3136)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.6](https://github.com/lobehub/lobe-chat/compare/v0.128.5...v0.128.6) + +Released on **2024-02-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix OAuth errors on Docker deployment. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix OAuth errors on Docker deployment, closes [#1323](https://github.com/lobehub/lobe-chat/issues/1323) ([922e843](https://github.com/lobehub/lobe-chat/commit/922e843)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.5](https://github.com/lobehub/lobe-chat/compare/v0.128.4...v0.128.5) + +Released on **2024-02-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix the document url. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the document url ([43b5677](https://github.com/lobehub/lobe-chat/commit/43b5677)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.4](https://github.com/lobehub/lobe-chat/compare/v0.128.3...v0.128.4) + +Released on **2024-02-18** + +#### 🐛 Bug Fixes + +- **misc**: Fix documents i18n. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix documents i18n, closes [#1319](https://github.com/lobehub/lobe-chat/issues/1319) ([a0600dc](https://github.com/lobehub/lobe-chat/commit/a0600dc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.3](https://github.com/lobehub/lobe-chat/compare/v0.128.2...v0.128.3) + +Released on **2024-02-18** + +#### ♻ Code Refactoring + +- **misc**: Refactor with chat docs site. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor with chat docs site, closes [#1309](https://github.com/lobehub/lobe-chat/issues/1309) ([c131fa6](https://github.com/lobehub/lobe-chat/commit/c131fa6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.2](https://github.com/lobehub/lobe-chat/compare/v0.128.1...v0.128.2) + +Released on **2024-02-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent avatar click wrong navigation. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent avatar click wrong navigation, closes [#1308](https://github.com/lobehub/lobe-chat/issues/1308) ([adc7bc1](https://github.com/lobehub/lobe-chat/commit/adc7bc1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.128.1](https://github.com/lobehub/lobe-chat/compare/v0.128.0...v0.128.1) + +Released on **2024-02-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix auto lang switch. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auto lang switch, closes [#1305](https://github.com/lobehub/lobe-chat/issues/1305) ([7a51329](https://github.com/lobehub/lobe-chat/commit/7a51329)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.128.0](https://github.com/lobehub/lobe-chat/compare/v0.127.2...v0.128.0) + +Released on **2024-02-14** + +#### ✨ Features + +- **misc**: Support define default agent config with `DEFAULT_AGENT_CONFIG` ENV. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support define default agent config with `DEFAULT_AGENT_CONFIG` ENV, closes [#1291](https://github.com/lobehub/lobe-chat/issues/1291) ([c7c096e](https://github.com/lobehub/lobe-chat/commit/c7c096e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.127.2](https://github.com/lobehub/lobe-chat/compare/v0.127.1...v0.127.2) + +Released on **2024-02-14** + +#### ♻ Code Refactoring + +- **misc**: Refactor the sidebar to fix first render state. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the sidebar to fix first render state, closes [#1301](https://github.com/lobehub/lobe-chat/issues/1301) ([c477491](https://github.com/lobehub/lobe-chat/commit/c477491)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.127.1](https://github.com/lobehub/lobe-chat/compare/v0.127.0...v0.127.1) + +Released on **2024-02-14** + +#### 💄 Styles + +- **misc**: Improve settings tabs style and refactor the LLM setting page. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve settings tabs style and refactor the LLM setting page, closes [#1299](https://github.com/lobehub/lobe-chat/issues/1299) ([31f6f15](https://github.com/lobehub/lobe-chat/commit/31f6f15)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.127.0](https://github.com/lobehub/lobe-chat/compare/v0.126.5...v0.127.0) + +Released on **2024-02-13** + +#### ✨ Features + +- **llm**: Support Ollama AI Provider for local LLM. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **llm**: Support Ollama AI Provider for local LLM ([3b6f249](https://github.com/lobehub/lobe-chat/commit/3b6f249)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.126.5](https://github.com/lobehub/lobe-chat/compare/v0.126.4...v0.126.5) + +Released on **2024-02-12** + +#### ♻ Code Refactoring + +- **misc**: Refactor with the auth code. + +#### 🐛 Bug Fixes + +- **misc**: Fix middleware auth console error. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor with the auth code ([8cee01f](https://github.com/lobehub/lobe-chat/commit/8cee01f)) + +#### What's fixed + +- **misc**: Fix middleware auth console error ([ad3ade8](https://github.com/lobehub/lobe-chat/commit/ad3ade8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.126.4](https://github.com/lobehub/lobe-chat/compare/v0.126.3...v0.126.4) + +Released on **2024-02-11** + +#### ♻ Code Refactoring + +- **misc**: Update Model provider request url. + +#### 🐛 Bug Fixes + +- **misc**: Fix auth error in console, fix token tag usage display. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Update Model provider request url ([b64acc0](https://github.com/lobehub/lobe-chat/commit/b64acc0)) + +#### What's fixed + +- **misc**: Fix auth error in console ([8e7ee82](https://github.com/lobehub/lobe-chat/commit/8e7ee82)) +- **misc**: Fix token tag usage display ([6e7134b](https://github.com/lobehub/lobe-chat/commit/6e7134b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.126.3](https://github.com/lobehub/lobe-chat/compare/v0.126.2...v0.126.3) + +Released on **2024-02-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix auth layout error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auth layout error ([efd7d14](https://github.com/lobehub/lobe-chat/commit/efd7d14)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.126.2](https://github.com/lobehub/lobe-chat/compare/v0.126.1...v0.126.2) + +Released on **2024-02-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix OAuth throws an error on Vercel deploy. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix OAuth throws an error on Vercel deploy, closes [#1278](https://github.com/lobehub/lobe-chat/issues/1278) [#1277](https://github.com/lobehub/lobe-chat/issues/1277) [#1274](https://github.com/lobehub/lobe-chat/issues/1274) ([81d2d76](https://github.com/lobehub/lobe-chat/commit/81d2d76)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.126.1](https://github.com/lobehub/lobe-chat/compare/v0.126.0...v0.126.1) + +Released on **2024-02-09** + +#### 🐛 Bug Fixes + +- **misc**: Add basePath to support subdirectory. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add basePath to support subdirectory, closes [#1179](https://github.com/lobehub/lobe-chat/issues/1179) ([43e544a](https://github.com/lobehub/lobe-chat/commit/43e544a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.126.0](https://github.com/lobehub/lobe-chat/compare/v0.125.0...v0.126.0) + +Released on **2024-02-09** + +#### ✨ Features + +- **misc**: Support umami analytics. + +#### 🐛 Bug Fixes + +- **misc**: The back button on the chat setting page can correctly return to the configured Agent chat page. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support umami analytics, closes [#1267](https://github.com/lobehub/lobe-chat/issues/1267) ([da7beba](https://github.com/lobehub/lobe-chat/commit/da7beba)) + +#### What's fixed + +- **misc**: The back button on the chat setting page can correctly return to the configured Agent chat page, closes [#1272](https://github.com/lobehub/lobe-chat/issues/1272) ([4cc1ad5](https://github.com/lobehub/lobe-chat/commit/4cc1ad5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.125.0](https://github.com/lobehub/lobe-chat/compare/v0.124.3...v0.125.0) + +Released on **2024-02-08** + +#### ✨ Features + +- **misc**: Support login & session authentication via OAuth 2.0 (Auth0). + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support login & session authentication via OAuth 2.0 (Auth0), closes [#1143](https://github.com/lobehub/lobe-chat/issues/1143) ([0609690](https://github.com/lobehub/lobe-chat/commit/0609690)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.124.3](https://github.com/lobehub/lobe-chat/compare/v0.124.2...v0.124.3) + +Released on **2024-02-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix use azure api key error. + +#### 💄 Styles + +- **settings**: Improve LLM connection checker style. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix use azure api key error, closes [#1263](https://github.com/lobehub/lobe-chat/issues/1263) ([4e08f63](https://github.com/lobehub/lobe-chat/commit/4e08f63)) + +#### Styles + +- **settings**: Improve LLM connection checker style, closes [#1252](https://github.com/lobehub/lobe-chat/issues/1252) ([4905d9e](https://github.com/lobehub/lobe-chat/commit/4905d9e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.124.2](https://github.com/lobehub/lobe-chat/compare/v0.124.1...v0.124.2) + +Released on **2024-02-06** + +#### 💄 Styles + +- **misc**: Add moonshot i18n. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add moonshot i18n, closes [#1251](https://github.com/lobehub/lobe-chat/issues/1251) ([4b6663b](https://github.com/lobehub/lobe-chat/commit/4b6663b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.124.1](https://github.com/lobehub/lobe-chat/compare/v0.124.0...v0.124.1) + +Released on **2024-02-06** + +#### 💄 Styles + +- **misc**: Improve direction UX. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve direction UX, closes [#1169](https://github.com/lobehub/lobe-chat/issues/1169) ([e3929dc](https://github.com/lobehub/lobe-chat/commit/e3929dc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.124.0](https://github.com/lobehub/lobe-chat/compare/v0.123.4...v0.124.0) + +Released on **2024-02-06** + +#### ✨ Features + +- **misc**: Support Moonshot AI Provider. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support Moonshot AI Provider, closes [#1232](https://github.com/lobehub/lobe-chat/issues/1232) ([a6de202](https://github.com/lobehub/lobe-chat/commit/a6de202)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.123.4](https://github.com/lobehub/lobe-chat/compare/v0.123.3...v0.123.4) + +Released on **2024-02-06** + +#### 💄 Styles + +- **misc**: Improve clear topic tips. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve clear topic tips, closes [#1247](https://github.com/lobehub/lobe-chat/issues/1247) ([2d133e9](https://github.com/lobehub/lobe-chat/commit/2d133e9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.123.3](https://github.com/lobehub/lobe-chat/compare/v0.123.2...v0.123.3) + +Released on **2024-02-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix non-https `crypto.subtile` missing error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix non-https `crypto.subtile` missing error, closes [#1238](https://github.com/lobehub/lobe-chat/issues/1238) ([1750d0b](https://github.com/lobehub/lobe-chat/commit/1750d0b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.123.2](https://github.com/lobehub/lobe-chat/compare/v0.123.1...v0.123.2) + +Released on **2024-02-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker build. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker build, closes [#1231](https://github.com/lobehub/lobe-chat/issues/1231) ([e180722](https://github.com/lobehub/lobe-chat/commit/e180722)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.123.1](https://github.com/lobehub/lobe-chat/compare/v0.123.0...v0.123.1) + +Released on **2024-02-05** + +#### 🐛 Bug Fixes + +- **misc**: Improve auth control of plugin gateways, update dockerfile. + +#### 💄 Styles + +- **misc**: Add gpt-4-all feature flag. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Improve auth control of plugin gateways ([6354ad8](https://github.com/lobehub/lobe-chat/commit/6354ad8)) +- **misc**: Update dockerfile ([e66aed3](https://github.com/lobehub/lobe-chat/commit/e66aed3)) + +#### Styles + +- **misc**: Add gpt-4-all feature flag ([360b36c](https://github.com/lobehub/lobe-chat/commit/360b36c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.123.0](https://github.com/lobehub/lobe-chat/compare/v0.122.9...v0.123.0) + +Released on **2024-02-05** + +#### ✨ Features + +- **misc**: Support Google / Zhipu / AWS Bedrock model providers. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support Google / Zhipu / AWS Bedrock model providers, closes [#1173](https://github.com/lobehub/lobe-chat/issues/1173) ([d5929f6](https://github.com/lobehub/lobe-chat/commit/d5929f6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.9](https://github.com/lobehub/lobe-chat/compare/v0.122.8...v0.122.9) + +Released on **2024-02-05** + +#### 💄 Styles + +- **settings**: Improve LLM connection checker style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **settings**: Improve LLM connection checker style, closes [#1222](https://github.com/lobehub/lobe-chat/issues/1222) ([8c349a1](https://github.com/lobehub/lobe-chat/commit/8c349a1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.8](https://github.com/lobehub/lobe-chat/compare/v0.122.7...v0.122.8) + +Released on **2024-02-03** + +#### 💄 Styles + +- **misc**: Allow user to add agent without redirection. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Allow user to add agent without redirection, closes [#1199](https://github.com/lobehub/lobe-chat/issues/1199) ([6577ca1](https://github.com/lobehub/lobe-chat/commit/6577ca1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.7](https://github.com/lobehub/lobe-chat/compare/v0.122.6...v0.122.7) + +Released on **2024-02-02** + +#### 💄 Styles + +- **misc**: Update the gpt-4-1106-preview model to gpt-4-0125-preview. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update the gpt-4-1106-preview model to gpt-4-0125-preview, closes [#1210](https://github.com/lobehub/lobe-chat/issues/1210) ([fe623e1](https://github.com/lobehub/lobe-chat/commit/fe623e1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.6](https://github.com/lobehub/lobe-chat/compare/v0.122.5...v0.122.6) + +Released on **2024-01-31** + +#### 🐛 Bug Fixes + +- **check**: The state of connectivity can only be singular. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **check**: The state of connectivity can only be singular, closes [#1201](https://github.com/lobehub/lobe-chat/issues/1201) ([c412baf](https://github.com/lobehub/lobe-chat/commit/c412baf)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.5](https://github.com/lobehub/lobe-chat/compare/v0.122.4...v0.122.5) + +Released on **2024-01-31** + +#### 🐛 Bug Fixes + +- **misc**: The plugin has a hallucination and gets stuck. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: The plugin has a hallucination and gets stuck, closes [#1191](https://github.com/lobehub/lobe-chat/issues/1191) ([0189759](https://github.com/lobehub/lobe-chat/commit/0189759)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.4](https://github.com/lobehub/lobe-chat/compare/v0.122.3...v0.122.4) + +Released on **2024-01-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin gateway auth. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix plugin gateway auth, closes [#1195](https://github.com/lobehub/lobe-chat/issues/1195) ([2184167](https://github.com/lobehub/lobe-chat/commit/2184167)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.3](https://github.com/lobehub/lobe-chat/compare/v0.122.2...v0.122.3) + +Released on **2024-01-30** + +#### ♻ Code Refactoring + +- **misc**: Refactor the setting storage from localStorage to indexedDB. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the setting storage from localStorage to indexedDB, closes [#1180](https://github.com/lobehub/lobe-chat/issues/1180) ([615e796](https://github.com/lobehub/lobe-chat/commit/615e796)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.2](https://github.com/lobehub/lobe-chat/compare/v0.122.1...v0.122.2) + +Released on **2024-01-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix unexpected topic switch when favoriting topic. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix unexpected topic switch when favoriting topic, closes [#1186](https://github.com/lobehub/lobe-chat/issues/1186) ([ab4de13](https://github.com/lobehub/lobe-chat/commit/ab4de13)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.122.1](https://github.com/lobehub/lobe-chat/compare/v0.122.0...v0.122.1) + +Released on **2024-01-29** + +#### 💄 Styles + +- **misc**: Fix antd tab width flicker when show function debug. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix antd tab width flicker when show function debug, closes [#1171](https://github.com/lobehub/lobe-chat/issues/1171) ([14e99d2](https://github.com/lobehub/lobe-chat/commit/14e99d2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.122.0](https://github.com/lobehub/lobe-chat/compare/v0.121.4...v0.122.0) + +Released on **2024-01-29** + +#### ✨ Features + +- **misc**: Add create agent action in group menu. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add create agent action in group menu, closes [#1177](https://github.com/lobehub/lobe-chat/issues/1177) ([17ec1eb](https://github.com/lobehub/lobe-chat/commit/17ec1eb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.121.4](https://github.com/lobehub/lobe-chat/compare/v0.121.3...v0.121.4) + +Released on **2024-01-29** + +#### 🐛 Bug Fixes + +- **misc**: Pin ahooks to fix test ci and settings crash. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Pin ahooks to fix test ci and settings crash, closes [#1178](https://github.com/lobehub/lobe-chat/issues/1178) ([bc223a4](https://github.com/lobehub/lobe-chat/commit/bc223a4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.121.3](https://github.com/lobehub/lobe-chat/compare/v0.121.2...v0.121.3) + +Released on **2024-01-26** + +#### 💄 Styles + +- **misc**: Improve stop loading icon. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve stop loading icon, closes [#1154](https://github.com/lobehub/lobe-chat/issues/1154) ([6444fc2](https://github.com/lobehub/lobe-chat/commit/6444fc2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.121.2](https://github.com/lobehub/lobe-chat/compare/v0.121.1...v0.121.2) + +Released on **2024-01-25** + +#### 💄 Styles + +- **misc**: Remove centered prop from CreateGroupModal. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Remove centered prop from CreateGroupModal, closes [#1146](https://github.com/lobehub/lobe-chat/issues/1146) ([7b01676](https://github.com/lobehub/lobe-chat/commit/7b01676)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.121.1](https://github.com/lobehub/lobe-chat/compare/v0.121.0...v0.121.1) + +Released on **2024-01-24** + +#### 🐛 Bug Fixes + +- **misc**: Automatically fill in the wrong password. + +#### 💄 Styles + +- **misc**: Fix default plugins height unstabled when scrolling. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Automatically fill in the wrong password, closes [#1144](https://github.com/lobehub/lobe-chat/issues/1144) ([0159a1a](https://github.com/lobehub/lobe-chat/commit/0159a1a)) + +#### Styles + +- **misc**: Fix default plugins height unstabled when scrolling, closes [#1142](https://github.com/lobehub/lobe-chat/issues/1142) ([abed417](https://github.com/lobehub/lobe-chat/commit/abed417)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.121.0](https://github.com/lobehub/lobe-chat/compare/v0.120.6...v0.121.0) + +Released on **2024-01-24** + +#### ✨ Features + +- **misc**: Add session group manager. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add session group manager, closes [#1055](https://github.com/lobehub/lobe-chat/issues/1055) [#1045](https://github.com/lobehub/lobe-chat/issues/1045) [#1126](https://github.com/lobehub/lobe-chat/issues/1126) [#1120](https://github.com/lobehub/lobe-chat/issues/1120) ([e3281fc](https://github.com/lobehub/lobe-chat/commit/e3281fc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.6](https://github.com/lobehub/lobe-chat/compare/v0.120.5...v0.120.6) + +Released on **2024-01-22** + +#### 💄 Styles + +- **misc**: Fix share image tags not align. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix share image tags not align, closes [#1047](https://github.com/lobehub/lobe-chat/issues/1047) ([28206b6](https://github.com/lobehub/lobe-chat/commit/28206b6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.5](https://github.com/lobehub/lobe-chat/compare/v0.120.4...v0.120.5) + +Released on **2024-01-21** + +#### 💄 Styles + +- **misc**: Update locale and add test for globalStore. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update locale and add test for globalStore, closes [#1119](https://github.com/lobehub/lobe-chat/issues/1119) ([4545cf0](https://github.com/lobehub/lobe-chat/commit/4545cf0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.4](https://github.com/lobehub/lobe-chat/compare/v0.120.3...v0.120.4) + +Released on **2024-01-21** + +#### 🐛 Bug Fixes + +- **misc**: Refactor url state management and fix some detail experience. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Refactor url state management and fix some detail experience, closes [#1117](https://github.com/lobehub/lobe-chat/issues/1117) ([a355d2c](https://github.com/lobehub/lobe-chat/commit/a355d2c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.3](https://github.com/lobehub/lobe-chat/compare/v0.120.2...v0.120.3) + +Released on **2024-01-19** + +#### ♻ Code Refactoring + +- **misc**: Refactor antd i18n and improve locale order. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor antd i18n and improve locale order, closes [#1103](https://github.com/lobehub/lobe-chat/issues/1103) [#1083](https://github.com/lobehub/lobe-chat/issues/1083) ([c89f527](https://github.com/lobehub/lobe-chat/commit/c89f527)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.2](https://github.com/lobehub/lobe-chat/compare/v0.120.1...v0.120.2) + +Released on **2024-01-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix setPluginMessage can not stop create ai message. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix setPluginMessage can not stop create ai message, closes [#1078](https://github.com/lobehub/lobe-chat/issues/1078) ([67de28d](https://github.com/lobehub/lobe-chat/commit/67de28d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.120.1](https://github.com/lobehub/lobe-chat/compare/v0.120.0...v0.120.1) + +Released on **2024-01-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix list scrolling white screen on mobile. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix list scrolling white screen on mobile, closes [#1072](https://github.com/lobehub/lobe-chat/issues/1072) ([af10947](https://github.com/lobehub/lobe-chat/commit/af10947)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.120.0](https://github.com/lobehub/lobe-chat/compare/v0.119.13...v0.120.0) + +Released on **2024-01-15** + +#### ✨ Features + +- **misc**: Adding Arabic Language Support. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Adding Arabic Language Support, closes [#1049](https://github.com/lobehub/lobe-chat/issues/1049) ([a325ef9](https://github.com/lobehub/lobe-chat/commit/a325ef9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.13](https://github.com/lobehub/lobe-chat/compare/v0.119.12...v0.119.13) + +Released on **2024-01-10** + +#### 💄 Styles + +- **misc**: Add delete and regenerate for function message. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add delete and regenerate for function message, closes [#992](https://github.com/lobehub/lobe-chat/issues/992) ([7f8c717](https://github.com/lobehub/lobe-chat/commit/7f8c717)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.12](https://github.com/lobehub/lobe-chat/compare/v0.119.11...v0.119.12) + +Released on **2024-01-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix new line after sending messages with enter key. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix new line after sending messages with enter key, closes [#990](https://github.com/lobehub/lobe-chat/issues/990) ([e6ab019](https://github.com/lobehub/lobe-chat/commit/e6ab019)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.11](https://github.com/lobehub/lobe-chat/compare/v0.119.10...v0.119.11) + +Released on **2024-01-09** + +#### ♻ Code Refactoring + +- **misc**: Refactor ChatInput to support cmd+enter. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor ChatInput to support cmd+enter, closes [#983](https://github.com/lobehub/lobe-chat/issues/983) ([437a223](https://github.com/lobehub/lobe-chat/commit/437a223)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.10](https://github.com/lobehub/lobe-chat/compare/v0.119.9...v0.119.10) + +Released on **2024-01-08** + +#### 🐛 Bug Fixes + +- **misc**: Debug information cannot be selected. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Debug information cannot be selected, closes [#980](https://github.com/lobehub/lobe-chat/issues/980) ([f02612d](https://github.com/lobehub/lobe-chat/commit/f02612d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.9](https://github.com/lobehub/lobe-chat/compare/v0.119.8...v0.119.9) + +Released on **2024-01-08** + +#### 💄 Styles + +- **misc**: Fix ChatInput fullscreen display not correct. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix ChatInput fullscreen display not correct, closes [#982](https://github.com/lobehub/lobe-chat/issues/982) ([e4012c4](https://github.com/lobehub/lobe-chat/commit/e4012c4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.8](https://github.com/lobehub/lobe-chat/compare/v0.119.7...v0.119.8) + +Released on **2024-01-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix spotting tool call correctly. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix spotting tool call correctly, closes [#972](https://github.com/lobehub/lobe-chat/issues/972) ([216e700](https://github.com/lobehub/lobe-chat/commit/216e700)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.7](https://github.com/lobehub/lobe-chat/compare/v0.119.6...v0.119.7) + +Released on **2024-01-07** + +#### 💄 Styles + +- **misc**: Improve share modal style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve share modal style, closes [#965](https://github.com/lobehub/lobe-chat/issues/965) ([62c0573](https://github.com/lobehub/lobe-chat/commit/62c0573)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.6](https://github.com/lobehub/lobe-chat/compare/v0.119.5...v0.119.6) + +Released on **2024-01-06** + +#### 💄 Styles + +- **misc**: Improve conversation style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve conversation style, closes [#962](https://github.com/lobehub/lobe-chat/issues/962) ([b9cc862](https://github.com/lobehub/lobe-chat/commit/b9cc862)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.5](https://github.com/lobehub/lobe-chat/compare/v0.119.4...v0.119.5) + +Released on **2024-01-06** + +#### 💄 Styles + +- **misc**: Fix topic i18n. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix topic i18n, closes [#961](https://github.com/lobehub/lobe-chat/issues/961) ([4e9ebe2](https://github.com/lobehub/lobe-chat/commit/4e9ebe2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.4](https://github.com/lobehub/lobe-chat/compare/v0.119.3...v0.119.4) + +Released on **2024-01-06** + +#### ♻ Code Refactoring + +- **misc**: Refactor to virtual list with react-virtuoso. + +#### 🐛 Bug Fixes + +- **misc**: Fix auto scroll error and BackBottom error. + +#### 💄 Styles + +- **misc**: Fix BackBottom zIndex, improve chat list on mobile, improve chat list scrolling to bottom at initial render, improve custom model input, improve topic scroll. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to virtual list with react-virtuoso ([d6d63b2](https://github.com/lobehub/lobe-chat/commit/d6d63b2)) + +#### What's fixed + +- **misc**: Fix auto scroll error and BackBottom error ([6100970](https://github.com/lobehub/lobe-chat/commit/6100970)) + +#### Styles + +- **misc**: Fix BackBottom zIndex ([254cc54](https://github.com/lobehub/lobe-chat/commit/254cc54)) +- **misc**: Improve chat list on mobile ([a894fc5](https://github.com/lobehub/lobe-chat/commit/a894fc5)) +- **misc**: Improve chat list scrolling to bottom at initial render ([476304b](https://github.com/lobehub/lobe-chat/commit/476304b)) +- **misc**: Improve custom model input ([1c4722f](https://github.com/lobehub/lobe-chat/commit/1c4722f)) +- **misc**: Improve topic scroll ([8daf3ac](https://github.com/lobehub/lobe-chat/commit/8daf3ac)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.3](https://github.com/lobehub/lobe-chat/compare/v0.119.2...v0.119.3) + +Released on **2024-01-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix deploy error. Changed SquareAsterisk to AsteriskSquare. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix deploy error. Changed SquareAsterisk to AsteriskSquare, closes [#952](https://github.com/lobehub/lobe-chat/issues/952) ([61cbcf1](https://github.com/lobehub/lobe-chat/commit/61cbcf1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.2](https://github.com/lobehub/lobe-chat/compare/v0.119.1...v0.119.2) + +Released on **2024-01-05** + +#### 🐛 Bug Fixes + +- **misc**: Fix function call error with smooth animation. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix function call error with smooth animation, closes [#946](https://github.com/lobehub/lobe-chat/issues/946) ([7242aee](https://github.com/lobehub/lobe-chat/commit/7242aee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.119.1](https://github.com/lobehub/lobe-chat/compare/v0.119.0...v0.119.1) + +Released on **2024-01-05** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.119.0](https://github.com/lobehub/lobe-chat/compare/v0.118.10...v0.119.0) + +Released on **2024-01-04** + +#### ♻ Code Refactoring + +- **misc**: Refactor the ChatList. + +#### ✨ Features + +- **misc**: Support auto rename topic, support delete and regenerate message, support duplicate session, support duplicate topic. + +#### 🐛 Bug Fixes + +- **misc**: Fix can't uninstall custom plugin in custom plugin modal. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the ChatList ([20f21de](https://github.com/lobehub/lobe-chat/commit/20f21de)) + +#### What's improved + +- **misc**: Support auto rename topic ([4c5a345](https://github.com/lobehub/lobe-chat/commit/4c5a345)) +- **misc**: Support delete and regenerate message ([a05be1c](https://github.com/lobehub/lobe-chat/commit/a05be1c)) +- **misc**: Support duplicate session ([7a1e011](https://github.com/lobehub/lobe-chat/commit/7a1e011)) +- **misc**: Support duplicate topic ([ecf3e5a](https://github.com/lobehub/lobe-chat/commit/ecf3e5a)) + +#### What's fixed + +- **misc**: Fix can't uninstall custom plugin in custom plugin modal ([acae827](https://github.com/lobehub/lobe-chat/commit/acae827)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.10](https://github.com/lobehub/lobe-chat/compare/v0.118.9...v0.118.10) + +Released on **2024-01-03** + +#### 🐛 Bug Fixes + +- **misc**: Add chat defaultNS. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add chat defaultNS, closes [#929](https://github.com/lobehub/lobe-chat/issues/929) ([94c2aa1](https://github.com/lobehub/lobe-chat/commit/94c2aa1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.9](https://github.com/lobehub/lobe-chat/compare/v0.118.8...v0.118.9) + +Released on **2024-01-03** + +#### 💄 Styles + +- **misc**: Add leaving protect alert. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add leaving protect alert, closes [#927](https://github.com/lobehub/lobe-chat/issues/927) ([ea1d0c0](https://github.com/lobehub/lobe-chat/commit/ea1d0c0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.8](https://github.com/lobehub/lobe-chat/compare/v0.118.7...v0.118.8) + +Released on **2024-01-03** + +#### 💄 Styles + +- **misc**: Add Vietnamese files and add the vi-VN option in the General Settings. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add Vietnamese files and add the vi-VN option in the General Settings, closes [#860](https://github.com/lobehub/lobe-chat/issues/860) ([c2e5606](https://github.com/lobehub/lobe-chat/commit/c2e5606)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.7](https://github.com/lobehub/lobe-chat/compare/v0.118.6...v0.118.7) + +Released on **2024-01-03** + +#### 🐛 Bug Fixes + +- **misc**: Desensitize openai base url in the error response. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Desensitize openai base url in the error response, closes [#918](https://github.com/lobehub/lobe-chat/issues/918) ([ab0aeb7](https://github.com/lobehub/lobe-chat/commit/ab0aeb7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.6](https://github.com/lobehub/lobe-chat/compare/v0.118.5...v0.118.6) + +Released on **2024-01-03** + +#### ♻ Code Refactoring + +- **misc**: Migration the ChatList into Conversation. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Migration the ChatList into Conversation, closes [#916](https://github.com/lobehub/lobe-chat/issues/916) ([6ee3795](https://github.com/lobehub/lobe-chat/commit/6ee3795)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.5](https://github.com/lobehub/lobe-chat/compare/v0.118.4...v0.118.5) + +Released on **2024-01-02** + +#### 🐛 Bug Fixes + +- **misc**: Mobile device return to the previous page error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Mobile device return to the previous page error, closes [#886](https://github.com/lobehub/lobe-chat/issues/886) ([99cfc0f](https://github.com/lobehub/lobe-chat/commit/99cfc0f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.4](https://github.com/lobehub/lobe-chat/compare/v0.118.3...v0.118.4) + +Released on **2024-01-02** + +#### 🐛 Bug Fixes + +- **misc**: Update dalle identifier to fix unstable dalle function call. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Update dalle identifier to fix unstable dalle function call, closes [#896](https://github.com/lobehub/lobe-chat/issues/896) ([9d9ac32](https://github.com/lobehub/lobe-chat/commit/9d9ac32)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.3](https://github.com/lobehub/lobe-chat/compare/v0.118.2...v0.118.3) + +Released on **2024-01-01** + +#### 🐛 Bug Fixes + +- **misc**: Fix parse error of tool calls at end. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix parse error of tool calls at end, closes [#893](https://github.com/lobehub/lobe-chat/issues/893) ([f369b6e](https://github.com/lobehub/lobe-chat/commit/f369b6e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.2](https://github.com/lobehub/lobe-chat/compare/v0.118.1...v0.118.2) + +Released on **2023-12-31** + +#### 🐛 Bug Fixes + +- **misc**: Pin antd version to fix chat page crash. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Pin antd version to fix chat page crash, closes [#884](https://github.com/lobehub/lobe-chat/issues/884) ([31484ff](https://github.com/lobehub/lobe-chat/commit/31484ff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.118.1](https://github.com/lobehub/lobe-chat/compare/v0.118.0...v0.118.1) + +Released on **2023-12-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix dalle image download error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix dalle image download error, closes [#868](https://github.com/lobehub/lobe-chat/issues/868) ([5b6d11f](https://github.com/lobehub/lobe-chat/commit/5b6d11f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.118.0](https://github.com/lobehub/lobe-chat/compare/v0.117.5...v0.118.0) + +Released on **2023-12-29** + +#### ✨ Features + +- **misc**: Support markdown type plugin. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support markdown type plugin, closes [#865](https://github.com/lobehub/lobe-chat/issues/865) ([2791166](https://github.com/lobehub/lobe-chat/commit/2791166)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.117.5](https://github.com/lobehub/lobe-chat/compare/v0.117.4...v0.117.5) + +Released on **2023-12-29** + +#### 🐛 Bug Fixes + +- **misc**: The input box is prone to losing focus. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: The input box is prone to losing focus, closes [#834](https://github.com/lobehub/lobe-chat/issues/834) ([26a42f6](https://github.com/lobehub/lobe-chat/commit/26a42f6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.117.4](https://github.com/lobehub/lobe-chat/compare/v0.117.3...v0.117.4) + +Released on **2023-12-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix messages not refresh when creating a new topic. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix messages not refresh when creating a new topic, closes [#856](https://github.com/lobehub/lobe-chat/issues/856) ([5e7985a](https://github.com/lobehub/lobe-chat/commit/5e7985a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.117.3](https://github.com/lobehub/lobe-chat/compare/v0.117.2...v0.117.3) + +Released on **2023-12-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix tool calls at end, fix vision model max tokens, improve vision model checker. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix tool calls at end ([b0b615a](https://github.com/lobehub/lobe-chat/commit/b0b615a)) +- **misc**: Fix vision model max tokens ([8b704a0](https://github.com/lobehub/lobe-chat/commit/8b704a0)) +- **misc**: Improve vision model checker ([da7d177](https://github.com/lobehub/lobe-chat/commit/da7d177)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.117.2](https://github.com/lobehub/lobe-chat/compare/v0.117.1...v0.117.2) + +Released on **2023-12-28** + +#### 🐛 Bug Fixes + +- **misc**: Fix market locale missing. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix market locale missing, closes [#851](https://github.com/lobehub/lobe-chat/issues/851) ([e23ec66](https://github.com/lobehub/lobe-chat/commit/e23ec66)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.117.1](https://github.com/lobehub/lobe-chat/compare/v0.117.0...v0.117.1) + +Released on **2023-12-27** + +#### 💄 Styles + +- **misc**: Add image download functionality to DALL·E render component. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add image download functionality to DALL·E render component, closes [#778](https://github.com/lobehub/lobe-chat/issues/778) ([31b8047](https://github.com/lobehub/lobe-chat/commit/31b8047)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.117.0](https://github.com/lobehub/lobe-chat/compare/v0.116.5...v0.117.0) + +Released on **2023-12-27** + +#### ✨ Features + +- **misc**: Support plugin settings env. + +#### 🐛 Bug Fixes + +- **misc**: Improve topic search experience. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support plugin settings env, closes [#821](https://github.com/lobehub/lobe-chat/issues/821) ([efd9dc9](https://github.com/lobehub/lobe-chat/commit/efd9dc9)) + +#### What's fixed + +- **misc**: Improve topic search experience, closes [#828](https://github.com/lobehub/lobe-chat/issues/828) ([ad55f1c](https://github.com/lobehub/lobe-chat/commit/ad55f1c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.116.5](https://github.com/lobehub/lobe-chat/compare/v0.116.4...v0.116.5) + +Released on **2023-12-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix input box losing focus after sending a message on the desktop. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix input box losing focus after sending a message on the desktop, closes [#830](https://github.com/lobehub/lobe-chat/issues/830) ([d491af9](https://github.com/lobehub/lobe-chat/commit/d491af9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.116.4](https://github.com/lobehub/lobe-chat/compare/v0.116.3...v0.116.4) + +Released on **2023-12-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix ShareModal. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix ShareModal ([4592515](https://github.com/lobehub/lobe-chat/commit/4592515)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.116.3](https://github.com/lobehub/lobe-chat/compare/v0.116.2...v0.116.3) + +Released on **2023-12-26** + +#### 💄 Styles + +- **misc**: Fix typo. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix typo ([9d329a9](https://github.com/lobehub/lobe-chat/commit/9d329a9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.116.2](https://github.com/lobehub/lobe-chat/compare/v0.116.1...v0.116.2) + +Released on **2023-12-26** + +#### 💄 Styles + +- **misc**: Update Modal style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update Modal style ([ac7d309](https://github.com/lobehub/lobe-chat/commit/ac7d309)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.116.1](https://github.com/lobehub/lobe-chat/compare/v0.116.0...v0.116.1) + +Released on **2023-12-26** + +#### 💄 Styles + +- **misc**: Support slider and select plugin setting render. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Support slider and select plugin setting render, closes [#819](https://github.com/lobehub/lobe-chat/issues/819) ([3190b44](https://github.com/lobehub/lobe-chat/commit/3190b44)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.116.0](https://github.com/lobehub/lobe-chat/compare/v0.115.13...v0.116.0) + +Released on **2023-12-26** + +#### ✨ Features + +- **misc**: Support OpenAI tool calls. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support OpenAI tool calls ([9681fdc](https://github.com/lobehub/lobe-chat/commit/9681fdc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.13](https://github.com/lobehub/lobe-chat/compare/v0.115.12...v0.115.13) + +Released on **2023-12-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix remove tts and translate not working. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix remove tts and translate not working, closes [#818](https://github.com/lobehub/lobe-chat/issues/818) ([4a275e9](https://github.com/lobehub/lobe-chat/commit/4a275e9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.12](https://github.com/lobehub/lobe-chat/compare/v0.115.11...v0.115.12) + +Released on **2023-12-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix active setting tab after click agent setting button. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix active setting tab after click agent setting button ([c480fa9](https://github.com/lobehub/lobe-chat/commit/c480fa9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.11](https://github.com/lobehub/lobe-chat/compare/v0.115.10...v0.115.11) + +Released on **2023-12-25** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent system role modal scrolling when content is too long. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent system role modal scrolling when content is too long, closes [#801](https://github.com/lobehub/lobe-chat/issues/801) ([f482a80](https://github.com/lobehub/lobe-chat/commit/f482a80)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.10](https://github.com/lobehub/lobe-chat/compare/v0.115.9...v0.115.10) + +Released on **2023-12-25** + +#### 💄 Styles + +- **misc**: Fix some style problem. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix some style problem ([447c006](https://github.com/lobehub/lobe-chat/commit/447c006)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.9](https://github.com/lobehub/lobe-chat/compare/v0.115.8...v0.115.9) + +Released on **2023-12-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix `PLUGINS_INDEX_URL` not working, fix a translation error in Traditional Chinese. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix `PLUGINS_INDEX_URL` not working, closes [#793](https://github.com/lobehub/lobe-chat/issues/793) ([152913e](https://github.com/lobehub/lobe-chat/commit/152913e)) +- **misc**: Fix a translation error in Traditional Chinese, closes [#789](https://github.com/lobehub/lobe-chat/issues/789) ([80c02ee](https://github.com/lobehub/lobe-chat/commit/80c02ee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.8](https://github.com/lobehub/lobe-chat/compare/v0.115.7...v0.115.8) + +Released on **2023-12-24** + +#### 🐛 Bug Fixes + +- **misc**: Fix CUSTOM_MODEL `-` operator not working. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix CUSTOM_MODEL `-` operator not working, closes [#791](https://github.com/lobehub/lobe-chat/issues/791) ([26b968f](https://github.com/lobehub/lobe-chat/commit/26b968f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.7](https://github.com/lobehub/lobe-chat/compare/v0.115.6...v0.115.7) + +Released on **2023-12-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix auto scrolling when generating message. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix auto scrolling when generating message, closes [#785](https://github.com/lobehub/lobe-chat/issues/785) ([1a236e6](https://github.com/lobehub/lobe-chat/commit/1a236e6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.6](https://github.com/lobehub/lobe-chat/compare/v0.115.5...v0.115.6) + +Released on **2023-12-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix maxTokens params still work when disable enableMaxTokens. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix maxTokens params still work when disable enableMaxTokens, closes [#779](https://github.com/lobehub/lobe-chat/issues/779) ([20956ea](https://github.com/lobehub/lobe-chat/commit/20956ea)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.5](https://github.com/lobehub/lobe-chat/compare/v0.115.4...v0.115.5) + +Released on **2023-12-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix image display error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix image display error, closes [#777](https://github.com/lobehub/lobe-chat/issues/777) ([08659d6](https://github.com/lobehub/lobe-chat/commit/08659d6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.4](https://github.com/lobehub/lobe-chat/compare/v0.115.3...v0.115.4) + +Released on **2023-12-23** + +#### ♻ Code Refactoring + +- **misc**: Refactor the ChatMessage type. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the ChatMessage type ([40375bd](https://github.com/lobehub/lobe-chat/commit/40375bd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.3](https://github.com/lobehub/lobe-chat/compare/v0.115.2...v0.115.3) + +Released on **2023-12-23** + +#### ♻ Code Refactoring + +- **misc**: Refactor and clean global store and chat store. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor and clean global store and chat store, closes [#774](https://github.com/lobehub/lobe-chat/issues/774) ([6120042](https://github.com/lobehub/lobe-chat/commit/6120042)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.2](https://github.com/lobehub/lobe-chat/compare/v0.115.1...v0.115.2) + +Released on **2023-12-23** + +#### 🐛 Bug Fixes + +- **misc**: Fix envs like `CUSTOM_MODELS` don't work with docker deployment. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix envs like `CUSTOM_MODELS` don't work with docker deployment, closes [#773](https://github.com/lobehub/lobe-chat/issues/773) ([54dc18b](https://github.com/lobehub/lobe-chat/commit/54dc18b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.115.1](https://github.com/lobehub/lobe-chat/compare/v0.115.0...v0.115.1) + +Released on **2023-12-22** + +#### 💄 Styles + +- **misc**: Lock ui version to fix setting form style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Lock ui version to fix setting form style ([6cdf548](https://github.com/lobehub/lobe-chat/commit/6cdf548)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.115.0](https://github.com/lobehub/lobe-chat/compare/v0.114.9...v0.115.0) + +Released on **2023-12-22** + +#### ✨ Features + +- **misc**: Support Dall·E 3. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support Dall·E 3, closes [#697](https://github.com/lobehub/lobe-chat/issues/697) ([e39d199](https://github.com/lobehub/lobe-chat/commit/e39d199)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.9](https://github.com/lobehub/lobe-chat/compare/v0.114.8...v0.114.9) + +Released on **2023-12-22** + +#### 💄 Styles + +- **misc**: Support it-IT nl-NL and pl-PL locales. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Support it-IT nl-NL and pl-PL locales, closes [#759](https://github.com/lobehub/lobe-chat/issues/759) ([e49817c](https://github.com/lobehub/lobe-chat/commit/e49817c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.8](https://github.com/lobehub/lobe-chat/compare/v0.114.7...v0.114.8) + +Released on **2023-12-22** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.7](https://github.com/lobehub/lobe-chat/compare/v0.114.6...v0.114.7) + +Released on **2023-12-22** + +#### ♻ Code Refactoring + +- **misc**: Move the conversation and chatInput to features folder. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Move the conversation and chatInput to features folder, closes [#750](https://github.com/lobehub/lobe-chat/issues/750) ([0334592](https://github.com/lobehub/lobe-chat/commit/0334592)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.6](https://github.com/lobehub/lobe-chat/compare/v0.114.5...v0.114.6) + +Released on **2023-12-22** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.5](https://github.com/lobehub/lobe-chat/compare/v0.114.4...v0.114.5) + +Released on **2023-12-19** + +#### 💄 Styles + +- **misc**: Fix plugin iframe width. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix plugin iframe width, closes [#721](https://github.com/lobehub/lobe-chat/issues/721) ([53ad132](https://github.com/lobehub/lobe-chat/commit/53ad132)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.4](https://github.com/lobehub/lobe-chat/compare/v0.114.3...v0.114.4) + +Released on **2023-12-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent system role modal scrolling when content is too long. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent system role modal scrolling when content is too long, closes [#716](https://github.com/lobehub/lobe-chat/issues/716) ([c3e36d1](https://github.com/lobehub/lobe-chat/commit/c3e36d1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.3](https://github.com/lobehub/lobe-chat/compare/v0.114.2...v0.114.3) + +Released on **2023-12-18** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.2](https://github.com/lobehub/lobe-chat/compare/v0.114.1...v0.114.2) + +Released on **2023-12-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix chat error when message has image with non-vision model. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix chat error when message has image with non-vision model, closes [#698](https://github.com/lobehub/lobe-chat/issues/698) [#693](https://github.com/lobehub/lobe-chat/issues/693) ([b142c17](https://github.com/lobehub/lobe-chat/commit/b142c17)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.114.1](https://github.com/lobehub/lobe-chat/compare/v0.114.0...v0.114.1) + +Released on **2023-12-16** + +#### 🐛 Bug Fixes + +- **misc**: Inject tool description into agent system role. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Inject tool description into agent system role, closes [#681](https://github.com/lobehub/lobe-chat/issues/681) ([e7a8cff](https://github.com/lobehub/lobe-chat/commit/e7a8cff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.114.0](https://github.com/lobehub/lobe-chat/compare/v0.113.1...v0.114.0) + +Released on **2023-12-16** + +#### ✨ Features + +- **misc**: Supports setting multiple access code. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Supports setting multiple access code, closes [#647](https://github.com/lobehub/lobe-chat/issues/647) ([7db0430](https://github.com/lobehub/lobe-chat/commit/7db0430)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.113.1](https://github.com/lobehub/lobe-chat/compare/v0.113.0...v0.113.1) + +Released on **2023-12-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix fontsize setting and audio download style. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix fontsize setting and audio download style, closes [#433](https://github.com/lobehub/lobe-chat/issues/433) ([6882752](https://github.com/lobehub/lobe-chat/commit/6882752)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.113.0](https://github.com/lobehub/lobe-chat/compare/v0.112.1...v0.113.0) + +Released on **2023-12-16** + +#### ✨ Features + +- **locale**: Add es-ES pt-BR de-DE tr-TR. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **locale**: Add es-ES pt-BR de-DE tr-TR, closes [#659](https://github.com/lobehub/lobe-chat/issues/659) ([021abfa](https://github.com/lobehub/lobe-chat/commit/021abfa)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.112.1](https://github.com/lobehub/lobe-chat/compare/v0.112.0...v0.112.1) + +Released on **2023-12-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix locales. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix locales ([4384dc2](https://github.com/lobehub/lobe-chat/commit/4384dc2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.112.0](https://github.com/lobehub/lobe-chat/compare/v0.111.6...v0.112.0) + +Released on **2023-12-16** + +#### ♻ Code Refactoring + +- **misc**: Refactor global and share service, refactor plugin dev modal and improve plugin store, refactor with OpenAPIConvertor. + +#### ✨ Features + +- **misc**: Introduce plugin detail modal, support OpenAI plugin manifest, support OpenAPI Authentication, support OpenAPI schema in lobe plugin, support parse openapi schema. + +#### 🐛 Bug Fixes + +- **misc**: Fix function apiName length, try with node mode plugins. + +#### 💄 Styles + +- **misc**: Fix function message style, fix mobile padding of plugin dev modal, improve settings display, Update tool style. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor global and share service ([dd6f00e](https://github.com/lobehub/lobe-chat/commit/dd6f00e)) +- **misc**: Refactor plugin dev modal and improve plugin store ([4dc5e35](https://github.com/lobehub/lobe-chat/commit/4dc5e35)) +- **misc**: Refactor with OpenAPIConvertor ([605b3bf](https://github.com/lobehub/lobe-chat/commit/605b3bf)) + +#### What's improved + +- **misc**: Introduce plugin detail modal ([0308783](https://github.com/lobehub/lobe-chat/commit/0308783)) +- **misc**: Support OpenAI plugin manifest ([04ff2d5](https://github.com/lobehub/lobe-chat/commit/04ff2d5)) +- **misc**: Support OpenAPI Authentication ([820c15e](https://github.com/lobehub/lobe-chat/commit/820c15e)) +- **misc**: Support OpenAPI schema in lobe plugin, closes [#614](https://github.com/lobehub/lobe-chat/issues/614) ([5426a54](https://github.com/lobehub/lobe-chat/commit/5426a54)) +- **misc**: Support parse openapi schema ([11a39b1](https://github.com/lobehub/lobe-chat/commit/11a39b1)) + +#### What's fixed + +- **misc**: Fix function apiName length ([b6f8c16](https://github.com/lobehub/lobe-chat/commit/b6f8c16)) +- **misc**: Try with node mode plugins ([6bb547f](https://github.com/lobehub/lobe-chat/commit/6bb547f)) + +#### Styles + +- **misc**: Fix function message style ([4fee0b1](https://github.com/lobehub/lobe-chat/commit/4fee0b1)) +- **misc**: Fix mobile padding of plugin dev modal ([7f7070a](https://github.com/lobehub/lobe-chat/commit/7f7070a)) +- **misc**: Improve settings display ([df57cde](https://github.com/lobehub/lobe-chat/commit/df57cde)) +- **misc**: Update tool style ([292a3e1](https://github.com/lobehub/lobe-chat/commit/292a3e1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.6](https://github.com/lobehub/lobe-chat/compare/v0.111.5...v0.111.6) + +Released on **2023-12-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix deployment build failure. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix deployment build failure, closes [#672](https://github.com/lobehub/lobe-chat/issues/672) ([3878dcd](https://github.com/lobehub/lobe-chat/commit/3878dcd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.5](https://github.com/lobehub/lobe-chat/compare/v0.111.4...v0.111.5) + +Released on **2023-12-14** + +#### 🐛 Bug Fixes + +- **misc**: Wrong locale language in en_US. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Wrong locale language in en_US, closes [#660](https://github.com/lobehub/lobe-chat/issues/660) ([e1c31ee](https://github.com/lobehub/lobe-chat/commit/e1c31ee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.4](https://github.com/lobehub/lobe-chat/compare/v0.111.3...v0.111.4) + +Released on **2023-12-14** + +#### 🐛 Bug Fixes + +- **misc**: Revert "🐛 fix: clean up gpt-3.5 model". + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Revert "🐛 fix: clean up gpt-3.5 model", closes [#653](https://github.com/lobehub/lobe-chat/issues/653) ([b8b14fc](https://github.com/lobehub/lobe-chat/commit/b8b14fc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.3](https://github.com/lobehub/lobe-chat/compare/v0.111.2...v0.111.3) + +Released on **2023-12-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix the history-count text. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the history-count text, closes [#615](https://github.com/lobehub/lobe-chat/issues/615) ([4db1cef](https://github.com/lobehub/lobe-chat/commit/4db1cef)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.2](https://github.com/lobehub/lobe-chat/compare/v0.111.1...v0.111.2) + +Released on **2023-12-13** + +#### 🐛 Bug Fixes + +- **misc**: Change topic-deletion hotkey. + +#### 💄 Styles + +- **misc**: Fix image display in safari (fix. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Change topic-deletion hotkey, closes [#616](https://github.com/lobehub/lobe-chat/issues/616) ([912ff45](https://github.com/lobehub/lobe-chat/commit/912ff45)) + +#### Styles + +- **misc**: Fix image display in safari (fix, closes [#571](https://github.com/lobehub/lobe-chat/issues/571) ([4beefa7](https://github.com/lobehub/lobe-chat/commit/4beefa7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.111.1](https://github.com/lobehub/lobe-chat/compare/v0.111.0...v0.111.1) + +Released on **2023-12-13** + +#### 🐛 Bug Fixes + +- **misc**: Fix locale typo. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix locale typo ([f44b41e](https://github.com/lobehub/lobe-chat/commit/f44b41e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.111.0](https://github.com/lobehub/lobe-chat/compare/v0.110.10...v0.111.0) + +Released on **2023-12-13** + +#### ✨ Features + +- **locale**: Add fr-FR. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **locale**: Add fr-FR, closes [#637](https://github.com/lobehub/lobe-chat/issues/637) ([357141c](https://github.com/lobehub/lobe-chat/commit/357141c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.10](https://github.com/lobehub/lobe-chat/compare/v0.110.9...v0.110.10) + +Released on **2023-12-13** + +#### 🐛 Bug Fixes + +- **misc**: Add cancel button text i18n for delete assistant modal. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add cancel button text i18n for delete assistant modal, closes [#640](https://github.com/lobehub/lobe-chat/issues/640) ([fae04c9](https://github.com/lobehub/lobe-chat/commit/fae04c9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.9](https://github.com/lobehub/lobe-chat/compare/v0.110.8...v0.110.9) + +Released on **2023-12-13** + +#### 🐛 Bug Fixes + +- **misc**: ChatInput should have maxHeight. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: ChatInput should have maxHeight, closes [#630](https://github.com/lobehub/lobe-chat/issues/630) ([8dfe1b8](https://github.com/lobehub/lobe-chat/commit/8dfe1b8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.8](https://github.com/lobehub/lobe-chat/compare/v0.110.7...v0.110.8) + +Released on **2023-12-12** + +#### 🐛 Bug Fixes + +- **misc**: Clean up gpt-3.5 model. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Clean up gpt-3.5 model, closes [#554](https://github.com/lobehub/lobe-chat/issues/554) ([9616783](https://github.com/lobehub/lobe-chat/commit/9616783)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.7](https://github.com/lobehub/lobe-chat/compare/v0.110.6...v0.110.7) + +Released on **2023-12-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix language settings may not take effect. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix language settings may not take effect, closes [#595](https://github.com/lobehub/lobe-chat/issues/595) ([a5db64e](https://github.com/lobehub/lobe-chat/commit/a5db64e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.6](https://github.com/lobehub/lobe-chat/compare/v0.110.5...v0.110.6) + +Released on **2023-12-11** + +#### 🐛 Bug Fixes + +- **misc**: Sharp missing in docker production. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Sharp missing in docker production, closes [#603](https://github.com/lobehub/lobe-chat/issues/603) ([d89b48d](https://github.com/lobehub/lobe-chat/commit/d89b48d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.5](https://github.com/lobehub/lobe-chat/compare/v0.110.4...v0.110.5) + +Released on **2023-12-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix setting plugin i18n. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix setting plugin i18n, closes [#606](https://github.com/lobehub/lobe-chat/issues/606) ([4e18ebf](https://github.com/lobehub/lobe-chat/commit/4e18ebf)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.4](https://github.com/lobehub/lobe-chat/compare/v0.110.3...v0.110.4) + +Released on **2023-12-08** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.3](https://github.com/lobehub/lobe-chat/compare/v0.110.2...v0.110.3) + +Released on **2023-12-08** + +#### ♻ Code Refactoring + +- **misc**: Refactor with new plugin implement with dexie db. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor with new plugin implement with dexie db, closes [#596](https://github.com/lobehub/lobe-chat/issues/596) ([f3b5e7b](https://github.com/lobehub/lobe-chat/commit/f3b5e7b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.2](https://github.com/lobehub/lobe-chat/compare/v0.110.1...v0.110.2) + +Released on **2023-12-08** + +#### 💄 Styles + +- **misc**: Fix ChatInputArea style and typo (resolve. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix ChatInputArea style and typo (resolve, closes [#599](https://github.com/lobehub/lobe-chat/issues/599) ([0d08f3b](https://github.com/lobehub/lobe-chat/commit/0d08f3b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.110.1](https://github.com/lobehub/lobe-chat/compare/v0.110.0...v0.110.1) + +Released on **2023-12-08** + +#### 🐛 Bug Fixes + +- **misc**: Sharp missing in production. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Sharp missing in production, closes [#598](https://github.com/lobehub/lobe-chat/issues/598) ([c8ef782](https://github.com/lobehub/lobe-chat/commit/c8ef782)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.110.0](https://github.com/lobehub/lobe-chat/compare/v0.109.1...v0.110.0) + +Released on **2023-12-07** + +#### ✨ Features + +- **misc**: Local TTS Player. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Local TTS Player, closes [#587](https://github.com/lobehub/lobe-chat/issues/587) ([87b51bd](https://github.com/lobehub/lobe-chat/commit/87b51bd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.109.1](https://github.com/lobehub/lobe-chat/compare/v0.109.0...v0.109.1) + +Released on **2023-12-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent settings crash with old pluginManifest. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent settings crash with old pluginManifest ([8b80dfd](https://github.com/lobehub/lobe-chat/commit/8b80dfd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.109.0](https://github.com/lobehub/lobe-chat/compare/v0.108.0...v0.109.0) + +Released on **2023-12-06** + +#### ✨ Features + +- **misc**: Introducing plugin store and refactor with tool concept. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Introducing plugin store and refactor with tool concept, closes [#573](https://github.com/lobehub/lobe-chat/issues/573) ([92f43d1](https://github.com/lobehub/lobe-chat/commit/92f43d1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.108.0](https://github.com/lobehub/lobe-chat/compare/v0.107.16...v0.108.0) + +Released on **2023-12-03** + +#### ✨ Features + +- **misc**: Hide the password form item in the settings when there is no `ACCESS_CODE` env. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Hide the password form item in the settings when there is no `ACCESS_CODE` env, closes [#568](https://github.com/lobehub/lobe-chat/issues/568) ([3b5f8b2](https://github.com/lobehub/lobe-chat/commit/3b5f8b2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.16](https://github.com/lobehub/lobe-chat/compare/v0.107.15...v0.107.16) + +Released on **2023-12-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix custom agent meta issue. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix custom agent meta issue, closes [#567](https://github.com/lobehub/lobe-chat/issues/567) ([75560e1](https://github.com/lobehub/lobe-chat/commit/75560e1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.15](https://github.com/lobehub/lobe-chat/compare/v0.107.14...v0.107.15) + +Released on **2023-12-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix messages flickering when creating topic. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix messages flickering when creating topic, closes [#565](https://github.com/lobehub/lobe-chat/issues/565) ([7127550](https://github.com/lobehub/lobe-chat/commit/7127550)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.14](https://github.com/lobehub/lobe-chat/compare/v0.107.13...v0.107.14) + +Released on **2023-12-03** + +#### 🐛 Bug Fixes + +- **misc**: Fix opt+delete fail in inputing (resolve. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix opt+delete fail in inputing (resolve, closes [#556](https://github.com/lobehub/lobe-chat/issues/556) ([4d5d93d](https://github.com/lobehub/lobe-chat/commit/4d5d93d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.13](https://github.com/lobehub/lobe-chat/compare/v0.107.12...v0.107.13) + +Released on **2023-12-03** + +#### ♻ Code Refactoring + +- **misc**: Refactor Image components. + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug that can't send only images with empty content, Fix image gallery sort index, Fix image gallery sort index, Fix image sort index, Fix image upload error, Fix import. + +#### 💄 Styles + +- **misc**: Change image fit to cover mode, Fix empty files style, Move file inside chat input in mobile mode, Update editable image style, Update image default background color, Update image editable style, Update image grid, Update Image grid, Update image remove button hover style. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor Image components ([72dcd18](https://github.com/lobehub/lobe-chat/commit/72dcd18)) + +#### What's fixed + +- **misc**: Fix a bug that can't send only images with empty content ([9601520](https://github.com/lobehub/lobe-chat/commit/9601520)) +- **misc**: Fix image gallery sort index ([16548d3](https://github.com/lobehub/lobe-chat/commit/16548d3)) +- **misc**: Fix image gallery sort index ([5636599](https://github.com/lobehub/lobe-chat/commit/5636599)) +- **misc**: Fix image sort index ([29cf223](https://github.com/lobehub/lobe-chat/commit/29cf223)) +- **misc**: Fix image upload error ([c7745c7](https://github.com/lobehub/lobe-chat/commit/c7745c7)) +- **misc**: Fix import ([af797d6](https://github.com/lobehub/lobe-chat/commit/af797d6)) + +#### Styles + +- **misc**: Change image fit to cover mode ([9fdc459](https://github.com/lobehub/lobe-chat/commit/9fdc459)) +- **misc**: Fix empty files style ([bbe14c4](https://github.com/lobehub/lobe-chat/commit/bbe14c4)) +- **misc**: Move file inside chat input in mobile mode ([b6401c1](https://github.com/lobehub/lobe-chat/commit/b6401c1)) +- **misc**: Update editable image style ([a96ca4c](https://github.com/lobehub/lobe-chat/commit/a96ca4c)) +- **misc**: Update image default background color ([fadc024](https://github.com/lobehub/lobe-chat/commit/fadc024)) +- **misc**: Update image editable style ([8dea792](https://github.com/lobehub/lobe-chat/commit/8dea792)) +- **misc**: Update image grid ([901d10c](https://github.com/lobehub/lobe-chat/commit/901d10c)) +- **misc**: Update Image grid ([c68788d](https://github.com/lobehub/lobe-chat/commit/c68788d)) +- **misc**: Update image remove button hover style ([5bc916c](https://github.com/lobehub/lobe-chat/commit/5bc916c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.12](https://github.com/lobehub/lobe-chat/compare/v0.107.11...v0.107.12) + +Released on **2023-12-02** + +#### 🐛 Bug Fixes + +- **misc**: Fix topic not refresh when switching sessions quickly. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix topic not refresh when switching sessions quickly, closes [#555](https://github.com/lobehub/lobe-chat/issues/555) ([1806c05](https://github.com/lobehub/lobe-chat/commit/1806c05)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.11](https://github.com/lobehub/lobe-chat/compare/v0.107.10...v0.107.11) + +Released on **2023-12-01** + +#### 🐛 Bug Fixes + +- **misc**: Fix switch model don't work on mobile. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix switch model don't work on mobile, closes [#541](https://github.com/lobehub/lobe-chat/issues/541) ([609f505](https://github.com/lobehub/lobe-chat/commit/609f505)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.10](https://github.com/lobehub/lobe-chat/compare/v0.107.9...v0.107.10) + +Released on **2023-11-30** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.9](https://github.com/lobehub/lobe-chat/compare/v0.107.8...v0.107.9) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: Switch session causing problem. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Switch session causing problem, closes [#535](https://github.com/lobehub/lobe-chat/issues/535) ([205bc42](https://github.com/lobehub/lobe-chat/commit/205bc42)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.8](https://github.com/lobehub/lobe-chat/compare/v0.107.7...v0.107.8) + +Released on **2023-11-30** + +#### 💄 Styles + +- **misc**: Fix chatitem gap. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix chatitem gap ([772bb7c](https://github.com/lobehub/lobe-chat/commit/772bb7c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.7](https://github.com/lobehub/lobe-chat/compare/v0.107.6...v0.107.7) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: Improve plugin message display. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Improve plugin message display ([208200a](https://github.com/lobehub/lobe-chat/commit/208200a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.6](https://github.com/lobehub/lobe-chat/compare/v0.107.5...v0.107.6) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: 修正调用插件查询的显示问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正调用插件查询的显示问题 ([671ccef](https://github.com/lobehub/lobe-chat/commit/671ccef)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.5](https://github.com/lobehub/lobe-chat/compare/v0.107.4...v0.107.5) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: 修正调用插件查询的显示问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正调用插件查询的显示问题 ([1457fe8](https://github.com/lobehub/lobe-chat/commit/1457fe8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.4](https://github.com/lobehub/lobe-chat/compare/v0.107.3...v0.107.4) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug that remove all topics when clear message. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug that remove all topics when clear message ([1ab912d](https://github.com/lobehub/lobe-chat/commit/1ab912d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.3](https://github.com/lobehub/lobe-chat/compare/v0.107.2...v0.107.3) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug that trigger plugin's message type error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug that trigger plugin's message type error ([b9c7849](https://github.com/lobehub/lobe-chat/commit/b9c7849)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.2](https://github.com/lobehub/lobe-chat/compare/v0.107.1...v0.107.2) + +Released on **2023-11-30** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug that export a session without messages. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug that export a session without messages ([8e84f35](https://github.com/lobehub/lobe-chat/commit/8e84f35)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.107.1](https://github.com/lobehub/lobe-chat/compare/v0.107.0...v0.107.1) + +Released on **2023-11-30** + +#### 💄 Styles + +- **misc**: 优化文案. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化文案 ([aaa03c5](https://github.com/lobehub/lobe-chat/commit/aaa03c5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.107.0](https://github.com/lobehub/lobe-chat/compare/v0.106.0...v0.107.0) + +Released on **2023-11-30** + +#### ✨ Features + +- **misc**: Refactor the persist layer from zustand's persist to dexie ORM. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Refactor the persist layer from zustand's persist to dexie ORM, closes [#500](https://github.com/lobehub/lobe-chat/issues/500) ([9ae3a8e](https://github.com/lobehub/lobe-chat/commit/9ae3a8e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.106.0](https://github.com/lobehub/lobe-chat/compare/v0.105.2...v0.106.0) + +Released on **2023-11-29** + +#### ✨ Features + +- **misc**: Support custom deletion, addition, and renaming of models. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support custom deletion, addition, and renaming of models, closes [#521](https://github.com/lobehub/lobe-chat/issues/521) [#518](https://github.com/lobehub/lobe-chat/issues/518) [#518](https://github.com/lobehub/lobe-chat/issues/518) ([65e0824](https://github.com/lobehub/lobe-chat/commit/65e0824)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.105.2](https://github.com/lobehub/lobe-chat/compare/v0.105.1...v0.105.2) + +Released on **2023-11-27** + +#### 🐛 Bug Fixes + +- **misc**: Add some env to Dockerfile. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add some env to Dockerfile, closes [#514](https://github.com/lobehub/lobe-chat/issues/514) ([ed148db](https://github.com/lobehub/lobe-chat/commit/ed148db)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.105.1](https://github.com/lobehub/lobe-chat/compare/v0.105.0...v0.105.1) + +Released on **2023-11-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent market detail scroll error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent market detail scroll error, closes [#503](https://github.com/lobehub/lobe-chat/issues/503) ([8900ad0](https://github.com/lobehub/lobe-chat/commit/8900ad0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.105.0](https://github.com/lobehub/lobe-chat/compare/v0.104.0...v0.105.0) + +Released on **2023-11-22** + +#### ✨ Features + +- **misc**: Standalone pluginn can get more arguments on init. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Standalone pluginn can get more arguments on init, closes [#498](https://github.com/lobehub/lobe-chat/issues/498) ([a7624f5](https://github.com/lobehub/lobe-chat/commit/a7624f5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.104.0](https://github.com/lobehub/lobe-chat/compare/v0.103.1...v0.104.0) + +Released on **2023-11-21** + +#### ✨ Features + +- **misc**: Support using env variable to set regions for OpenAI Edge Functions.. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support using env variable to set regions for OpenAI Edge Functions., closes [#473](https://github.com/lobehub/lobe-chat/issues/473) ([de6b79e](https://github.com/lobehub/lobe-chat/commit/de6b79e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.103.1](https://github.com/lobehub/lobe-chat/compare/v0.103.0...v0.103.1) + +Released on **2023-11-21** + +#### 🐛 Bug Fixes + +- **misc**: Image optimization in docker standalone build. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Image optimization in docker standalone build, closes [#494](https://github.com/lobehub/lobe-chat/issues/494) ([d2bcac3](https://github.com/lobehub/lobe-chat/commit/d2bcac3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.103.0](https://github.com/lobehub/lobe-chat/compare/v0.102.4...v0.103.0) + +Released on **2023-11-20** + +#### ✨ Features + +- **misc**: Support the auto create topic configuration. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support the auto create topic configuration, closes [#490](https://github.com/lobehub/lobe-chat/issues/490) ([a7b7ef0](https://github.com/lobehub/lobe-chat/commit/a7b7ef0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.102.4](https://github.com/lobehub/lobe-chat/compare/v0.102.3...v0.102.4) + +Released on **2023-11-20** + +#### 🐛 Bug Fixes + +- **plugin**: Fix plugin can't get settings from lobe-chat. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **plugin**: Fix plugin can't get settings from lobe-chat, closes [#488](https://github.com/lobehub/lobe-chat/issues/488) ([1555140](https://github.com/lobehub/lobe-chat/commit/1555140)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.102.3](https://github.com/lobehub/lobe-chat/compare/v0.102.2...v0.102.3) + +Released on **2023-11-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin not work correct when adding agent from market. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix plugin not work correct when adding agent from market, closes [#394](https://github.com/lobehub/lobe-chat/issues/394) ([7c99816](https://github.com/lobehub/lobe-chat/commit/7c99816)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.102.2](https://github.com/lobehub/lobe-chat/compare/v0.102.1...v0.102.2) + +Released on **2023-11-20** + +#### 🐛 Bug Fixes + +- **misc**: Fix model tag missing. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix model tag missing, closes [#481](https://github.com/lobehub/lobe-chat/issues/481) ([8c96cf0](https://github.com/lobehub/lobe-chat/commit/8c96cf0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.102.1](https://github.com/lobehub/lobe-chat/compare/v0.102.0...v0.102.1) + +Released on **2023-11-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix image upload list missing. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix image upload list missing ([6bbac34](https://github.com/lobehub/lobe-chat/commit/6bbac34)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.102.0](https://github.com/lobehub/lobe-chat/compare/v0.101.7...v0.102.0) + +Released on **2023-11-19** + +#### ✨ Features + +- **misc**: Support TTS & STT. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support TTS & STT, closes [#443](https://github.com/lobehub/lobe-chat/issues/443) ([4fa2ef4](https://github.com/lobehub/lobe-chat/commit/4fa2ef4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.7](https://github.com/lobehub/lobe-chat/compare/v0.101.6...v0.101.7) + +Released on **2023-11-18** + +#### 🐛 Bug Fixes + +- **misc**: Agent details sidebar and market page height overflow. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Agent details sidebar and market page height overflow ([71a54cc](https://github.com/lobehub/lobe-chat/commit/71a54cc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.6](https://github.com/lobehub/lobe-chat/compare/v0.101.5...v0.101.6) + +Released on **2023-11-17** + +#### 💄 Styles + +- **misc**: Add config to renderErrorMessages, Use new Alert ui. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add config to renderErrorMessages ([75b6b40](https://github.com/lobehub/lobe-chat/commit/75b6b40)) +- **misc**: Use new Alert ui ([cf845a7](https://github.com/lobehub/lobe-chat/commit/cf845a7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.5](https://github.com/lobehub/lobe-chat/compare/v0.101.4...v0.101.5) + +Released on **2023-11-17** + +#### 🐛 Bug Fixes + +- **misc**: Improve openai error info. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Improve openai error info, closes [#469](https://github.com/lobehub/lobe-chat/issues/469) ([5523b64](https://github.com/lobehub/lobe-chat/commit/5523b64)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.4](https://github.com/lobehub/lobe-chat/compare/v0.101.3...v0.101.4) + +Released on **2023-11-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix the plugin array merge error when fork agent from market. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix the plugin array merge error when fork agent from market, closes [#459](https://github.com/lobehub/lobe-chat/issues/459) ([fc29b33](https://github.com/lobehub/lobe-chat/commit/fc29b33)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.3](https://github.com/lobehub/lobe-chat/compare/v0.101.2...v0.101.3) + +Released on **2023-11-14** + +#### 💄 Styles + +- **misc**: Improve password ui to make it more clear. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve password ui to make it more clear, closes [#458](https://github.com/lobehub/lobe-chat/issues/458) ([e3d2a8e](https://github.com/lobehub/lobe-chat/commit/e3d2a8e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.2](https://github.com/lobehub/lobe-chat/compare/v0.101.1...v0.101.2) + +Released on **2023-11-14** + +#### 💄 Styles + +- **misc**: upload image to vision model adapting to mobile device. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: upload image to vision model adapting to mobile device, closes [#457](https://github.com/lobehub/lobe-chat/issues/457) ([9c4f4ee](https://github.com/lobehub/lobe-chat/commit/9c4f4ee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.101.1](https://github.com/lobehub/lobe-chat/compare/v0.101.0...v0.101.1) + +Released on **2023-11-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix market search (fix. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix market search (fix, closes [#437](https://github.com/lobehub/lobe-chat/issues/437) ([178b742](https://github.com/lobehub/lobe-chat/commit/178b742)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.101.0](https://github.com/lobehub/lobe-chat/compare/v0.100.5...v0.101.0) + +Released on **2023-11-14** + +#### ✨ Features + +- **misc**: Support upload images to chat with gpt4-vision model. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support upload images to chat with gpt4-vision model, closes [#440](https://github.com/lobehub/lobe-chat/issues/440) ([858d047](https://github.com/lobehub/lobe-chat/commit/858d047)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.100.5](https://github.com/lobehub/lobe-chat/compare/v0.100.4...v0.100.5) + +Released on **2023-11-11** + +#### ♻ Code Refactoring + +- **misc**: Refactor the input area to suit the files upload feature. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the input area to suit the files upload feature, closes [#442](https://github.com/lobehub/lobe-chat/issues/442) ([57a61fd](https://github.com/lobehub/lobe-chat/commit/57a61fd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.100.4](https://github.com/lobehub/lobe-chat/compare/v0.100.3...v0.100.4) + +Released on **2023-11-11** + +#### 🐛 Bug Fixes + +- **misc**: Hotkey disabled in form tags. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Hotkey disabled in form tags ([165888f](https://github.com/lobehub/lobe-chat/commit/165888f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.100.3](https://github.com/lobehub/lobe-chat/compare/v0.100.2...v0.100.3) + +Released on **2023-11-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix market error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix market error ([3d7550c](https://github.com/lobehub/lobe-chat/commit/3d7550c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.100.2](https://github.com/lobehub/lobe-chat/compare/v0.100.1...v0.100.2) + +Released on **2023-11-09** + +#### 🐛 Bug Fixes + +- **misc**: Upgrade viewport for nextjs 14. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Upgrade viewport for nextjs 14, closes [#436](https://github.com/lobehub/lobe-chat/issues/436) ([57d3d07](https://github.com/lobehub/lobe-chat/commit/57d3d07)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.100.1](https://github.com/lobehub/lobe-chat/compare/v0.100.0...v0.100.1) + +Released on **2023-11-09** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.100.0](https://github.com/lobehub/lobe-chat/compare/v0.99.1...v0.100.0) + +Released on **2023-11-09** + +#### ✨ Features + +- **hotkeys**: Compatible with SSR, display platform specific key. +- **misc**: Platform check utils. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **hotkeys**: Compatible with SSR ([99fa4f8](https://github.com/lobehub/lobe-chat/commit/99fa4f8)) +- **hotkeys**: Display platform specific key ([ee332a4](https://github.com/lobehub/lobe-chat/commit/ee332a4)) +- **misc**: Platform check utils ([08a3cb9](https://github.com/lobehub/lobe-chat/commit/08a3cb9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.99.1](https://github.com/lobehub/lobe-chat/compare/v0.99.0...v0.99.1) + +Released on **2023-11-08** + +#### 💄 Styles + +- **misc**: Add max height to model menu in chat input area. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add max height to model menu in chat input area, closes [#430](https://github.com/lobehub/lobe-chat/issues/430) ([c9a86f3](https://github.com/lobehub/lobe-chat/commit/c9a86f3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.99.0](https://github.com/lobehub/lobe-chat/compare/v0.98.3...v0.99.0) + +Released on **2023-11-08** + +#### ✨ Features + +- **misc**: Add Environment Variable for custom model name when deploying. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add Environment Variable for custom model name when deploying, closes [#429](https://github.com/lobehub/lobe-chat/issues/429) ([15f9fa2](https://github.com/lobehub/lobe-chat/commit/15f9fa2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.98.3](https://github.com/lobehub/lobe-chat/compare/v0.98.2...v0.98.3) + +Released on **2023-11-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix redirect to welcome problem when there are topics in inbox. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix redirect to welcome problem when there are topics in inbox, closes [#422](https://github.com/lobehub/lobe-chat/issues/422) ([3d2588a](https://github.com/lobehub/lobe-chat/commit/3d2588a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.98.2](https://github.com/lobehub/lobe-chat/compare/v0.98.1...v0.98.2) + +Released on **2023-11-07** + +#### ♻ Code Refactoring + +- **misc**: Refactor antd locale file to useSWR. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor antd locale file to useSWR ([2e1cd7c](https://github.com/lobehub/lobe-chat/commit/2e1cd7c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.98.1](https://github.com/lobehub/lobe-chat/compare/v0.98.0...v0.98.1) + +Released on **2023-11-07** + +#### 💄 Styles + +- **misc**: Update welcome assetes. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update welcome assetes ([8840554](https://github.com/lobehub/lobe-chat/commit/8840554)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.98.0](https://github.com/lobehub/lobe-chat/compare/v0.97.1...v0.98.0) + +Released on **2023-11-07** + +#### ✨ Features + +- **misc**: Support latest openai model. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support latest openai model, closes [#417](https://github.com/lobehub/lobe-chat/issues/417) ([46386dc](https://github.com/lobehub/lobe-chat/commit/46386dc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.97.1](https://github.com/lobehub/lobe-chat/compare/v0.97.0...v0.97.1) + +Released on **2023-11-06** + +#### 🐛 Bug Fixes + +- **misc**: Use pnpm to fix docker release. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Use pnpm to fix docker release ([886cc3b](https://github.com/lobehub/lobe-chat/commit/886cc3b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.97.0](https://github.com/lobehub/lobe-chat/compare/v0.96.9...v0.97.0) + +Released on **2023-11-05** + +#### ✨ Features + +- **misc**: Add open new topic when open a topic. + +#### 🐛 Bug Fixes + +- **misc**: Fix toggle back to default topic when clearing topic. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add open new topic when open a topic ([4df6384](https://github.com/lobehub/lobe-chat/commit/4df6384)) + +#### What's fixed + +- **misc**: Fix toggle back to default topic when clearing topic ([6fe0a5c](https://github.com/lobehub/lobe-chat/commit/6fe0a5c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.9](https://github.com/lobehub/lobe-chat/compare/v0.96.8...v0.96.9) + +Released on **2023-11-04** + +#### 💄 Styles + +- **misc**: Update topic list header. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update topic list header ([ce932d7](https://github.com/lobehub/lobe-chat/commit/ce932d7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.8](https://github.com/lobehub/lobe-chat/compare/v0.96.7...v0.96.8) + +Released on **2023-10-31** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug that weather plugin is not work correctly, template remove sharp deps. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug that weather plugin is not work correctly ([dbb65ff](https://github.com/lobehub/lobe-chat/commit/dbb65ff)) +- **misc**: Template remove sharp deps ([380723d](https://github.com/lobehub/lobe-chat/commit/380723d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.7](https://github.com/lobehub/lobe-chat/compare/v0.96.6...v0.96.7) + +Released on **2023-10-31** + +#### 🐛 Bug Fixes + +- **misc**: Fix a bug when click inbox not switch back to chat page. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix a bug when click inbox not switch back to chat page ([31f6d29](https://github.com/lobehub/lobe-chat/commit/31f6d29)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.6](https://github.com/lobehub/lobe-chat/compare/v0.96.5...v0.96.6) + +Released on **2023-10-30** + +#### 🐛 Bug Fixes + +- **misc**: Improve plausible analytics ENV. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Improve plausible analytics ENV ([aa851d4](https://github.com/lobehub/lobe-chat/commit/aa851d4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.5](https://github.com/lobehub/lobe-chat/compare/v0.96.4...v0.96.5) + +Released on **2023-10-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker image optimization error log. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker image optimization error log ([730aec1](https://github.com/lobehub/lobe-chat/commit/730aec1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.4](https://github.com/lobehub/lobe-chat/compare/v0.96.3...v0.96.4) + +Released on **2023-10-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix agents market locale fallback to english. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agents market locale fallback to english, closes [#382](https://github.com/lobehub/lobe-chat/issues/382) ([3814523](https://github.com/lobehub/lobe-chat/commit/3814523)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.3](https://github.com/lobehub/lobe-chat/compare/v0.96.2...v0.96.3) + +Released on **2023-10-28** + +#### 💄 Styles + +- **misc**: Fix SessionList on mobile. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix SessionList on mobile ([e7e7b80](https://github.com/lobehub/lobe-chat/commit/e7e7b80)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.2](https://github.com/lobehub/lobe-chat/compare/v0.96.1...v0.96.2) + +Released on **2023-10-28** + +#### 💄 Styles + +- **misc**: Fix some styles and make updates to various files. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix some styles and make updates to various files ([44a5f0a](https://github.com/lobehub/lobe-chat/commit/44a5f0a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.96.1](https://github.com/lobehub/lobe-chat/compare/v0.96.0...v0.96.1) + +Released on **2023-10-28** + +#### 💄 Styles + +- **misc**: Add guide to market page. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add guide to market page ([8a794f9](https://github.com/lobehub/lobe-chat/commit/8a794f9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.96.0](https://github.com/lobehub/lobe-chat/compare/v0.95.1...v0.96.0) + +Released on **2023-10-27** + +#### ✨ Features + +- **misc**: Improve pin mode about session group. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Improve pin mode about session group, closes [#369](https://github.com/lobehub/lobe-chat/issues/369) ([75c5883](https://github.com/lobehub/lobe-chat/commit/75c5883)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.95.1](https://github.com/lobehub/lobe-chat/compare/v0.95.0...v0.95.1) + +Released on **2023-10-25** + +#### 💄 Styles + +- **misc**: Improve plugin message ui. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve plugin message ui ([6edd25b](https://github.com/lobehub/lobe-chat/commit/6edd25b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.95.0](https://github.com/lobehub/lobe-chat/compare/v0.94.5...v0.95.0) + +Released on **2023-10-24** + +#### ♻ Code Refactoring + +- **misc**: 优化 plugin 文件夹命名以支持 standalone 类型的插件. + +#### ✨ Features + +- **misc**: Support function call at message end, support plugin settings modal, support plugin state and settings. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 优化 plugin 文件夹命名以支持 standalone 类型的插件 ([98860a8](https://github.com/lobehub/lobe-chat/commit/98860a8)) + +#### What's improved + +- **misc**: Support function call at message end, closes [#357](https://github.com/lobehub/lobe-chat/issues/357) ([e195fdb](https://github.com/lobehub/lobe-chat/commit/e195fdb)) +- **misc**: Support plugin settings modal ([f47b6fa](https://github.com/lobehub/lobe-chat/commit/f47b6fa)) +- **misc**: Support plugin state and settings ([10829a4](https://github.com/lobehub/lobe-chat/commit/10829a4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.94.5](https://github.com/lobehub/lobe-chat/compare/v0.94.4...v0.94.5) + +Released on **2023-10-22** + +#### 🐛 Bug Fixes + +- **misc**: Fallback agent market index to en when not find correct locale. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fallback agent market index to en when not find correct locale, closes [#355](https://github.com/lobehub/lobe-chat/issues/355) ([7a45ab4](https://github.com/lobehub/lobe-chat/commit/7a45ab4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.94.4](https://github.com/lobehub/lobe-chat/compare/v0.94.3...v0.94.4) + +Released on **2023-10-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix break cn chars in stream mode. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix break cn chars in stream mode, closes [#347](https://github.com/lobehub/lobe-chat/issues/347) ([f831447](https://github.com/lobehub/lobe-chat/commit/f831447)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.94.3](https://github.com/lobehub/lobe-chat/compare/v0.94.2...v0.94.3) + +Released on **2023-10-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent share format. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent share format ([56ebc0b](https://github.com/lobehub/lobe-chat/commit/56ebc0b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.94.2](https://github.com/lobehub/lobe-chat/compare/v0.94.1...v0.94.2) + +Released on **2023-10-19** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent market with other locales. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent market with other locales ([2414d34](https://github.com/lobehub/lobe-chat/commit/2414d34)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.94.1](https://github.com/lobehub/lobe-chat/compare/v0.94.0...v0.94.1) + +Released on **2023-10-19** + +#### 💄 Styles + +- **misc**: Update ShareAgentButton. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update ShareAgentButton ([c396bd7](https://github.com/lobehub/lobe-chat/commit/c396bd7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.94.0](https://github.com/lobehub/lobe-chat/compare/v0.93.0...v0.94.0) + +Released on **2023-10-18** + +#### ✨ Features + +- **misc**: Add agent share. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add agent share ([953d7c7](https://github.com/lobehub/lobe-chat/commit/953d7c7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.93.0](https://github.com/lobehub/lobe-chat/compare/v0.92.0...v0.93.0) + +Released on **2023-10-18** + +#### ♻ Code Refactoring + +- **misc**: Refactor chain. + +#### ✨ Features + +- **misc**: Support multi-language translate. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor chain ([49c4863](https://github.com/lobehub/lobe-chat/commit/49c4863)) + +#### What's improved + +- **misc**: Support multi-language translate ([548bc5d](https://github.com/lobehub/lobe-chat/commit/548bc5d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.92.0](https://github.com/lobehub/lobe-chat/compare/v0.91.0...v0.92.0) + +Released on **2023-10-18** + +#### ✨ Features + +- **misc**: Support translate message to current language. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support translate message to current language, closes [#340](https://github.com/lobehub/lobe-chat/issues/340) ([cf15f1e](https://github.com/lobehub/lobe-chat/commit/cf15f1e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.91.0](https://github.com/lobehub/lobe-chat/compare/v0.90.3...v0.91.0) + +Released on **2023-10-17** + +#### ✨ Features + +- **misc**: Add hotkeys. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add hotkeys, closes [#286](https://github.com/lobehub/lobe-chat/issues/286) ([041054d](https://github.com/lobehub/lobe-chat/commit/041054d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.90.3](https://github.com/lobehub/lobe-chat/compare/v0.90.2...v0.90.3) + +Released on **2023-10-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix ActionBar props and regenerate btn with error message. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix ActionBar props and regenerate btn with error message, closes [#337](https://github.com/lobehub/lobe-chat/issues/337) ([246e8fd](https://github.com/lobehub/lobe-chat/commit/246e8fd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.90.2](https://github.com/lobehub/lobe-chat/compare/v0.90.1...v0.90.2) + +Released on **2023-10-17** + +#### ♻ Code Refactoring + +- **misc**: Refactor OpenAIStreamPayload with chat name. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor OpenAIStreamPayload with chat name ([a799530](https://github.com/lobehub/lobe-chat/commit/a799530)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.90.1](https://github.com/lobehub/lobe-chat/compare/v0.90.0...v0.90.1) + +Released on **2023-10-17** + +#### 💄 Styles + +- **misc**: Fix lazyload height. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix lazyload height ([98efe02](https://github.com/lobehub/lobe-chat/commit/98efe02)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.90.0](https://github.com/lobehub/lobe-chat/compare/v0.89.10...v0.90.0) + +Released on **2023-10-17** + +#### ✨ Features + +- **misc**: Add Lazyload. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add Lazyload ([27d6cb7](https://github.com/lobehub/lobe-chat/commit/27d6cb7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.10](https://github.com/lobehub/lobe-chat/compare/v0.89.9...v0.89.10) + +Released on **2023-10-17** + +#### ♻ Code Refactoring + +- **misc**: Refactor ChatList onActionsClick. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor ChatList onActionsClick ([d06d87e](https://github.com/lobehub/lobe-chat/commit/d06d87e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.9](https://github.com/lobehub/lobe-chat/compare/v0.89.8...v0.89.9) + +Released on **2023-10-17** + +#### 🐛 Bug Fixes + +- **misc**: Fix ChatList FC Render. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix ChatList FC Render ([4b8bdbd](https://github.com/lobehub/lobe-chat/commit/4b8bdbd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.8](https://github.com/lobehub/lobe-chat/compare/v0.89.7...v0.89.8) + +Released on **2023-10-16** + +#### ♻ Code Refactoring + +- **misc**: Refactor ChatList. + +#### 🐛 Bug Fixes + +- **misc**: Fix type. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor ChatList, closes [#147](https://github.com/lobehub/lobe-chat/issues/147) ([aa4216c](https://github.com/lobehub/lobe-chat/commit/aa4216c)) + +#### What's fixed + +- **misc**: Fix type ([1e931d5](https://github.com/lobehub/lobe-chat/commit/1e931d5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.7](https://github.com/lobehub/lobe-chat/compare/v0.89.6...v0.89.7) + +Released on **2023-10-16** + +#### 🐛 Bug Fixes + +- **misc**: Fix setting tab highlight (fix. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix setting tab highlight (fix, closes [#332](https://github.com/lobehub/lobe-chat/issues/332) ([d288f9d](https://github.com/lobehub/lobe-chat/commit/d288f9d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.6](https://github.com/lobehub/lobe-chat/compare/v0.89.5...v0.89.6) + +Released on **2023-10-15** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.5](https://github.com/lobehub/lobe-chat/compare/v0.89.4...v0.89.5) + +Released on **2023-10-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix fallback to en when the locale is zh, fix reset button not clear plugin settings. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix fallback to en when the locale is zh ([ff2c00e](https://github.com/lobehub/lobe-chat/commit/ff2c00e)) +- **misc**: Fix reset button not clear plugin settings ([aa1e657](https://github.com/lobehub/lobe-chat/commit/aa1e657)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.4](https://github.com/lobehub/lobe-chat/compare/v0.89.3...v0.89.4) + +Released on **2023-10-15** + +#### 🐛 Bug Fixes + +- **misc**: Fix qwen, chatglm request failed. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix qwen, chatglm request failed, closes [#318](https://github.com/lobehub/lobe-chat/issues/318) ([a5699e2](https://github.com/lobehub/lobe-chat/commit/a5699e2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.3](https://github.com/lobehub/lobe-chat/compare/v0.89.2...v0.89.3) + +Released on **2023-10-12** + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin error with nginx reverse proxy. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix plugin error with nginx reverse proxy, closes [#315](https://github.com/lobehub/lobe-chat/issues/315) ([3ba3a3b](https://github.com/lobehub/lobe-chat/commit/3ba3a3b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.2](https://github.com/lobehub/lobe-chat/compare/v0.89.1...v0.89.2) + +Released on **2023-10-12** + +#### 💄 Styles + +- **misc**: Modify onClick event in SessionHeader, change title in Loading component,. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Modify onClick event in SessionHeader, change title in Loading component, ([b984f6a](https://github.com/lobehub/lobe-chat/commit/b984f6a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.89.1](https://github.com/lobehub/lobe-chat/compare/v0.89.0...v0.89.1) + +Released on **2023-10-12** + +#### 🐛 Bug Fixes + +- **misc**: Remove useless dynamic import. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Remove useless dynamic import ([4a9c426](https://github.com/lobehub/lobe-chat/commit/4a9c426)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.89.0](https://github.com/lobehub/lobe-chat/compare/v0.88.0...v0.89.0) + +Released on **2023-10-12** + +#### ✨ Features + +- **agent-card**: Add and modify features for agent card. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **agent-card**: Add and modify features for agent card ([3e3090a](https://github.com/lobehub/lobe-chat/commit/3e3090a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.88.0](https://github.com/lobehub/lobe-chat/compare/v0.87.0...v0.88.0) + +Released on **2023-10-11** + +#### ✨ Features + +- **misc**: Add mobile responsiveness, create new component, modify properties, make API calls, Dynamically import components using "dynamic" function. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add mobile responsiveness, create new component, modify properties, make API calls ([759c920](https://github.com/lobehub/lobe-chat/commit/759c920)) +- **misc**: Dynamically import components using "dynamic" function ([dd9db22](https://github.com/lobehub/lobe-chat/commit/dd9db22)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.87.0](https://github.com/lobehub/lobe-chat/compare/v0.86.5...v0.87.0) + +Released on **2023-10-11** + +#### ✨ Features + +- **misc**: Support custom model name. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support custom model name, closes [#305](https://github.com/lobehub/lobe-chat/issues/305) ([84a066a](https://github.com/lobehub/lobe-chat/commit/84a066a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.86.5](https://github.com/lobehub/lobe-chat/compare/v0.86.4...v0.86.5) + +Released on **2023-10-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix clear session error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix clear session error, closes [#303](https://github.com/lobehub/lobe-chat/issues/303) ([09512fc](https://github.com/lobehub/lobe-chat/commit/09512fc)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.86.4](https://github.com/lobehub/lobe-chat/compare/v0.86.3...v0.86.4) + +Released on **2023-10-11** + +#### 💄 Styles + +- **misc**: Improve api key form. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Improve api key form ([fa3170d](https://github.com/lobehub/lobe-chat/commit/fa3170d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.86.3](https://github.com/lobehub/lobe-chat/compare/v0.86.2...v0.86.3) + +Released on **2023-10-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker image. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker image ([14ff80e](https://github.com/lobehub/lobe-chat/commit/14ff80e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.86.2](https://github.com/lobehub/lobe-chat/compare/v0.86.1...v0.86.2) + +Released on **2023-10-11** + +#### 🐛 Bug Fixes + +- **docker**: Improve config to reduce unnecessary env and change default PORT. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **docker**: Improve config to reduce unnecessary env and change default PORT, closes [#298](https://github.com/lobehub/lobe-chat/issues/298) ([6061318](https://github.com/lobehub/lobe-chat/commit/6061318)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.86.1](https://github.com/lobehub/lobe-chat/compare/v0.86.0...v0.86.1) + +Released on **2023-10-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix docker reverse proxy don't work. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix docker reverse proxy don't work, closes [#294](https://github.com/lobehub/lobe-chat/issues/294) ([a51ba1d](https://github.com/lobehub/lobe-chat/commit/a51ba1d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.86.0](https://github.com/lobehub/lobe-chat/compare/v0.85.3...v0.86.0) + +Released on **2023-10-10** + +#### ✨ Features + +- **misc**: Support docker deploy. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support docker deploy, closes [#283](https://github.com/lobehub/lobe-chat/issues/283) ([5bbc87c](https://github.com/lobehub/lobe-chat/commit/5bbc87c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.85.3](https://github.com/lobehub/lobe-chat/compare/v0.85.2...v0.85.3) + +Released on **2023-10-10** + +#### 💄 Styles + +- **misc**: Add new components, modify display properties, and update settings feature, Replace 100vh with 100% to fix mobile scroll problem. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Add new components, modify display properties, and update settings feature ([87a4a46](https://github.com/lobehub/lobe-chat/commit/87a4a46)) +- **misc**: Replace 100vh with 100% to fix mobile scroll problem ([2ef3c94](https://github.com/lobehub/lobe-chat/commit/2ef3c94)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.85.2](https://github.com/lobehub/lobe-chat/compare/v0.85.1...v0.85.2) + +Released on **2023-10-10** + +#### 🐛 Bug Fixes + +- **misc**: Add apikey form when there is no default api key in env. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add apikey form when there is no default api key in env, closes [#290](https://github.com/lobehub/lobe-chat/issues/290) ([2c907e9](https://github.com/lobehub/lobe-chat/commit/2c907e9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.85.1](https://github.com/lobehub/lobe-chat/compare/v0.85.0...v0.85.1) + +Released on **2023-10-10** + +#### 🐛 Bug Fixes + +- **misc**: Fix mobile safe area (fix. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix mobile safe area (fix, closes [#211](https://github.com/lobehub/lobe-chat/issues/211) ([68775b8](https://github.com/lobehub/lobe-chat/commit/68775b8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.85.0](https://github.com/lobehub/lobe-chat/compare/v0.84.0...v0.85.0) + +Released on **2023-10-10** + +#### ✨ Features + +- **misc**: Add ja_JP, ko_KR and update workflow. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add ja_JP, ko_KR and update workflow ([57512a0](https://github.com/lobehub/lobe-chat/commit/57512a0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.84.0](https://github.com/lobehub/lobe-chat/compare/v0.83.10...v0.84.0) + +Released on **2023-10-10** + +#### ✨ Features + +- **misc**: Support detect new version and upgrade action. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support detect new version and upgrade action, closes [#282](https://github.com/lobehub/lobe-chat/issues/282) ([5da19b2](https://github.com/lobehub/lobe-chat/commit/5da19b2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.10](https://github.com/lobehub/lobe-chat/compare/v0.83.9...v0.83.10) + +Released on **2023-10-09** + +#### ♻ Code Refactoring + +- **layout**: Refactor layout, Refactor settings layout, Refactor ssc layout. +- **share**: Use modern-screenshot. + +#### 🐛 Bug Fixes + +- **misc**: Fix rsc layout. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **layout**: Refactor layout ([ace21f4](https://github.com/lobehub/lobe-chat/commit/ace21f4)) +- **layout**: Refactor settings layout ([bd48121](https://github.com/lobehub/lobe-chat/commit/bd48121)) +- **layout**: Refactor ssc layout ([26e1c41](https://github.com/lobehub/lobe-chat/commit/26e1c41)) +- **share**: Use modern-screenshot, closes [#256](https://github.com/lobehub/lobe-chat/issues/256) ([b3d7108](https://github.com/lobehub/lobe-chat/commit/b3d7108)) + +#### What's fixed + +- **misc**: Fix rsc layout ([d73f13f](https://github.com/lobehub/lobe-chat/commit/d73f13f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.9](https://github.com/lobehub/lobe-chat/compare/v0.83.8...v0.83.9) + +Released on **2023-10-08** + +#### ♻ Code Refactoring + +- **agent-market**: Refactor desktop and mobile to improve mobile performance. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **agent-market**: Refactor desktop and mobile to improve mobile performance, closes [#278](https://github.com/lobehub/lobe-chat/issues/278) ([82b7f60](https://github.com/lobehub/lobe-chat/commit/82b7f60)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.8](https://github.com/lobehub/lobe-chat/compare/v0.83.7...v0.83.8) + +Released on **2023-10-07** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.7](https://github.com/lobehub/lobe-chat/compare/v0.83.6...v0.83.7) + +Released on **2023-10-07** + +#### 🐛 Bug Fixes + +- **misc**: Fix shuffle, use search url with agent item. + +#### 💄 Styles + +- **misc**: Better tag style, improve loading state. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix shuffle ([d4b9dc3](https://github.com/lobehub/lobe-chat/commit/d4b9dc3)) +- **misc**: Use search url with agent item ([98df623](https://github.com/lobehub/lobe-chat/commit/98df623)) + +#### Styles + +- **misc**: Better tag style ([38e42ea](https://github.com/lobehub/lobe-chat/commit/38e42ea)) +- **misc**: Improve loading state ([f00c868](https://github.com/lobehub/lobe-chat/commit/f00c868)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.6](https://github.com/lobehub/lobe-chat/compare/v0.83.5...v0.83.6) + +Released on **2023-10-06** + +#### 💄 Styles + +- **misc**: Update modal style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update modal style ([2ab1475](https://github.com/lobehub/lobe-chat/commit/2ab1475)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.5](https://github.com/lobehub/lobe-chat/compare/v0.83.4...v0.83.5) + +Released on **2023-10-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent market list. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent market list, closes [#273](https://github.com/lobehub/lobe-chat/issues/273) ([c020277](https://github.com/lobehub/lobe-chat/commit/c020277)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.4](https://github.com/lobehub/lobe-chat/compare/v0.83.3...v0.83.4) + +Released on **2023-10-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix agent settings. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix agent settings, closes [#271](https://github.com/lobehub/lobe-chat/issues/271) ([aac9a70](https://github.com/lobehub/lobe-chat/commit/aac9a70)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.3](https://github.com/lobehub/lobe-chat/compare/v0.83.2...v0.83.3) + +Released on **2023-10-06** + +#### ♻ Code Refactoring + +- **misc**: Refactor the settings layout to rsc. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the settings layout to rsc ([b840f44](https://github.com/lobehub/lobe-chat/commit/b840f44)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.2](https://github.com/lobehub/lobe-chat/compare/v0.83.1...v0.83.2) + +Released on **2023-10-06** + +#### 🐛 Bug Fixes + +- **misc**: Fix setCookie method that set cookie with sub-path. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix setCookie method that set cookie with sub-path, closes [#269](https://github.com/lobehub/lobe-chat/issues/269) ([1b859b7](https://github.com/lobehub/lobe-chat/commit/1b859b7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.83.1](https://github.com/lobehub/lobe-chat/compare/v0.83.0...v0.83.1) + +Released on **2023-10-06** + +#### ♻ Code Refactoring + +- **misc**: Refactor settings page entry. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor settings page entry ([e86aff2](https://github.com/lobehub/lobe-chat/commit/e86aff2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.83.0](https://github.com/lobehub/lobe-chat/compare/v0.82.9...v0.83.0) + +Released on **2023-10-06** + +#### ✨ Features + +- **misc**: Upgrade locale with SSR. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Upgrade locale with SSR, closes [#268](https://github.com/lobehub/lobe-chat/issues/268) ([2fdea52](https://github.com/lobehub/lobe-chat/commit/2fdea52)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.9](https://github.com/lobehub/lobe-chat/compare/v0.82.8...v0.82.9) + +Released on **2023-10-05** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.8](https://github.com/lobehub/lobe-chat/compare/v0.82.7...v0.82.8) + +Released on **2023-09-30** + +#### ♻ Code Refactoring + +- **misc**: Refactor / route to reduce page js size. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor / route to reduce page js size ([79f0347](https://github.com/lobehub/lobe-chat/commit/79f0347)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.7](https://github.com/lobehub/lobe-chat/compare/v0.82.6...v0.82.7) + +Released on **2023-09-30** + +#### ♻ Code Refactoring + +- **misc**: Refactor the api router to app route handlers. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the api router to app route handlers, closes [#254](https://github.com/lobehub/lobe-chat/issues/254) ([f032112](https://github.com/lobehub/lobe-chat/commit/f032112)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.6](https://github.com/lobehub/lobe-chat/compare/v0.82.5...v0.82.6) + +Released on **2023-09-29** + +#### 🐛 Bug Fixes + +- **misc**: Fix share default config, pin openai to fix type error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix share default config ([e00d6bf](https://github.com/lobehub/lobe-chat/commit/e00d6bf)) +- **misc**: Pin openai to fix type error ([5af4050](https://github.com/lobehub/lobe-chat/commit/5af4050)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.5](https://github.com/lobehub/lobe-chat/compare/v0.82.4...v0.82.5) + +Released on **2023-09-29** + +#### 💄 Styles + +- **misc**: Update theme color and styling of mobile settings page. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update theme color and styling of mobile settings page ([1acfb71](https://github.com/lobehub/lobe-chat/commit/1acfb71)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.4](https://github.com/lobehub/lobe-chat/compare/v0.82.3...v0.82.4) + +Released on **2023-09-29** + +#### 🐛 Bug Fixes + +- **misc**: 修正 localStorage 不存在造成设置页刷新 500 保存的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 localStorage 不存在造成设置页刷新 500 保存的问题 ([b894cc8](https://github.com/lobehub/lobe-chat/commit/b894cc8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.3](https://github.com/lobehub/lobe-chat/compare/v0.82.2...v0.82.3) + +Released on **2023-09-29** + +#### 🐛 Bug Fixes + +- **misc**: 修正 access code 校验逻辑,修正 api key 无法正常显示在秘钥输入框,并增加显示关闭按钮,修正移动端输入 access code 默认打开数据键盘的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 access code 校验逻辑,closes [#184](https://github.com/lobehub/lobe-chat/issues/184) ([a7301c3](https://github.com/lobehub/lobe-chat/commit/a7301c3)) +- **misc**: 修正 api key 无法正常显示在秘钥输入框,并增加显示关闭按钮,closes [#182](https://github.com/lobehub/lobe-chat/issues/182) ([def1153](https://github.com/lobehub/lobe-chat/commit/def1153)) +- **misc**: 修正移动端输入 access code 默认打开数据键盘的问题 ([7994982](https://github.com/lobehub/lobe-chat/commit/7994982)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.2](https://github.com/lobehub/lobe-chat/compare/v0.82.1...v0.82.2) + +Released on **2023-09-28** + +#### ♻ Code Refactoring + +- **misc**: Refactor settings page and mobile ux. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor settings page and mobile ux ([89c5648](https://github.com/lobehub/lobe-chat/commit/89c5648)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.82.1](https://github.com/lobehub/lobe-chat/compare/v0.82.0...v0.82.1) + +Released on **2023-09-27** + +#### 🐛 Bug Fixes + +- **misc**: Fix share screenshot scrollbar. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix share screenshot scrollbar ([244b3b4](https://github.com/lobehub/lobe-chat/commit/244b3b4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.82.0](https://github.com/lobehub/lobe-chat/compare/v0.81.0...v0.82.0) + +Released on **2023-09-27** + +#### ✨ Features + +- **share**: Add screenshot. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **share**: Add screenshot, closes [#152](https://github.com/lobehub/lobe-chat/issues/152) ([f5d21f4](https://github.com/lobehub/lobe-chat/commit/f5d21f4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.81.0](https://github.com/lobehub/lobe-chat/compare/v0.80.2...v0.81.0) + +Released on **2023-09-27** + +#### ✨ Features + +- **misc**: Add several analytics sdk. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add several analytics sdk, closes [#244](https://github.com/lobehub/lobe-chat/issues/244) ([65c6c93](https://github.com/lobehub/lobe-chat/commit/65c6c93)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.80.2](https://github.com/lobehub/lobe-chat/compare/v0.80.1...v0.80.2) + +Released on **2023-09-27** + +#### 💄 Styles + +- **misc**: Switch Modal components to @lobehub/ui. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Switch Modal components to @lobehub/ui ([d056015](https://github.com/lobehub/lobe-chat/commit/d056015)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.80.1](https://github.com/lobehub/lobe-chat/compare/v0.80.0...v0.80.1) + +Released on **2023-09-27** + +#### 💄 Styles + +- **misc**: Fix conversation mobile view area. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix conversation mobile view area ([6668e11](https://github.com/lobehub/lobe-chat/commit/6668e11)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.80.0](https://github.com/lobehub/lobe-chat/compare/v0.79.8...v0.80.0) + +Released on **2023-09-27** + +#### ✨ Features + +- **misc**: Improve user experience and ensure consistency. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Improve user experience and ensure consistency ([abba584](https://github.com/lobehub/lobe-chat/commit/abba584)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.8](https://github.com/lobehub/lobe-chat/compare/v0.79.7...v0.79.8) + +Released on **2023-09-27** + +#### 💄 Styles + +- **misc**: Fix safearea in mobile. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix safearea in mobile ([2adfb04](https://github.com/lobehub/lobe-chat/commit/2adfb04)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.7](https://github.com/lobehub/lobe-chat/compare/v0.79.6...v0.79.7) + +Released on **2023-09-27** + +#### ♻ Code Refactoring + +- **misc**: Use hook to check PWA env. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Use hook to check PWA env ([b4234db](https://github.com/lobehub/lobe-chat/commit/b4234db)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.6](https://github.com/lobehub/lobe-chat/compare/v0.79.5...v0.79.6) + +Released on **2023-09-27** + +#### 💄 Styles + +- **misc**: Optimize PWA style and scroll effect. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Optimize PWA style and scroll effect ([0ae05b8](https://github.com/lobehub/lobe-chat/commit/0ae05b8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.5](https://github.com/lobehub/lobe-chat/compare/v0.79.4...v0.79.5) + +Released on **2023-09-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix URI error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix URI error ([282a0c8](https://github.com/lobehub/lobe-chat/commit/282a0c8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.4](https://github.com/lobehub/lobe-chat/compare/v0.79.3...v0.79.4) + +Released on **2023-09-26** + +#### ♻ Code Refactoring + +- **misc**: Move dir from page to app and remove .page suffix. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Move dir from page to app and remove .page suffix, closes [#236](https://github.com/lobehub/lobe-chat/issues/236) ([2907303](https://github.com/lobehub/lobe-chat/commit/2907303)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.3](https://github.com/lobehub/lobe-chat/compare/v0.79.2...v0.79.3) + +Released on **2023-09-25** + +#### 💄 Styles + +- **meta**: Update meta image. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **meta**: Update meta image, closes [#66](https://github.com/lobehub/lobe-chat/issues/66) ([a71ffff](https://github.com/lobehub/lobe-chat/commit/a71ffff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.2](https://github.com/lobehub/lobe-chat/compare/v0.79.1...v0.79.2) + +Released on **2023-09-25** + +#### 💄 Styles + +- **meta**: Fix and add metadata. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **meta**: Fix and add metadata ([c872522](https://github.com/lobehub/lobe-chat/commit/c872522)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.79.1](https://github.com/lobehub/lobe-chat/compare/v0.79.0...v0.79.1) + +Released on **2023-09-25** + +#### ♻ Code Refactoring + +- **migration**: Next.js app router. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **migration**: Next.js app router, closes [#220](https://github.com/lobehub/lobe-chat/issues/220) ([bb8085e](https://github.com/lobehub/lobe-chat/commit/bb8085e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.79.0](https://github.com/lobehub/lobe-chat/compare/v0.78.1...v0.79.0) + +Released on **2023-09-25** + +#### ✨ Features + +- **conversation**: Add history range divider. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **conversation**: Add history range divider, closes [#118](https://github.com/lobehub/lobe-chat/issues/118) ([92d2c96](https://github.com/lobehub/lobe-chat/commit/92d2c96)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.78.1](https://github.com/lobehub/lobe-chat/compare/v0.78.0...v0.78.1) + +Released on **2023-09-21** + +#### 💄 Styles + +- **misc**: Show topic tooltip on left side. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Show topic tooltip on left side ([f686fd2](https://github.com/lobehub/lobe-chat/commit/f686fd2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.78.0](https://github.com/lobehub/lobe-chat/compare/v0.77.2...v0.78.0) + +Released on **2023-09-17** + +#### ✨ Features + +- **misc**: Auto create topic when chatting. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Auto create topic when chatting, closes [#203](https://github.com/lobehub/lobe-chat/issues/203) ([f952792](https://github.com/lobehub/lobe-chat/commit/f952792)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.77.2](https://github.com/lobehub/lobe-chat/compare/v0.77.1...v0.77.2) + +Released on **2023-09-15** + +#### 🐛 Bug Fixes + +- **settings**: Fix settings route. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **settings**: Fix settings route, closes [#195](https://github.com/lobehub/lobe-chat/issues/195) ([1b7d84e](https://github.com/lobehub/lobe-chat/commit/1b7d84e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.77.1](https://github.com/lobehub/lobe-chat/compare/v0.77.0...v0.77.1) + +Released on **2023-09-14** + +#### 🐛 Bug Fixes + +- **misc**: Fix lint. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix lint ([9f4f9d7](https://github.com/lobehub/lobe-chat/commit/9f4f9d7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.77.0](https://github.com/lobehub/lobe-chat/compare/v0.76.2...v0.77.0) + +Released on **2023-09-14** + +#### ✨ Features + +- **misc**: Update localization files and add translations for different languages. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Update localization files and add translations for different languages ([0157f92](https://github.com/lobehub/lobe-chat/commit/0157f92)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.76.2](https://github.com/lobehub/lobe-chat/compare/v0.76.1...v0.76.2) + +Released on **2023-09-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix client config. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix client config ([d62f1b3](https://github.com/lobehub/lobe-chat/commit/d62f1b3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.76.1](https://github.com/lobehub/lobe-chat/compare/v0.76.0...v0.76.1) + +Released on **2023-09-11** + +#### 🐛 Bug Fixes + +- **misc**: Fix save topic button. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix save topic button ([871905f](https://github.com/lobehub/lobe-chat/commit/871905f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.76.0](https://github.com/lobehub/lobe-chat/compare/v0.75.0...v0.76.0) + +Released on **2023-09-11** + +#### ✨ Features + +- **misc**: Support Azure OpenAI Deploy env. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support Azure OpenAI Deploy env, closes [#183](https://github.com/lobehub/lobe-chat/issues/183) ([bda6732](https://github.com/lobehub/lobe-chat/commit/bda6732)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.75.0](https://github.com/lobehub/lobe-chat/compare/v0.74.0...v0.75.0) + +Released on **2023-09-11** + +#### ♻ Code Refactoring + +- **misc**: Fefactor index url fetch. + +#### ✨ Features + +- **market**: Add prompt token count. +- **misc**: Add agents market and improve UI components, Add and refactor components for chat input feature, Add functions for generating and analyzing JSON files, generating resource files and table of contents, and formatting console output, Add new settings for Azure OpenAI and OpenAI in locales files, Add new string, create AgentModal component, implement GridCardItem and Loading components, import AgentModal, Add SideBar component, new actions, and update market store state and selectors, Add translations and new setting to "setting.json", Improve functionality and user interface of market page, Modify market features components and update CSS styles, support add agent to chat. + +#### 🐛 Bug Fixes + +- **misc**: Fix fetcher, Fix market sidebar scroll and add i18n. + +#### 💄 Styles + +- **misc**: Update loading style and compatible with unknown agent identifier. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Fefactor index url fetch ([257584b](https://github.com/lobehub/lobe-chat/commit/257584b)) + +#### What's improved + +- **market**: Add prompt token count ([16221a7](https://github.com/lobehub/lobe-chat/commit/16221a7)) +- **misc**: Add agents market and improve UI components ([116c136](https://github.com/lobehub/lobe-chat/commit/116c136)) +- **misc**: Add and refactor components for chat input feature ([f1ac9fe](https://github.com/lobehub/lobe-chat/commit/f1ac9fe)) +- **misc**: Add functions for generating and analyzing JSON files, generating resource files and table of contents, and formatting console output ([d7c2e74](https://github.com/lobehub/lobe-chat/commit/d7c2e74)) +- **misc**: Add new settings for Azure OpenAI and OpenAI in locales files ([e9e25b5](https://github.com/lobehub/lobe-chat/commit/e9e25b5)) +- **misc**: Add new string, create AgentModal component, implement GridCardItem and Loading components, import AgentModal ([2a0e59f](https://github.com/lobehub/lobe-chat/commit/2a0e59f)) +- **misc**: Add SideBar component, new actions, and update market store state and selectors ([8f6cfda](https://github.com/lobehub/lobe-chat/commit/8f6cfda)) +- **misc**: Add translations and new setting to "setting.json" ([aca3822](https://github.com/lobehub/lobe-chat/commit/aca3822)) +- **misc**: Improve functionality and user interface of market page ([1d465d6](https://github.com/lobehub/lobe-chat/commit/1d465d6)) +- **misc**: Modify market features components and update CSS styles ([97e4179](https://github.com/lobehub/lobe-chat/commit/97e4179)) +- **misc**: Support add agent to chat ([3b930c4](https://github.com/lobehub/lobe-chat/commit/3b930c4)) + +#### What's fixed + +- **misc**: Fix fetcher ([171b2da](https://github.com/lobehub/lobe-chat/commit/171b2da)) +- **misc**: Fix market sidebar scroll and add i18n ([9c897d2](https://github.com/lobehub/lobe-chat/commit/9c897d2)) + +#### Styles + +- **misc**: Update loading style and compatible with unknown agent identifier ([2e2231d](https://github.com/lobehub/lobe-chat/commit/2e2231d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.74.0](https://github.com/lobehub/lobe-chat/compare/v0.73.0...v0.74.0) + +Released on **2023-09-11** + +#### ✨ Features + +- **misc**: Add russian locally, Update Russian and English locally (LLM tab). + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add russian locally ([7b67c9f](https://github.com/lobehub/lobe-chat/commit/7b67c9f)) +- **misc**: Update Russian and English locally (LLM tab) ([3b23e70](https://github.com/lobehub/lobe-chat/commit/3b23e70)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.73.0](https://github.com/lobehub/lobe-chat/compare/v0.72.4...v0.73.0) + +Released on **2023-09-10** + +#### ✨ Features + +- **misc**: Support Azure OpenAI. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Support Azure OpenAI, closes [#177](https://github.com/lobehub/lobe-chat/issues/177) ([f0c9532](https://github.com/lobehub/lobe-chat/commit/f0c9532)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.72.4](https://github.com/lobehub/lobe-chat/compare/v0.72.3...v0.72.4) + +Released on **2023-09-10** + +#### 🐛 Bug Fixes + +- **misc**: Use en-US when no suit lang with plugin index. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Use en-US when no suit lang with plugin index ([4e9668d](https://github.com/lobehub/lobe-chat/commit/4e9668d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.72.3](https://github.com/lobehub/lobe-chat/compare/v0.72.2...v0.72.3) + +Released on **2023-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix sessionList double click on mobile. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix sessionList double click on mobile, closes [#169](https://github.com/lobehub/lobe-chat/issues/169) ([3ea2bce](https://github.com/lobehub/lobe-chat/commit/3ea2bce)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.72.2](https://github.com/lobehub/lobe-chat/compare/v0.72.1...v0.72.2) + +Released on **2023-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix mobile switch when session selected. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix mobile switch when session selected, closes [#167](https://github.com/lobehub/lobe-chat/issues/167) ([40d8a11](https://github.com/lobehub/lobe-chat/commit/40d8a11)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.72.1](https://github.com/lobehub/lobe-chat/compare/v0.72.0...v0.72.1) + +Released on **2023-09-09** + +#### 🐛 Bug Fixes + +- **misc**: 修正异步水合造成的初始状态不稳定的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正异步水合造成的初始状态不稳定的问题 ([2208f8a](https://github.com/lobehub/lobe-chat/commit/2208f8a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.72.0](https://github.com/lobehub/lobe-chat/compare/v0.71.1...v0.72.0) + +Released on **2023-09-09** + +#### ✨ Features + +- **misc**: Add plugin market Setting Modal, 支持快速刷新与预览 manifest, 适配插件 i18n 方案. + +#### 🐛 Bug Fixes + +- **misc**: 修正删除插件时错误开启的问题. + +#### 💄 Styles + +- **misc**: 优化 manifest 预览的尺寸. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add plugin market Setting Modal ([a0603a9](https://github.com/lobehub/lobe-chat/commit/a0603a9)) +- **misc**: 支持快速刷新与预览 manifest, closes [#150](https://github.com/lobehub/lobe-chat/issues/150) ([5bd2eb0](https://github.com/lobehub/lobe-chat/commit/5bd2eb0)) +- **misc**: 适配插件 i18n 方案 ([8709ab3](https://github.com/lobehub/lobe-chat/commit/8709ab3)) + +#### What's fixed + +- **misc**: 修正删除插件时错误开启的问题 ([0e35c18](https://github.com/lobehub/lobe-chat/commit/0e35c18)) + +#### Styles + +- **misc**: 优化 manifest 预览的尺寸 ([27f8d6d](https://github.com/lobehub/lobe-chat/commit/27f8d6d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.71.1](https://github.com/lobehub/lobe-chat/compare/v0.71.0...v0.71.1) + +Released on **2023-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix mobile route. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix mobile route, closes [#165](https://github.com/lobehub/lobe-chat/issues/165) ([d5e03b6](https://github.com/lobehub/lobe-chat/commit/d5e03b6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.71.0](https://github.com/lobehub/lobe-chat/compare/v0.70.4...v0.71.0) + +Released on **2023-09-09** + +#### ✨ Features + +- **misc**: Migrate localStorage to indexedDB. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Migrate localStorage to indexedDB, closes [#160](https://github.com/lobehub/lobe-chat/issues/160) ([7f96deb](https://github.com/lobehub/lobe-chat/commit/7f96deb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.70.4](https://github.com/lobehub/lobe-chat/compare/v0.70.3...v0.70.4) + +Released on **2023-09-09** + +#### 🐛 Bug Fixes + +- **misc**: Fix route. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix route ([2d1e8d6](https://github.com/lobehub/lobe-chat/commit/2d1e8d6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.70.3](https://github.com/lobehub/lobe-chat/compare/v0.70.2...v0.70.3) + +Released on **2023-09-09** + +#### 💄 Styles + +- **misc**: Better mobile style. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Better mobile style ([776c407](https://github.com/lobehub/lobe-chat/commit/776c407)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.70.2](https://github.com/lobehub/lobe-chat/compare/v0.70.1...v0.70.2) + +Released on **2023-09-08** + +#### 🐛 Bug Fixes + +- **misc**: 修正移动端路由问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正移动端路由问题 ([ae3d2f4](https://github.com/lobehub/lobe-chat/commit/ae3d2f4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.70.1](https://github.com/lobehub/lobe-chat/compare/v0.70.0...v0.70.1) + +Released on **2023-09-08** + +#### ♻ Code Refactoring + +- **misc**: Refactor settingsSelectors to globalSelectors. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor settingsSelectors to globalSelectors ([38917e8](https://github.com/lobehub/lobe-chat/commit/38917e8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.70.0](https://github.com/lobehub/lobe-chat/compare/v0.69.1...v0.70.0) + +Released on **2023-09-08** + +#### ✨ Features + +- **misc**: Refactor to url state. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Refactor to url state, closes [#157](https://github.com/lobehub/lobe-chat/issues/157) ([2efac2b](https://github.com/lobehub/lobe-chat/commit/2efac2b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.69.1](https://github.com/lobehub/lobe-chat/compare/v0.69.0...v0.69.1) + +Released on **2023-09-06** + +#### ♻ Code Refactoring + +- **misc**: Migrate openai-edge to openai. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Migrate openai-edge to openai, closes [#145](https://github.com/lobehub/lobe-chat/issues/145) ([75ee574](https://github.com/lobehub/lobe-chat/commit/75ee574)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.69.0](https://github.com/lobehub/lobe-chat/compare/v0.68.1...v0.69.0) + +Released on **2023-09-06** + +#### ✨ Features + +- **misc**: Add new import statement for "Flexbox" component in "Empty" component. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add new import statement for "Flexbox" component in "Empty" component ([68db626](https://github.com/lobehub/lobe-chat/commit/68db626)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.68.1](https://github.com/lobehub/lobe-chat/compare/v0.68.0...v0.68.1) + +Released on **2023-09-03** + +#### 🐛 Bug Fixes + +- **misc**: 修正数组合并逻辑,修正被移除插件无法看到的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正数组合并逻辑 ([e36e621](https://github.com/lobehub/lobe-chat/commit/e36e621)) +- **misc**: 修正被移除插件无法看到的问题 ([c17eb56](https://github.com/lobehub/lobe-chat/commit/c17eb56)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.68.0](https://github.com/lobehub/lobe-chat/compare/v0.67.0...v0.68.0) + +Released on **2023-09-03** + +#### ✨ Features + +- **misc**: Plugin default use iframe render. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Plugin default use iframe render, closes [#141](https://github.com/lobehub/lobe-chat/issues/141) ([35a3a16](https://github.com/lobehub/lobe-chat/commit/35a3a16)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.67.0](https://github.com/lobehub/lobe-chat/compare/v0.66.0...v0.67.0) + +Released on **2023-09-02** + +#### ♻ Code Refactoring + +- **plugin**: 重构 plugin Store 组织结构,便于开发与迭代维护. + +#### ✨ Features + +- **plugin-dev**: 优化 manifest 报错原因提示,并支持 id 从 manifest 自动获取. + +#### 🐛 Bug Fixes + +- **plugin-dev**: 修正编辑模式下预览展示问题和 id 重复校验问题. +- **plugin**: 修正开启插件后会话无效的问题. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **plugin**: 重构 plugin Store 组织结构,便于开发与迭代维护 ([ec527cb](https://github.com/lobehub/lobe-chat/commit/ec527cb)) + +#### What's improved + +- **plugin-dev**: 优化 manifest 报错原因提示,并支持 id 从 manifest 自动获取 ([7f0787d](https://github.com/lobehub/lobe-chat/commit/7f0787d)) + +#### What's fixed + +- **plugin-dev**: 修正编辑模式下预览展示问题和 id 重复校验问题 ([17c39ef](https://github.com/lobehub/lobe-chat/commit/17c39ef)) +- **plugin**: 修正开启插件后会话无效的问题 ([82e3beb](https://github.com/lobehub/lobe-chat/commit/82e3beb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.66.0](https://github.com/lobehub/lobe-chat/compare/v0.65.1...v0.66.0) + +Released on **2023-09-02** + +#### ✨ Features + +- **misc**: Add russian locally. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add russian locally, closes [#137](https://github.com/lobehub/lobe-chat/issues/137) ([785d50f](https://github.com/lobehub/lobe-chat/commit/785d50f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.65.1](https://github.com/lobehub/lobe-chat/compare/v0.65.0...v0.65.1) + +Released on **2023-09-01** + +#### 🐛 Bug Fixes + +- **misc**: 修正 defaultAgent 无法正常变更的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 defaultAgent 无法正常变更的问题 ([788d94b](https://github.com/lobehub/lobe-chat/commit/788d94b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.65.0](https://github.com/lobehub/lobe-chat/compare/v0.64.1...v0.65.0) + +Released on **2023-08-29** + +#### ✨ Features + +- **misc**: 支持本地插件自定义 gateway. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持本地插件自定义 gateway, closes [#129](https://github.com/lobehub/lobe-chat/issues/129) ([770048a](https://github.com/lobehub/lobe-chat/commit/770048a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.64.1](https://github.com/lobehub/lobe-chat/compare/v0.64.0...v0.64.1) + +Released on **2023-08-29** + +#### 💄 Styles + +- **misc**: Update i18n. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update i18n, closes [#128](https://github.com/lobehub/lobe-chat/issues/128) ([3bf1509](https://github.com/lobehub/lobe-chat/commit/3bf1509)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.64.0](https://github.com/lobehub/lobe-chat/compare/v0.63.3...v0.64.0) + +Released on **2023-08-29** + +#### ♻ Code Refactoring + +- **misc**: Remove no need i18n. + +#### ✨ Features + +- **misc**: 增加自定义插件的增删改配置功能,完善自定义插件表单的校验逻辑,支持本地插件侧的请求与错误呈现,新增插件配置 Dev 弹窗,绑定本地插件的增删改逻辑. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Remove no need i18n ([808a86a](https://github.com/lobehub/lobe-chat/commit/808a86a)) + +#### What's improved + +- **misc**: 增加自定义插件的增删改配置功能 ([faba081](https://github.com/lobehub/lobe-chat/commit/faba081)) +- **misc**: 完善自定义插件表单的校验逻辑 ([4e1fd28](https://github.com/lobehub/lobe-chat/commit/4e1fd28)) +- **misc**: 支持本地插件侧的请求与错误呈现 ([7e2b39a](https://github.com/lobehub/lobe-chat/commit/7e2b39a)) +- **misc**: 新增插件配置 Dev 弹窗 ([20269b7](https://github.com/lobehub/lobe-chat/commit/20269b7)) +- **misc**: 绑定本地插件的增删改逻辑 ([902e7ed](https://github.com/lobehub/lobe-chat/commit/902e7ed)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.63.3](https://github.com/lobehub/lobe-chat/compare/v0.63.2...v0.63.3) + +Released on **2023-08-28** + +#### ♻ Code Refactoring + +- **misc**: Refactor with new market url. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor with new market url, closes [#123](https://github.com/lobehub/lobe-chat/issues/123) ([34a88f8](https://github.com/lobehub/lobe-chat/commit/34a88f8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.63.2](https://github.com/lobehub/lobe-chat/compare/v0.63.1...v0.63.2) + +Released on **2023-08-27** + +#### ♻ Code Refactoring + +- **misc**: Refactor AgentSettings. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor AgentSettings, closes [#121](https://github.com/lobehub/lobe-chat/issues/121) ([1f29199](https://github.com/lobehub/lobe-chat/commit/1f29199)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.63.1](https://github.com/lobehub/lobe-chat/compare/v0.63.0...v0.63.1) + +Released on **2023-08-27** + +#### ♻ Code Refactoring + +- **misc**: Refactor the selectors import. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor the selectors import, closes [#120](https://github.com/lobehub/lobe-chat/issues/120) ([6646502](https://github.com/lobehub/lobe-chat/commit/6646502)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.63.0](https://github.com/lobehub/lobe-chat/compare/v0.62.1...v0.63.0) + +Released on **2023-08-27** + +#### ✨ Features + +- **misc**: support sharing to shareGPT. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: support sharing to shareGPT, closes [#119](https://github.com/lobehub/lobe-chat/issues/119) ([026e9ec](https://github.com/lobehub/lobe-chat/commit/026e9ec)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.62.1](https://github.com/lobehub/lobe-chat/compare/v0.62.0...v0.62.1) + +Released on **2023-08-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin settings error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix plugin settings error, closes [#117](https://github.com/lobehub/lobe-chat/issues/117) ([064d90e](https://github.com/lobehub/lobe-chat/commit/064d90e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.62.0](https://github.com/lobehub/lobe-chat/compare/v0.61.0...v0.62.0) + +Released on **2023-08-26** + +#### ✨ Features + +- **misc**: 支持超过 4k 的会话使用 16k 总结标题. + +#### 🐛 Bug Fixes + +- **misc**: Fix plugin settings error. + +#### 💄 Styles + +- **misc**: 优化清理会话的操作路径,优化默认角色的配置. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持超过 4k 的会话使用 16k 总结标题 ([5764cfb](https://github.com/lobehub/lobe-chat/commit/5764cfb)) + +#### What's fixed + +- **misc**: Fix plugin settings error ([008c2e3](https://github.com/lobehub/lobe-chat/commit/008c2e3)) + +#### Styles + +- **misc**: 优化清理会话的操作路径 ([6b7218e](https://github.com/lobehub/lobe-chat/commit/6b7218e)) +- **misc**: 优化默认角色的配置 ([a07d7a8](https://github.com/lobehub/lobe-chat/commit/a07d7a8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.61.0](https://github.com/lobehub/lobe-chat/compare/v0.60.4...v0.61.0) + +Released on **2023-08-26** + +#### ✨ Features + +- **misc**: 新增自动滚动. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 新增自动滚动,closes [#113](https://github.com/lobehub/lobe-chat/issues/113) ([03fd161](https://github.com/lobehub/lobe-chat/commit/03fd161)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.60.4](https://github.com/lobehub/lobe-chat/compare/v0.60.3...v0.60.4) + +Released on **2023-08-26** + +#### 💄 Styles + +- **misc**: 优化文案. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化文案 ([9a1e004](https://github.com/lobehub/lobe-chat/commit/9a1e004)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.60.3](https://github.com/lobehub/lobe-chat/compare/v0.60.2...v0.60.3) + +Released on **2023-08-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix global state merge error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix global state merge error ([cbc2fc8](https://github.com/lobehub/lobe-chat/commit/cbc2fc8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.60.2](https://github.com/lobehub/lobe-chat/compare/v0.60.1...v0.60.2) + +Released on **2023-08-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix fetch plugin header error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix fetch plugin header error ([fa4a0e1](https://github.com/lobehub/lobe-chat/commit/fa4a0e1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.60.1](https://github.com/lobehub/lobe-chat/compare/v0.60.0...v0.60.1) + +Released on **2023-08-26** + +#### 🐛 Bug Fixes + +- **misc**: Fix settings storage error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix settings storage error ([57d7eb1](https://github.com/lobehub/lobe-chat/commit/57d7eb1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.60.0](https://github.com/lobehub/lobe-chat/compare/v0.59.0...v0.60.0) + +Released on **2023-08-26** + +#### ♻ Code Refactoring + +- **misc**: Refactor with new market index url. + +#### ✨ Features + +- **misc**: 支持插件 manifest 加载失败后重试. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor with new market index url ([d2834b7](https://github.com/lobehub/lobe-chat/commit/d2834b7)) + +#### What's improved + +- **misc**: 支持插件 manifest 加载失败后重试 ([f36378e](https://github.com/lobehub/lobe-chat/commit/f36378e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.59.0](https://github.com/lobehub/lobe-chat/compare/v0.58.0...v0.59.0) + +Released on **2023-08-26** + +#### ✨ Features + +- **misc**: 支持展示插件插件状态,支持插件 i18n 模式展示. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持展示插件插件状态 ([7e916ac](https://github.com/lobehub/lobe-chat/commit/7e916ac)) +- **misc**: 支持插件 i18n 模式展示 ([8614734](https://github.com/lobehub/lobe-chat/commit/8614734)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.58.0](https://github.com/lobehub/lobe-chat/compare/v0.57.0...v0.58.0) + +Released on **2023-08-26** + +#### ✨ Features + +- **misc**: Implement responsive design for mobile devices. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Implement responsive design for mobile devices, closes [#95](https://github.com/lobehub/lobe-chat/issues/95) ([fdb3c93](https://github.com/lobehub/lobe-chat/commit/fdb3c93)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.57.0](https://github.com/lobehub/lobe-chat/compare/v0.56.0...v0.57.0) + +Released on **2023-08-26** + +#### ♻ Code Refactoring + +- **misc**: Refactor to ChatErrorType. + +#### ✨ Features + +- **misc**: 完善插件请求的错误处理,支持修改与记录插件的配置,支持发送插件配置信息,支持渲染 manifest 中的 settings, 支持设置不正确时进行插件的配置,新增插件请求状态的错误处理. + +#### 🐛 Bug Fixes + +- **misc**: 修正缓存旧数据的报错问题. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor to ChatErrorType ([cd1a033](https://github.com/lobehub/lobe-chat/commit/cd1a033)) + +#### What's improved + +- **misc**: 完善插件请求的错误处理 ([0698d89](https://github.com/lobehub/lobe-chat/commit/0698d89)) +- **misc**: 支持修改与记录插件的配置 ([76e8237](https://github.com/lobehub/lobe-chat/commit/76e8237)) +- **misc**: 支持发送插件配置信息 ([2cedc85](https://github.com/lobehub/lobe-chat/commit/2cedc85)) +- **misc**: 支持渲染 manifest 中的 settings ([1185300](https://github.com/lobehub/lobe-chat/commit/1185300)) +- **misc**: 支持设置不正确时进行插件的配置 ([f972481](https://github.com/lobehub/lobe-chat/commit/f972481)) +- **misc**: 新增插件请求状态的错误处理 ([228002a](https://github.com/lobehub/lobe-chat/commit/228002a)) + +#### What's fixed + +- **misc**: 修正缓存旧数据的报错问题 ([5d8008f](https://github.com/lobehub/lobe-chat/commit/5d8008f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.56.0](https://github.com/lobehub/lobe-chat/compare/v0.55.1...v0.56.0) + +Released on **2023-08-24** + +#### ✨ Features + +- **misc**: Use new plugin manifest to support plugin’s multi api. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Use new plugin manifest to support plugin’s multi api, closes [#101](https://github.com/lobehub/lobe-chat/issues/101) ([4534598](https://github.com/lobehub/lobe-chat/commit/4534598)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.55.1](https://github.com/lobehub/lobe-chat/compare/v0.55.0...v0.55.1) + +Released on **2023-08-22** + +#### ♻ Code Refactoring + +- **misc**: Refactor plugin api with @lobehub/chat-plugins-gateway. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor plugin api with @lobehub/chat-plugins-gateway, closes [#100](https://github.com/lobehub/lobe-chat/issues/100) ([b88d0db](https://github.com/lobehub/lobe-chat/commit/b88d0db)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.55.0](https://github.com/lobehub/lobe-chat/compare/v0.54.4...v0.55.0) + +Released on **2023-08-22** + +#### ♻ Code Refactoring + +- **misc**: 将网关实现代码集成进 Chat 本体,抽取插件为独立 store, 重构 openai 接口调用逻辑,将插件 schema 开启关闭逻辑与接口解耦,重构插件列表获取逻辑,进而完全移除 plugins 目录. + +#### ✨ Features + +- **misc**: 初步完成插件市场动态加载全链路,实现插件组件的动态加载. + +#### 🐛 Bug Fixes + +- **misc**: Fix error, 修正无法正常开启插件的问题,修正测试,补充插件 store 的水合逻辑. + +#### 💄 Styles + +- **misc**: 完成插件市场 loading 态样式. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 将网关实现代码集成进 Chat 本体 ([17e8161](https://github.com/lobehub/lobe-chat/commit/17e8161)) +- **misc**: 抽取插件为独立 store ([12b7e7d](https://github.com/lobehub/lobe-chat/commit/12b7e7d)) +- **misc**: 重构 openai 接口调用逻辑,将插件 schema 开启关闭逻辑与接口解耦 ([5aa886e](https://github.com/lobehub/lobe-chat/commit/5aa886e)) +- **misc**: 重构插件列表获取逻辑,进而完全移除 plugins 目录 ([10055e1](https://github.com/lobehub/lobe-chat/commit/10055e1)) + +#### What's improved + +- **misc**: 初步完成插件市场动态加载全链路 ([bc5e40f](https://github.com/lobehub/lobe-chat/commit/bc5e40f)) +- **misc**: 实现插件组件的动态加载 ([04dbab2](https://github.com/lobehub/lobe-chat/commit/04dbab2)) + +#### What's fixed + +- **misc**: Fix error ([fbeec75](https://github.com/lobehub/lobe-chat/commit/fbeec75)) +- **misc**: 修正无法正常开启插件的问题 ([b3e9090](https://github.com/lobehub/lobe-chat/commit/b3e9090)) +- **misc**: 修正测试 ([001de5b](https://github.com/lobehub/lobe-chat/commit/001de5b)) +- **misc**: 补充插件 store 的水合逻辑 ([bfb649b](https://github.com/lobehub/lobe-chat/commit/bfb649b)) + +#### Styles + +- **misc**: 完成插件市场 loading 态样式 ([8009691](https://github.com/lobehub/lobe-chat/commit/8009691)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.54.4](https://github.com/lobehub/lobe-chat/compare/v0.54.3...v0.54.4) + +Released on **2023-08-21** + +#### 🐛 Bug Fixes + +- **misc**: Fix not cannot change setting error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix not cannot change setting error, closes [#86](https://github.com/lobehub/lobe-chat/issues/86) ([6405c28](https://github.com/lobehub/lobe-chat/commit/6405c28)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.54.3](https://github.com/lobehub/lobe-chat/compare/v0.54.2...v0.54.3) + +Released on **2023-08-21** + +#### ♻ Code Refactoring + +- **misc**: Refactor plugin request. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor plugin request, closes [#89](https://github.com/lobehub/lobe-chat/issues/89) ([23efee3](https://github.com/lobehub/lobe-chat/commit/23efee3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.54.2](https://github.com/lobehub/lobe-chat/compare/v0.54.1...v0.54.2) + +Released on **2023-08-16** + +#### 💄 Styles + +- **misc**: 修正图片选项的样式问题. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 修正图片选项的样式问题 ([5f576cb](https://github.com/lobehub/lobe-chat/commit/5f576cb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.54.1](https://github.com/lobehub/lobe-chat/compare/v0.54.0...v0.54.1) + +Released on **2023-08-16** + +#### 🐛 Bug Fixes + +- **misc**: 修正 i18n 失效的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 i18n 失效的问题,closes [#80](https://github.com/lobehub/lobe-chat/issues/80) ([b8d957b](https://github.com/lobehub/lobe-chat/commit/b8d957b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.54.0](https://github.com/lobehub/lobe-chat/compare/v0.53.0...v0.54.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Add new features and improve user interface and functionality. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add new features and improve user interface and functionality ([1543bd1](https://github.com/lobehub/lobe-chat/commit/1543bd1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.53.0](https://github.com/lobehub/lobe-chat/compare/v0.52.1...v0.53.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **sidebar**: Add DraggablePanelContainer and adjust layout and styling. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **sidebar**: Add DraggablePanelContainer and adjust layout and styling ([e8c384f](https://github.com/lobehub/lobe-chat/commit/e8c384f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.52.1](https://github.com/lobehub/lobe-chat/compare/v0.52.0...v0.52.1) + +Released on **2023-08-15** + +#### ♻ Code Refactoring + +- **misc**: Replace cdn. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Replace cdn ([2875400](https://github.com/lobehub/lobe-chat/commit/2875400)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.52.0](https://github.com/lobehub/lobe-chat/compare/v0.51.0...v0.52.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Add avatar compress. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add avatar compress ([1325b40](https://github.com/lobehub/lobe-chat/commit/1325b40)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.51.0](https://github.com/lobehub/lobe-chat/compare/v0.50.0...v0.51.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Add Footer component and modify Token and index files. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add Footer component and modify Token and index files ([41a3823](https://github.com/lobehub/lobe-chat/commit/41a3823)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.50.0](https://github.com/lobehub/lobe-chat/compare/v0.49.0...v0.50.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Update messages, settings, error codes, plugin names, weather data display, and UI. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Update messages, settings, error codes, plugin names, weather data display, and UI ([a41db51](https://github.com/lobehub/lobe-chat/commit/a41db51)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.49.0](https://github.com/lobehub/lobe-chat/compare/v0.48.0...v0.49.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Add `BackToBottom` to conversation, Update icons and text in various components. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add `BackToBottom` to conversation ([1433aa9](https://github.com/lobehub/lobe-chat/commit/1433aa9)) +- **misc**: Update icons and text in various components ([0e7a683](https://github.com/lobehub/lobe-chat/commit/0e7a683)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.48.0](https://github.com/lobehub/lobe-chat/compare/v0.47.0...v0.48.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Import SiOpenai icon and replace 'Tag' component in chat feature. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Import SiOpenai icon and replace 'Tag' component in chat feature ([98b0352](https://github.com/lobehub/lobe-chat/commit/98b0352)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.47.0](https://github.com/lobehub/lobe-chat/compare/v0.46.1...v0.47.0) + +Released on **2023-08-15** + +#### ✨ Features + +- **misc**: Add and update UI elements and agent configuration. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add and update UI elements and agent configuration ([eb7fbee](https://github.com/lobehub/lobe-chat/commit/eb7fbee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.46.1](https://github.com/lobehub/lobe-chat/compare/v0.46.0...v0.46.1) + +Released on **2023-08-14** + +#### 💄 Styles + +- **misc**: Fix SystemRole Skeleton padding. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix SystemRole Skeleton padding ([ce485a0](https://github.com/lobehub/lobe-chat/commit/ce485a0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.46.0](https://github.com/lobehub/lobe-chat/compare/v0.45.0...v0.46.0) + +Released on **2023-08-14** + +#### ✨ Features + +- **misc**: Update styling and functionality of AgentPrompt and EditableMessage components, 支持停止生成消息. + +#### 🐛 Bug Fixes + +- **misc**: Remove input highlight. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Update styling and functionality of AgentPrompt and EditableMessage components ([80b521c](https://github.com/lobehub/lobe-chat/commit/80b521c)) +- **misc**: 支持停止生成消息,closes [#78](https://github.com/lobehub/lobe-chat/issues/78) ([9eeca80](https://github.com/lobehub/lobe-chat/commit/9eeca80)) + +#### What's fixed + +- **misc**: Remove input highlight ([ad2001a](https://github.com/lobehub/lobe-chat/commit/ad2001a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.45.0](https://github.com/lobehub/lobe-chat/compare/v0.44.4...v0.45.0) + +Released on **2023-08-14** + +#### ✨ Features + +- **misc**: 优化每个角色的初始引导. + +#### 💄 Styles + +- **misc**: 优化初始化加载状态,等到会话加载完毕再显示内容. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 优化每个角色的初始引导,closes [#76](https://github.com/lobehub/lobe-chat/issues/76) ([8d78dc5](https://github.com/lobehub/lobe-chat/commit/8d78dc5)) + +#### Styles + +- **misc**: 优化初始化加载状态,等到会话加载完毕再显示内容 ([cf603cb](https://github.com/lobehub/lobe-chat/commit/cf603cb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.44.4](https://github.com/lobehub/lobe-chat/compare/v0.44.3...v0.44.4) + +Released on **2023-08-13** + +#### 💄 Styles + +- **misc**: 优化 Chat Skeleton 样式,优化 Inbox 样式. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 Chat Skeleton 样式 ([3f83be0](https://github.com/lobehub/lobe-chat/commit/3f83be0)) +- **misc**: 优化 Inbox 样式 ([924c12e](https://github.com/lobehub/lobe-chat/commit/924c12e)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.44.3](https://github.com/lobehub/lobe-chat/compare/v0.44.2...v0.44.3) + +Released on **2023-08-13** + +#### ♻ Code Refactoring + +- **misc**: 重构 organizeChats 方法. + +#### 🐛 Bug Fixes + +- **misc**: 修正 inbox 点击重新生成会报错的问题. + +#### 💄 Styles + +- **misc**: 修正话题列表无法滚动的问题. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构 organizeChats 方法 ([799612e](https://github.com/lobehub/lobe-chat/commit/799612e)) + +#### What's fixed + +- **misc**: 修正 inbox 点击重新生成会报错的问题 ([064ef56](https://github.com/lobehub/lobe-chat/commit/064ef56)) + +#### Styles + +- **misc**: 修正话题列表无法滚动的问题 ([26772e7](https://github.com/lobehub/lobe-chat/commit/26772e7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.44.2](https://github.com/lobehub/lobe-chat/compare/v0.44.1...v0.44.2) + +Released on **2023-08-13** + +#### 🐛 Bug Fixes + +- **misc**: 修正重新生成时切分历史消息的逻辑. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正重新生成时切分历史消息的逻辑,closes [#50](https://github.com/lobehub/lobe-chat/issues/50) ([de5141f](https://github.com/lobehub/lobe-chat/commit/de5141f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.44.1](https://github.com/lobehub/lobe-chat/compare/v0.44.0...v0.44.1) + +Released on **2023-08-12** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.44.0](https://github.com/lobehub/lobe-chat/compare/v0.43.0...v0.44.0) + +Released on **2023-08-12** + +#### ♻ Code Refactoring + +- **misc**: 优化 Inbox 会话的实现逻辑,将 chat 中的功能模型拆分到 features 中,重构 session 相关实现,移除循环依赖. + +#### ✨ Features + +- **misc**: 支持 inbox 消息导出,支持 inbox 的会话功能,新增 inbox 数据模型,新增 inbox 模块入口. + +#### 💄 Styles + +- **misc**: Fix Inbox defaultMessage avatar, 优化 header 的 setting 展示,优化门禁下默认的解锁方式,补充 ChatList 的 Loading 态. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 优化 Inbox 会话的实现逻辑 ([22cc4cf](https://github.com/lobehub/lobe-chat/commit/22cc4cf)) +- **misc**: 将 chat 中的功能模型拆分到 features 中 ([e25a856](https://github.com/lobehub/lobe-chat/commit/e25a856)) +- **misc**: 重构 session 相关实现,移除循环依赖 ([9acf65c](https://github.com/lobehub/lobe-chat/commit/9acf65c)) + +#### What's improved + +- **misc**: 支持 inbox 消息导出 ([498e075](https://github.com/lobehub/lobe-chat/commit/498e075)) +- **misc**: 支持 inbox 的会话功能 ([9b713b8](https://github.com/lobehub/lobe-chat/commit/9b713b8)) +- **misc**: 新增 inbox 数据模型 ([91a8158](https://github.com/lobehub/lobe-chat/commit/91a8158)) +- **misc**: 新增 inbox 模块入口 ([6fc8907](https://github.com/lobehub/lobe-chat/commit/6fc8907)) + +#### Styles + +- **misc**: Fix Inbox defaultMessage avatar ([dbc18a4](https://github.com/lobehub/lobe-chat/commit/dbc18a4)) +- **misc**: 优化 header 的 setting 展示 ([201d380](https://github.com/lobehub/lobe-chat/commit/201d380)) +- **misc**: 优化门禁下默认的解锁方式 ([df9bb45](https://github.com/lobehub/lobe-chat/commit/df9bb45)) +- **misc**: 补充 ChatList 的 Loading 态 ([eb3eb5d](https://github.com/lobehub/lobe-chat/commit/eb3eb5d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.43.0](https://github.com/lobehub/lobe-chat/compare/v0.42.3...v0.43.0) + +Released on **2023-08-12** + +#### ✨ Features + +- **misc**: 支持切换语言. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持切换语言,closes [#67](https://github.com/lobehub/lobe-chat/issues/67) ([63ed8ec](https://github.com/lobehub/lobe-chat/commit/63ed8ec)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.42.3](https://github.com/lobehub/lobe-chat/compare/v0.42.2...v0.42.3) + +Released on **2023-08-12** + +#### 💄 Styles + +- **misc**: 暂时隐藏 Hero 模板. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 暂时隐藏 Hero 模板 ([8289ae6](https://github.com/lobehub/lobe-chat/commit/8289ae6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.42.2](https://github.com/lobehub/lobe-chat/compare/v0.42.1...v0.42.2) + +Released on **2023-08-12** + +#### ♻ Code Refactoring + +- **misc**: 将 useSettings 更名为 useGlobalStore, 将原本的 settings 更名为 global, 收敛切换 SideBar 方法为 useSwitchSideBarOnInit, 重构需本地缓存的状态为 preference. + +#### 🐛 Bug Fixes + +- **misc**: 修正移除 session 时的路由跳转逻辑. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 将 useSettings 更名为 useGlobalStore ([bdde7df](https://github.com/lobehub/lobe-chat/commit/bdde7df)) +- **misc**: 将原本的 settings 更名为 global ([e42d34c](https://github.com/lobehub/lobe-chat/commit/e42d34c)) +- **misc**: 收敛切换 SideBar 方法为 useSwitchSideBarOnInit ([bbad38f](https://github.com/lobehub/lobe-chat/commit/bbad38f)) +- **misc**: 重构需本地缓存的状态为 preference ([8359b62](https://github.com/lobehub/lobe-chat/commit/8359b62)) + +#### What's fixed + +- **misc**: 修正移除 session 时的路由跳转逻辑 ([8b7838d](https://github.com/lobehub/lobe-chat/commit/8b7838d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.42.1](https://github.com/lobehub/lobe-chat/compare/v0.42.0...v0.42.1) + +Released on **2023-08-12** + +#### 💄 Styles + +- **misc**: 优化 App 首页 Loading 态. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 App 首页 Loading 态 ([72104e8](https://github.com/lobehub/lobe-chat/commit/72104e8)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.42.0](https://github.com/lobehub/lobe-chat/compare/v0.41.2...v0.42.0) + +Released on **2023-08-11** + +#### ✨ Features + +- **misc**: Add `Welcome` page. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add `Welcome` page, closes [#60](https://github.com/lobehub/lobe-chat/issues/60) ([810ab0f](https://github.com/lobehub/lobe-chat/commit/810ab0f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.41.2](https://github.com/lobehub/lobe-chat/compare/v0.41.1...v0.41.2) + +Released on **2023-08-10** + +#### ♻ Code Refactoring + +- **misc**: 将 sessionStore 默认 equalFn 改为 shallow, 将 settingStore 默认 equalFn 改为 shallow. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 将 sessionStore 默认 equalFn 改为 shallow ([5c1b8d7](https://github.com/lobehub/lobe-chat/commit/5c1b8d7)) +- **misc**: 将 settingStore 默认 equalFn 改为 shallow ([1e72308](https://github.com/lobehub/lobe-chat/commit/1e72308)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.41.1](https://github.com/lobehub/lobe-chat/compare/v0.41.0...v0.41.1) + +Released on **2023-08-10** + +#### ♻ Code Refactoring + +- **misc**: 重构 settings store 代码写法. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构 settings store 代码写法 ([4b6f917](https://github.com/lobehub/lobe-chat/commit/4b6f917)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.41.0](https://github.com/lobehub/lobe-chat/compare/v0.40.7...v0.41.0) + +Released on **2023-08-10** + +#### ✨ Features + +- **misc**: 支持持久化隐藏 Topic 功能. + +#### 💄 Styles + +- **misc**: 优化第一次水合逻辑. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持持久化隐藏 Topic 功能 ([9ea2778](https://github.com/lobehub/lobe-chat/commit/9ea2778)) + +#### Styles + +- **misc**: 优化第一次水合逻辑 ([fefae61](https://github.com/lobehub/lobe-chat/commit/fefae61)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.7](https://github.com/lobehub/lobe-chat/compare/v0.40.6...v0.40.7) + +Released on **2023-08-10** + +#### 💄 Styles + +- **misc**: 优化 Topic 的水合加载效果. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 Topic 的水合加载效果 ([0cd0088](https://github.com/lobehub/lobe-chat/commit/0cd0088)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.6](https://github.com/lobehub/lobe-chat/compare/v0.40.5...v0.40.6) + +Released on **2023-08-10** + +#### ♻ Code Refactoring + +- **misc**: 重构优化 hydrated 的判断逻辑. + +#### 💄 Styles + +- **misc**: 优化水合前的加载效果. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构优化 hydrated 的判断逻辑 ([1781119](https://github.com/lobehub/lobe-chat/commit/1781119)) + +#### Styles + +- **misc**: 优化水合前的加载效果 ([6bbd978](https://github.com/lobehub/lobe-chat/commit/6bbd978)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.5](https://github.com/lobehub/lobe-chat/compare/v0.40.4...v0.40.5) + +Released on **2023-08-10** + +#### 💄 Styles + +- **misc**: 增加未初始化的 loading 态. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 增加未初始化的 loading 态 ([dcb7c07](https://github.com/lobehub/lobe-chat/commit/dcb7c07)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.4](https://github.com/lobehub/lobe-chat/compare/v0.40.3...v0.40.4) + +Released on **2023-08-10** + +#### 💄 Styles + +- **misc**: 优化 Header 样式. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 Header 样式 ([edd148a](https://github.com/lobehub/lobe-chat/commit/edd148a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.3](https://github.com/lobehub/lobe-chat/compare/v0.40.2...v0.40.3) + +Released on **2023-08-10** + +#### 🐛 Bug Fixes + +- **misc**: 修正没有 prompt 的编辑与保存按钮的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正没有 prompt 的编辑与保存按钮的问题 ([b7e1648](https://github.com/lobehub/lobe-chat/commit/b7e1648)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.2](https://github.com/lobehub/lobe-chat/compare/v0.40.1...v0.40.2) + +Released on **2023-08-08** + +#### 🐛 Bug Fixes + +- **misc**: 修正 defaults 造成的 config 报错. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 defaults 造成的 config 报错 ([0857fa7](https://github.com/lobehub/lobe-chat/commit/0857fa7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.40.1](https://github.com/lobehub/lobe-chat/compare/v0.40.0...v0.40.1) + +Released on **2023-08-06** + +#### 🐛 Bug Fixes + +- **misc**: 优化 openai 接口的错误处理逻辑. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 优化 openai 接口的错误处理逻辑 ([eae78fe](https://github.com/lobehub/lobe-chat/commit/eae78fe)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.40.0](https://github.com/lobehub/lobe-chat/compare/v0.39.4...v0.40.0) + +Released on **2023-08-05** + +#### ✨ Features + +- **misc**: Add new dependency, add Tag and PluginTag components, update HeaderTitle. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add new dependency, add Tag and PluginTag components, update HeaderTitle, closes [#56](https://github.com/lobehub/lobe-chat/issues/56) [#55](https://github.com/lobehub/lobe-chat/issues/55) [#54](https://github.com/lobehub/lobe-chat/issues/54) ([2812ea2](https://github.com/lobehub/lobe-chat/commit/2812ea2)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.39.4](https://github.com/lobehub/lobe-chat/compare/v0.39.3...v0.39.4) + +Released on **2023-08-05** + +#### 💄 Styles + +- **misc**: 修正 assistant 消息没有 background 的问题. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 修正 assistant 消息没有 background 的问题,closes [#42](https://github.com/lobehub/lobe-chat/issues/42) ([812e976](https://github.com/lobehub/lobe-chat/commit/812e976)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.39.3](https://github.com/lobehub/lobe-chat/compare/v0.39.2...v0.39.3) + +Released on **2023-08-04** + +#### 🐛 Bug Fixes + +- **misc**: 优化 405 报错返回内容,并优化 openai 服务端超时处理逻辑. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 优化 405 报错返回内容,并优化 openai 服务端超时处理逻辑 ([0acc829](https://github.com/lobehub/lobe-chat/commit/0acc829)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.39.2](https://github.com/lobehub/lobe-chat/compare/v0.39.1...v0.39.2) + +Released on **2023-08-04** + +#### 💄 Styles + +- **misc**: 优化 topic 样式. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 topic 样式 ([75dc034](https://github.com/lobehub/lobe-chat/commit/75dc034)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.39.1](https://github.com/lobehub/lobe-chat/compare/v0.39.0...v0.39.1) + +Released on **2023-08-04** + +#### 🐛 Bug Fixes + +- **misc**: 修正 basePath 在生产环境下不生效的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 basePath 在生产环境下不生效的问题 ([71b9139](https://github.com/lobehub/lobe-chat/commit/71b9139)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.39.0](https://github.com/lobehub/lobe-chat/compare/v0.38.0...v0.39.0) + +Released on **2023-08-04** + +#### ✨ Features + +- **misc**: 支持多轮的插件意图识别,支持自定义 OpenAI 代理地址. + +#### 💄 Styles + +- **misc**: 优化插件的展示逻辑. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持多轮的插件意图识别 ([5127f1b](https://github.com/lobehub/lobe-chat/commit/5127f1b)) +- **misc**: 支持自定义 OpenAI 代理地址 ([33a111c](https://github.com/lobehub/lobe-chat/commit/33a111c)) + +#### Styles + +- **misc**: 优化插件的展示逻辑 ([7621bad](https://github.com/lobehub/lobe-chat/commit/7621bad)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.38.0](https://github.com/lobehub/lobe-chat/compare/v0.37.0...v0.38.0) + +Released on **2023-08-04** + +#### ✨ Features + +- **misc**: Add topic empty. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add topic empty ([b9f267c](https://github.com/lobehub/lobe-chat/commit/b9f267c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.37.0](https://github.com/lobehub/lobe-chat/compare/v0.36.1...v0.37.0) + +Released on **2023-08-03** + +#### ✨ Features + +- **misc**: 支持使用全局助手的设置作为默认助手的创建角色. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持使用全局助手的设置作为默认助手的创建角色,closes [#44](https://github.com/lobehub/lobe-chat/issues/44) ([f91857d](https://github.com/lobehub/lobe-chat/commit/f91857d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.36.1](https://github.com/lobehub/lobe-chat/compare/v0.36.0...v0.36.1) + +Released on **2023-08-03** + +#### ♻ Code Refactoring + +- **misc**: Refactor zustand usage with v4.4. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Refactor zustand usage with v4.4, closes [#52](https://github.com/lobehub/lobe-chat/issues/52) ([4c65aa7](https://github.com/lobehub/lobe-chat/commit/4c65aa7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.36.0](https://github.com/lobehub/lobe-chat/compare/v0.35.1...v0.36.0) + +Released on **2023-08-03** + +#### ✨ Features + +- **misc**: 实现自定义历史消息数功能. + +#### 🐛 Bug Fixes + +- **misc**: Fix setting type. + +#### 💄 Styles + +- **misc**: Fix session item height. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 实现自定义历史消息数功能 ([7baa022](https://github.com/lobehub/lobe-chat/commit/7baa022)) + +#### What's fixed + +- **misc**: Fix setting type ([57e415e](https://github.com/lobehub/lobe-chat/commit/57e415e)) + +#### Styles + +- **misc**: Fix session item height ([6cd1de5](https://github.com/lobehub/lobe-chat/commit/6cd1de5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.35.1](https://github.com/lobehub/lobe-chat/compare/v0.35.0...v0.35.1) + +Released on **2023-07-31** + +#### 💄 Styles + +- **misc**: Update doc mode and token tags. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Update doc mode and token tags ([1d3c5b6](https://github.com/lobehub/lobe-chat/commit/1d3c5b6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.35.0](https://github.com/lobehub/lobe-chat/compare/v0.34.0...v0.35.0) + +Released on **2023-07-31** + +#### ✨ Features + +- **misc**: Add agent settings functionality, new components, and features for AgentMeta, Add and modify translations for various keys in JSON code files. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add agent settings functionality, new components, and features for AgentMeta ([b1e5ff9](https://github.com/lobehub/lobe-chat/commit/b1e5ff9)) +- **misc**: Add and modify translations for various keys in JSON code files ([503adb4](https://github.com/lobehub/lobe-chat/commit/503adb4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.34.0](https://github.com/lobehub/lobe-chat/compare/v0.33.0...v0.34.0) + +Released on **2023-07-31** + +#### ✨ Features + +- **misc**: Add agent settings functionality, Add new components and features for AgentMeta, Improve organization and functionality of settings and configuration features. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add agent settings functionality ([b0aaeed](https://github.com/lobehub/lobe-chat/commit/b0aaeed)) +- **misc**: Add new components and features for AgentMeta ([1232d95](https://github.com/lobehub/lobe-chat/commit/1232d95)) +- **misc**: Improve organization and functionality of settings and configuration features ([badde35](https://github.com/lobehub/lobe-chat/commit/badde35)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.33.0](https://github.com/lobehub/lobe-chat/compare/v0.32.0...v0.33.0) + +Released on **2023-07-30** + +#### ✨ Features + +- **misc**: 支持输入模板预处理. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持输入模板预处理 ([84082c1](https://github.com/lobehub/lobe-chat/commit/84082c1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.32.0](https://github.com/lobehub/lobe-chat/compare/v0.31.0...v0.32.0) + +Released on **2023-07-30** + +#### ✨ Features + +- **misc**: 支持会话置顶. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持会话置顶,closes [#32](https://github.com/lobehub/lobe-chat/issues/32) ([fc44b5d](https://github.com/lobehub/lobe-chat/commit/fc44b5d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.31.0](https://github.com/lobehub/lobe-chat/compare/v0.30.1...v0.31.0) + +Released on **2023-07-30** + +#### ✨ Features + +- **misc**: 支持展示 token 使用量. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持展示 token 使用量,closes [#31](https://github.com/lobehub/lobe-chat/issues/31) ([e4d4dac](https://github.com/lobehub/lobe-chat/commit/e4d4dac)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.30.1](https://github.com/lobehub/lobe-chat/compare/v0.30.0...v0.30.1) + +Released on **2023-07-30** + +#### 💄 Styles + +- **misc**: 优化搜索引擎插件展示. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化搜索引擎插件展示 ([347e6b0](https://github.com/lobehub/lobe-chat/commit/347e6b0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.30.0](https://github.com/lobehub/lobe-chat/compare/v0.29.0...v0.30.0) + +Released on **2023-07-30** + +#### ✨ Features + +- **misc**: 优化保存为话题功能,实现 Topic 重命名功能,实现话题删除功能,支持缓存角色面板的展开折叠状态. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 优化保存为话题功能 ([fdbe084](https://github.com/lobehub/lobe-chat/commit/fdbe084)) +- **misc**: 实现 Topic 重命名功能 ([5ef1685](https://github.com/lobehub/lobe-chat/commit/5ef1685)) +- **misc**: 实现话题删除功能 ([970889d](https://github.com/lobehub/lobe-chat/commit/970889d)) +- **misc**: 支持缓存角色面板的展开折叠状态 ([c241c4b](https://github.com/lobehub/lobe-chat/commit/c241c4b)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.29.0](https://github.com/lobehub/lobe-chat/compare/v0.28.0...v0.29.0) + +Released on **2023-07-30** + +#### ✨ Features + +- **misc**: 实现单个会话和角色的导出功能,实现清空所有会话消息. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 实现单个会话和角色的导出功能 ([d15a481](https://github.com/lobehub/lobe-chat/commit/d15a481)) +- **misc**: 实现清空所有会话消息 ([64c5125](https://github.com/lobehub/lobe-chat/commit/64c5125)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.28.0](https://github.com/lobehub/lobe-chat/compare/v0.27.4...v0.28.0) + +Released on **2023-07-30** + +#### ♻ Code Refactoring + +- **misc**: 重构 settings 相关类型. + +#### ✨ Features + +- **misc**: 优化 SideBar 实现,激活态指示更加明确,实现 session 导入功能,实现配置导出功能. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构 settings 相关类型 ([6b7c0a0](https://github.com/lobehub/lobe-chat/commit/6b7c0a0)) + +#### What's improved + +- **misc**: 优化 SideBar 实现,激活态指示更加明确 ([8a467df](https://github.com/lobehub/lobe-chat/commit/8a467df)) +- **misc**: 实现 session 导入功能 ([5650167](https://github.com/lobehub/lobe-chat/commit/5650167)) +- **misc**: 实现配置导出功能 ([c1f73fe](https://github.com/lobehub/lobe-chat/commit/c1f73fe)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.27.4](https://github.com/lobehub/lobe-chat/compare/v0.27.3...v0.27.4) + +Released on **2023-07-29** + +#### 🐛 Bug Fixes + +- **misc**: 修正日志超过 4096 长度的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正日志超过 4096 长度的问题 ([6066aff](https://github.com/lobehub/lobe-chat/commit/6066aff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.27.3](https://github.com/lobehub/lobe-chat/compare/v0.27.2...v0.27.3) + +Released on **2023-07-29** + +#### 🐛 Bug Fixes + +- **misc**: 修正返回结果导致插件无法正常识别的问题. + +#### 💄 Styles + +- **misc**: 优化样式. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正返回结果导致插件无法正常识别的问题 ([b183188](https://github.com/lobehub/lobe-chat/commit/b183188)) + +#### Styles + +- **misc**: 优化样式 ([9ce5d1d](https://github.com/lobehub/lobe-chat/commit/9ce5d1d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.27.2](https://github.com/lobehub/lobe-chat/compare/v0.27.1...v0.27.2) + +Released on **2023-07-29** + +#### ♻ Code Refactoring + +- **misc**: 重构并优化文档抓取插件能力. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构并优化文档抓取插件能力 ([ff56348](https://github.com/lobehub/lobe-chat/commit/ff56348)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.27.1](https://github.com/lobehub/lobe-chat/compare/v0.27.0...v0.27.1) + +Released on **2023-07-29** + +#### 💄 Styles + +- **misc**: 优化搜索引擎样式. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化搜索引擎样式 ([699afb3](https://github.com/lobehub/lobe-chat/commit/699afb3)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.27.0](https://github.com/lobehub/lobe-chat/compare/v0.26.1...v0.27.0) + +Released on **2023-07-29** + +#### ✨ Features + +- **misc**: 优化搜索引擎插件交互展示. + +#### 💄 Styles + +- **misc**: 优化兜底结果展示. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 优化搜索引擎插件交互展示 ([4751084](https://github.com/lobehub/lobe-chat/commit/4751084)) + +#### Styles + +- **misc**: 优化兜底结果展示 ([9da45d6](https://github.com/lobehub/lobe-chat/commit/9da45d6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.26.1](https://github.com/lobehub/lobe-chat/compare/v0.26.0...v0.26.1) + +Released on **2023-07-29** + +#### ♻ Code Refactoring + +- **misc**: 优化 setting Layout 实现. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 优化 setting Layout 实现 ([f789935](https://github.com/lobehub/lobe-chat/commit/f789935)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.26.0](https://github.com/lobehub/lobe-chat/compare/v0.25.0...v0.26.0) + +Released on **2023-07-28** + +#### ✨ Features + +- **misc**: support password auth and error. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: support password auth and error, closes [#22](https://github.com/lobehub/lobe-chat/issues/22) ([67f1f4d](https://github.com/lobehub/lobe-chat/commit/67f1f4d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.25.0](https://github.com/lobehub/lobe-chat/compare/v0.24.0...v0.25.0) + +Released on **2023-07-26** + +#### ✨ Features + +- **sidebar**: Add import functionality and set labels and onClick functions + +
+ +
+ Improvements and Fixes + +#### ✨ Features + +- **sidebar**: Add import functionality and set labels and onClick functions ([03ea9bd](https://github.com/lobehub/lobe-chat/commit/03ea9bd)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.24.0](https://github.com/lobehub/lobe-chat/compare/v0.23.0...v0.24.0) + +Released on **2023-07-26** + +#### ✨ Features + +- **misc**: Add new translations, update existing translations, add functionality to components, modify styling, and adjust placeholder text + +
+ +
+ Improvements and Fixes + +#### ✨ Features + +- Add new translations, update existing translations, add functionality to components, modify styling, and adjust placeholder text ([da4ae72](https://github.com/lobehub/lobe-chat/commit/da4ae72)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.23.0](https://github.com/lobehub/lobe-chat/compare/v0.22.2...v0.23.0) + +Released on **2023-07-26** + +#### ✨ Features + +- **misc**: Add new features, update URLs, customize appearance, and implement components + +
+ +
+ Improvements and Fixes + +#### ✨ Features + +- Add new features, update URLs, customize appearance, and implement components ([4b61bf4](https://github.com/lobehub/lobe-chat/commit/4b61bf4)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.22.2](https://github.com/lobehub/lobe-chat/compare/v0.22.1...v0.22.2) + +Released on **2023-07-26** + +#### 💄 Styles + +- **misc**: 优化 tooltip 显示. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化 tooltip 显示 ([4ba0295](https://github.com/lobehub/lobe-chat/commit/4ba0295)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.22.1](https://github.com/lobehub/lobe-chat/compare/v0.22.0...v0.22.1) + +Released on **2023-07-25** + +#### 🐛 Bug Fixes + +- **misc**: 修正自定义 OpenAI API Key 的使用问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正自定义 OpenAI API Key 的使用问题 ([84475c0](https://github.com/lobehub/lobe-chat/commit/84475c0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.22.0](https://github.com/lobehub/lobe-chat/compare/v0.21.0...v0.22.0) + +Released on **2023-07-25** + +#### ✨ Features + +- **misc**: 支持使用自定义 OpenAI Key. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持使用自定义 OpenAI Key, closes [#20](https://github.com/lobehub/lobe-chat/issues/20) ([fb454a0](https://github.com/lobehub/lobe-chat/commit/fb454a0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.21.0](https://github.com/lobehub/lobe-chat/compare/v0.20.0...v0.21.0) + +Released on **2023-07-25** + +#### ♻ Code Refactoring + +- **misc**: Move component folder. + +#### ✨ Features + +- **misc**: 支持快捷配置模型、温度. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Move component folder ([fb85d16](https://github.com/lobehub/lobe-chat/commit/fb85d16)) + +#### What's improved + +- **misc**: 支持快捷配置模型、温度,closes [#19](https://github.com/lobehub/lobe-chat/issues/19) ([31daee1](https://github.com/lobehub/lobe-chat/commit/31daee1)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.20.0](https://github.com/lobehub/lobe-chat/compare/v0.19.0...v0.20.0) + +Released on **2023-07-25** + +#### ✨ Features + +- **misc**: 实现话题模块. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 实现话题模块,closes [#16](https://github.com/lobehub/lobe-chat/issues/16) ([64fd6ee](https://github.com/lobehub/lobe-chat/commit/64fd6ee)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.19.0](https://github.com/lobehub/lobe-chat/compare/v0.18.2...v0.19.0) + +Released on **2023-07-24** + +#### ♻ Code Refactoring + +- **misc**: 将 message reducer 提取到独立文件夹中,清理无用代码实现. + +#### ✨ Features + +- **misc**: 数据结构层完成 topic 模型改造. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 将 message reducer 提取到独立文件夹中 ([64f40ca](https://github.com/lobehub/lobe-chat/commit/64f40ca)) +- **misc**: 清理无用代码实现 ([3655b60](https://github.com/lobehub/lobe-chat/commit/3655b60)) + +#### What's improved + +- **misc**: 数据结构层完成 topic 模型改造 ([99fa2a6](https://github.com/lobehub/lobe-chat/commit/99fa2a6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.18.2](https://github.com/lobehub/lobe-chat/compare/v0.18.1...v0.18.2) + +Released on **2023-07-24** + +#### 💄 Styles + +- **misc**: 修正 markdown li 丢失的问题. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 修正 markdown li 丢失的问题 ([eb6e831](https://github.com/lobehub/lobe-chat/commit/eb6e831)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.18.1](https://github.com/lobehub/lobe-chat/compare/v0.18.0...v0.18.1) + +Released on **2023-07-24** + +#### ♻ Code Refactoring + +- **misc**: 优化新会话的创建逻辑 session. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 优化新会话的创建逻辑 session ([d70f22d](https://github.com/lobehub/lobe-chat/commit/d70f22d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.18.0](https://github.com/lobehub/lobe-chat/compare/v0.17.0...v0.18.0) + +Released on **2023-07-24** + +#### ✨ Features + +- **misc**: 实现会话展示模式切换,并优化默认创建角色的配置. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 实现会话展示模式切换,并优化默认创建角色的配置 ([27ae82f](https://github.com/lobehub/lobe-chat/commit/27ae82f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.17.0](https://github.com/lobehub/lobe-chat/compare/v0.16.1...v0.17.0) + +Released on **2023-07-24** + +#### ✨ Features + +- **misc**: 表单配置支持设定各项高级参数. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 表单配置支持设定各项高级参数 ([6949cc6](https://github.com/lobehub/lobe-chat/commit/6949cc6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.16.1](https://github.com/lobehub/lobe-chat/compare/v0.16.0...v0.16.1) + +Released on **2023-07-24** + +#### ♻ Code Refactoring + +- **misc**: 重构优化 selectors 实现. + +#### 💄 Styles + +- **misc**: 优化 document title. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构优化 selectors 实现 ([97fe1cd](https://github.com/lobehub/lobe-chat/commit/97fe1cd)) + +#### Styles + +- **misc**: 优化 document title ([c3cda00](https://github.com/lobehub/lobe-chat/commit/c3cda00)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.16.0](https://github.com/lobehub/lobe-chat/compare/v0.15.1...v0.16.0) + +Released on **2023-07-24** + +#### ✨ Features + +- **misc**: 支持自动跳转到第一条会话. + +#### 💄 Styles + +- **misc**: 修正插件的展示文案. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持自动跳转到第一条会话 ([54f01c7](https://github.com/lobehub/lobe-chat/commit/54f01c7)) + +#### Styles + +- **misc**: 修正插件的展示文案 ([53c81ae](https://github.com/lobehub/lobe-chat/commit/53c81ae)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.15.1](https://github.com/lobehub/lobe-chat/compare/v0.15.0...v0.15.1) + +Released on **2023-07-24** + +#### 💄 Styles + +- **misc**: 更新插件文案. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 更新插件文案 ([0411335](https://github.com/lobehub/lobe-chat/commit/0411335)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.15.0](https://github.com/lobehub/lobe-chat/compare/v0.14.0...v0.15.0) + +Released on **2023-07-24** + +#### ✨ Features + +- **misc**: Add new features and improve user experience, Import and use constants from "meta.ts" instead of "agentConfig". + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add new features and improve user experience ([64c8782](https://github.com/lobehub/lobe-chat/commit/64c8782)) +- **misc**: Import and use constants from "meta.ts" instead of "agentConfig" ([1eb6a17](https://github.com/lobehub/lobe-chat/commit/1eb6a17)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.14.0](https://github.com/lobehub/lobe-chat/compare/v0.13.1...v0.14.0) + +Released on **2023-07-24** + +#### ✨ Features + +- **misc**: 支持网页抓取. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持网页抓取,closes [#14](https://github.com/lobehub/lobe-chat/issues/14) ([9e933b0](https://github.com/lobehub/lobe-chat/commit/9e933b0)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.13.1](https://github.com/lobehub/lobe-chat/compare/v0.13.0...v0.13.1) + +Released on **2023-07-23** + +#### 🐛 Bug Fixes + +- **misc**: 修正搜索引擎插件的实现问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正搜索引擎插件的实现问题 ([d19a805](https://github.com/lobehub/lobe-chat/commit/d19a805)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.13.0](https://github.com/lobehub/lobe-chat/compare/v0.12.1...v0.13.0) + +Released on **2023-07-23** + +#### ✨ Features + +- **misc**: 优化插件模式下的用户体验. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 优化插件模式下的用户体验,closes [#13](https://github.com/lobehub/lobe-chat/issues/13) ([4596f12](https://github.com/lobehub/lobe-chat/commit/4596f12)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.12.1](https://github.com/lobehub/lobe-chat/compare/v0.12.0...v0.12.1) + +Released on **2023-07-23** + +#### 🐛 Bug Fixes + +- **misc**: 修正 message parentId 不正确的问题. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: 修正 message parentId 不正确的问题 ([f86852a](https://github.com/lobehub/lobe-chat/commit/f86852a)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.12.0](https://github.com/lobehub/lobe-chat/compare/v0.11.0...v0.12.0) + +Released on **2023-07-23** + +#### ✨ Features + +- **misc**: 支持插件列表 与 基于 Serpapi 的搜索引擎插件. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持插件列表 与 基于 Serpapi 的搜索引擎插件,closes [#12](https://github.com/lobehub/lobe-chat/issues/12) ([d89e06f](https://github.com/lobehub/lobe-chat/commit/d89e06f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.11.0](https://github.com/lobehub/lobe-chat/compare/v0.10.2...v0.11.0) + +Released on **2023-07-23** + +#### ♻ Code Refactoring + +- **misc**: Remove langchain, 优化代码. + +#### ✨ Features + +- **misc**: 支持查询天气. + +#### 💄 Styles + +- **misc**: Update manifest, 增加国际化文案. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: Remove langchain ([7b0f96c](https://github.com/lobehub/lobe-chat/commit/7b0f96c)) +- **misc**: 优化代码 ([6a8f7df](https://github.com/lobehub/lobe-chat/commit/6a8f7df)) + +#### What's improved + +- **misc**: 支持查询天气 ([34bf285](https://github.com/lobehub/lobe-chat/commit/34bf285)) + +#### Styles + +- **misc**: Update manifest ([ea9e8de](https://github.com/lobehub/lobe-chat/commit/ea9e8de)) +- **misc**: 增加国际化文案 ([f5e8d7c](https://github.com/lobehub/lobe-chat/commit/f5e8d7c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.10.2](https://github.com/lobehub/lobe-chat/compare/v0.10.1...v0.10.2) + +Released on **2023-07-23** + +#### 💄 Styles + +- **misc**: 优化模型在 list 中的展示逻辑. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 优化模型在 list 中的展示逻辑 ([4bdf3c5](https://github.com/lobehub/lobe-chat/commit/4bdf3c5)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.10.1](https://github.com/lobehub/lobe-chat/compare/v0.10.0...v0.10.1) + +Released on **2023-07-22** + +#### 💄 Styles + +- **misc**: 修正对话中用户头像的问题. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: 修正对话中用户头像的问题 ([560c8bb](https://github.com/lobehub/lobe-chat/commit/560c8bb)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.10.0](https://github.com/lobehub/lobe-chat/compare/v0.9.0...v0.10.0) + +Released on **2023-07-22** + +#### ✨ Features + +- **misc**: 支持复制与编辑会话消息. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持复制与编辑会话消息 ([bebcf9f](https://github.com/lobehub/lobe-chat/commit/bebcf9f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.9.0](https://github.com/lobehub/lobe-chat/compare/v0.8.2...v0.9.0) + +Released on **2023-07-22** + +#### ✨ Features + +- **misc**: 展示模型类型. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 展示模型类型 ([58ea93c](https://github.com/lobehub/lobe-chat/commit/58ea93c)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.8.2](https://github.com/lobehub/lobe-chat/compare/v0.8.1...v0.8.2) + +Released on **2023-07-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix miss manifest.json link, 优化 model tag 展示逻辑. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix miss manifest.json link ([ac4b2f3](https://github.com/lobehub/lobe-chat/commit/ac4b2f3)) +- **misc**: 优化 model tag 展示逻辑 ([3463ede](https://github.com/lobehub/lobe-chat/commit/3463ede)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.8.1](https://github.com/lobehub/lobe-chat/compare/v0.8.0...v0.8.1) + +Released on **2023-07-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix import. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix import ([4fb9967](https://github.com/lobehub/lobe-chat/commit/4fb9967)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.8.0](https://github.com/lobehub/lobe-chat/compare/v0.7.0...v0.8.0) + +Released on **2023-07-22** + +#### ✨ Features + +- **misc**: 支持 pwa 模式. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持 pwa 模式 ([8aad92d](https://github.com/lobehub/lobe-chat/commit/8aad92d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.7.0](https://github.com/lobehub/lobe-chat/compare/v0.6.1...v0.7.0) + +Released on **2023-07-22** + +#### ✨ Features + +- **misc**: 支持展示来自模型的标记信息. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持展示来自模型的标记信息 ([e27fae9](https://github.com/lobehub/lobe-chat/commit/e27fae9)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.6.1](https://github.com/lobehub/lobe-chat/compare/v0.6.0...v0.6.1) + +Released on **2023-07-22** + +#### 🐛 Bug Fixes + +- **misc**: Add deps. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Add deps ([3dc45fe](https://github.com/lobehub/lobe-chat/commit/3dc45fe)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.6.0](https://github.com/lobehub/lobe-chat/compare/v0.5.0...v0.6.0) + +Released on **2023-07-22** + +#### ♻ Code Refactoring + +- **misc**: 重构 selector 文件组织. + +#### ✨ Features + +- **misc**: 补充 token 详情. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 重构 selector 文件组织 ([2ad0ef9](https://github.com/lobehub/lobe-chat/commit/2ad0ef9)) + +#### What's improved + +- **misc**: 补充 token 详情 ([098f7ff](https://github.com/lobehub/lobe-chat/commit/098f7ff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.5.0](https://github.com/lobehub/lobe-chat/compare/v0.4.3...v0.5.0) + +Released on **2023-07-22** + +#### ✨ Features + +- **misc**: 支持选择 Emoji. + +#### 🐛 Bug Fixes + +- **misc**: 修正 total token 计算不正确的问题. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: 支持选择 Emoji ([6cb4828](https://github.com/lobehub/lobe-chat/commit/6cb4828)) + +#### What's fixed + +- **misc**: 修正 total token 计算不正确的问题 ([17815c6](https://github.com/lobehub/lobe-chat/commit/17815c6)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.4.3](https://github.com/lobehub/lobe-chat/compare/v0.4.2...v0.4.3) + +Released on **2023-07-22** + +#### ♻ Code Refactoring + +- **misc**: 优化 edit 代码结构. + +
+ +
+ Improvements and Fixes + +#### Code refactoring + +- **misc**: 优化 edit 代码结构 ([fdb3a3f](https://github.com/lobehub/lobe-chat/commit/fdb3a3f)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.4.2](https://github.com/lobehub/lobe-chat/compare/v0.4.1...v0.4.2) + +Released on **2023-07-22** + +#### 💄 Styles + +- **misc**: Fix input style, fix layout. + +
+ +
+ Improvements and Fixes + +#### Styles + +- **misc**: Fix input style ([504bd64](https://github.com/lobehub/lobe-chat/commit/504bd64)) +- **misc**: Fix layout ([2d83aff](https://github.com/lobehub/lobe-chat/commit/2d83aff)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.4.1](https://github.com/lobehub/lobe-chat/compare/v0.4.0...v0.4.1) + +Released on **2023-07-22** + +#### 🐛 Bug Fixes + +- **misc**: Fix SSR style error. + +
+ +
+ Improvements and Fixes + +#### What's fixed + +- **misc**: Fix SSR style error ([289eae7](https://github.com/lobehub/lobe-chat/commit/289eae7)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.4.0](https://github.com/lobehub/lobe-chat/compare/v0.3.0...v0.4.0) + +Released on **2023-07-20** + +#### ✨ Features + +- **misc**: Add styles and modify layout of FolderPanel, SliderWithInput, SessionList, EditPage, ChatLayout, and SettingLayout components, Introduce FOLDER_WIDTH constant and update components. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add styles and modify layout of FolderPanel, SliderWithInput, SessionList, EditPage, ChatLayout, and SettingLayout components ([7f19a09](https://github.com/lobehub/lobe-chat/commit/7f19a09)) +- **misc**: Introduce FOLDER_WIDTH constant and update components ([c511964](https://github.com/lobehub/lobe-chat/commit/c511964)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.3.0](https://github.com/lobehub/lobe-chat/compare/v0.2.0...v0.3.0) + +Released on **2023-07-18** + +#### ✨ Features + +- **misc**: Add new files, modify components, and adjust layout and styling. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add new files, modify components, and adjust layout and styling ([b8c3b38](https://github.com/lobehub/lobe-chat/commit/b8c3b38)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +## [Version 0.2.0](https://github.com/lobehub/lobe-chat/compare/v0.1.6...v0.2.0) + +Released on **2023-07-18** + +#### ✨ Features + +- **misc**: Add import statement and define CSS styles for Avatar component. + +
+ +
+ Improvements and Fixes + +#### What's improved + +- **misc**: Add import statement and define CSS styles for Avatar component ([8c23a8d](https://github.com/lobehub/lobe-chat/commit/8c23a8d)) + +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
+ +### [Version 0.1.6](https://github.com/lobehub/lobe-chat/compare/v0.1.5...v0.1.6) + +Released on **2023-07-18** + +
+ +
+ Improvements and Fixes +
+ +
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) +
diff --git a/DigitalHumanWeb/CODE_OF_CONDUCT.md b/DigitalHumanWeb/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..83832d4 --- /dev/null +++ b/DigitalHumanWeb/CODE_OF_CONDUCT.md @@ -0,0 +1,128 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to participate in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, religion, or sexual identity +and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community includes: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the + overall community + +## Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct that could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series +of actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or +permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within +the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.0, available at +. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct +enforcement ladder](https://github.com/mozilla/diversity). + +For answers to common questions about this code of conduct, see the FAQ at +. Translations are available at +. + +[homepage]: https://www.contributor-covenant.org diff --git a/DigitalHumanWeb/CONTRIBUTING.md b/DigitalHumanWeb/CONTRIBUTING.md new file mode 100644 index 0000000..7056223 --- /dev/null +++ b/DigitalHumanWeb/CONTRIBUTING.md @@ -0,0 +1,88 @@ +# Lobe Chat - Contributing Guide 🌟 + +We're thrilled that you want to contribute to Lobe Chat, the future of communication! 😄 + +Lobe Chat is an open-source project, and we welcome your collaboration. Before you jump in, let's make sure you're all set to contribute effectively and have loads of fun along the way! + +## Table of Contents + +- [Fork the Repository](#fork-the-repository) +- [Clone Your Fork](#clone-your-fork) +- [Create a New Branch](#create-a-new-branch) +- [Code Like a Wizard](#code-like-a-wizard) +- [Committing Your Work](#committing-your-work) +- [Sync with Upstream](#sync-with-upstream) +- [Open a Pull Request](#open-a-pull-request) +- [Review and Collaboration](#review-and-collaboration) +- [Celebrate 🎉](#celebrate-) + +## Fork the Repository + +🍴 Fork this repository to your GitHub account by clicking the "Fork" button at the top right. This creates a personal copy of the project you can work on. + +## Clone Your Fork + +📦 Clone your forked repository to your local machine using the `git clone` command: + +```bash +git clone https://github.com/YourUsername/lobe-chat.git +``` + +## Create a New Branch + +🌿 Create a new branch for your contribution. This helps keep your work organized and separate from the main codebase. + +```bash +git checkout -b your-branch-name +``` + +Choose a meaningful branch name related to your work. It makes collaboration easier! + +## Code Like a Wizard + +🧙‍♀️ Time to work your magic! Write your code, fix bugs, or add new features. Be sure to follow our project's coding style. You can check if your code adheres to our style using: + +```bash +pnpm lint +``` + +This adds a bit of enchantment to your coding experience! ✨ + +## Committing Your Work + +📝 Ready to save your progress? Commit your changes to your branch. + +```bash +git add . +git commit -m "Your meaningful commit message" +``` + +Please keep your commits focused and clear. And remember to be kind to your fellow contributors; keep your commits concise. + +## Sync with Upstream + +⚙️ Periodically, sync your forked repository with the original (upstream) repository to stay up-to-date with the latest changes. + +```bash +git remote add upstream https://github.com/lobehub/lobe-chat.git +git fetch upstream +git merge upstream/main +``` + +This ensures you're working on the most current version of Lobe Chat. Stay fresh! 💨 + +## Open a Pull Request + +🚀 Time to share your contribution! Head over to the original Lobe Chat repository and open a Pull Request (PR). Our maintainers will review your work. + +## Review and Collaboration + +👓 Your PR will undergo thorough review and testing. The maintainers will provide feedback, and you can collaborate to make your contribution even better. We value teamwork! + +## Celebrate 🎉 + +🎈 Congratulations! Your contribution is now part of Lobe Chat. 🥳 + +Thank you for making Lobe Chat even more magical. We can't wait to see what you create! 🌠 + +Happy Coding! 🚀🦄 diff --git a/DigitalHumanWeb/Dockerfile b/DigitalHumanWeb/Dockerfile new file mode 100644 index 0000000..ae9603a --- /dev/null +++ b/DigitalHumanWeb/Dockerfile @@ -0,0 +1,209 @@ +## Base image for all the stages +FROM node:20-slim AS base + +ARG USE_CN_MIRROR + +ENV DEBIAN_FRONTEND="noninteractive" + +RUN \ + # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true + if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \ + sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" "/etc/apt/sources.list.d/debian.sources"; \ + fi \ + # Add required package & update base package + && apt update \ + && apt install busybox proxychains-ng -qy \ + && apt full-upgrade -qy \ + && apt autoremove -qy --purge \ + && apt clean -qy \ + # Configure BusyBox + && busybox --install -s \ + # Add nextjs:nodejs to run the app + && addgroup --system --gid 1001 nodejs \ + && adduser --system --home "/app" --gid 1001 -uid 1001 nextjs \ + # Set permission for nextjs:nodejs + && chown -R nextjs:nodejs "/etc/proxychains4.conf" \ + # Cleanup temp files + && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* + +## Builder image, install all the dependencies and build the app +FROM base AS builder + +ARG USE_CN_MIRROR + +ENV NEXT_PUBLIC_BASE_PATH="" + +# Sentry +ENV NEXT_PUBLIC_SENTRY_DSN="" \ + SENTRY_ORG="" \ + SENTRY_PROJECT="" + +# Posthog +ENV NEXT_PUBLIC_ANALYTICS_POSTHOG="" \ + NEXT_PUBLIC_POSTHOG_HOST="" \ + NEXT_PUBLIC_POSTHOG_KEY="" + +# Umami +ENV NEXT_PUBLIC_ANALYTICS_UMAMI="" \ + NEXT_PUBLIC_UMAMI_SCRIPT_URL="" \ + NEXT_PUBLIC_UMAMI_WEBSITE_ID="" + +# Node +ENV NODE_OPTIONS="--max-old-space-size=8192" + +WORKDIR /app + +COPY package.json ./ +COPY .npmrc ./ + +RUN \ + # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true + if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \ + export SENTRYCLI_CDNURL="https://npmmirror.com/mirrors/sentry-cli"; \ + npm config set registry "https://registry.npmmirror.com/"; \ + fi \ + # Set the registry for corepack + && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \ + # Enable corepack + && corepack enable \ + # Use pnpm for corepack + && corepack use pnpm \ + # Install the dependencies + && pnpm i \ + # Add sharp dependencies + && mkdir -p /deps \ + && pnpm add sharp --prefix /deps + +COPY . . + +# run build standalone for docker version +RUN npm run build:docker + +## Application image, copy all the files for production +FROM scratch AS app + +COPY --from=builder /app/public /app/public + +# Automatically leverage output traces to reduce image size +# https://nextjs.org/docs/advanced-features/output-file-tracing +COPY --from=builder /app/.next/standalone /app/ +COPY --from=builder /app/.next/static /app/.next/static +COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm + +## Production image, copy all the files and run next +FROM base + +# Copy all the files from app, set the correct permission for prerender cache +COPY --from=app --chown=nextjs:nodejs /app /app + +ENV NODE_ENV="production" \ + NODE_TLS_REJECT_UNAUTHORIZED="" + +# set hostname to localhost +ENV HOSTNAME="0.0.0.0" \ + PORT="3210" + +# General Variables +ENV ACCESS_CODE="" \ + API_KEY_SELECT_MODE="" \ + DEFAULT_AGENT_CONFIG="" \ + SYSTEM_AGENT="" \ + FEATURE_FLAGS="" \ + PROXY_URL="" + +# Model Variables +ENV \ + # AI21 + AI21_API_KEY="" \ + # Ai360 + AI360_API_KEY="" \ + # Anthropic + ANTHROPIC_API_KEY="" ANTHROPIC_PROXY_URL="" \ + # Amazon Bedrock + AWS_ACCESS_KEY_ID="" AWS_SECRET_ACCESS_KEY="" AWS_REGION="" AWS_BEDROCK_MODEL_LIST="" \ + # Azure OpenAI + AZURE_API_KEY="" AZURE_API_VERSION="" AZURE_ENDPOINT="" AZURE_MODEL_LIST="" \ + # Baichuan + BAICHUAN_API_KEY="" \ + # DeepSeek + DEEPSEEK_API_KEY="" \ + # Fireworks AI + FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \ + # GitHub + GITHUB_TOKEN="" GITHUB_MODEL_LIST="" \ + # Google + GOOGLE_API_KEY="" GOOGLE_PROXY_URL="" \ + # Groq + GROQ_API_KEY="" GROQ_MODEL_LIST="" GROQ_PROXY_URL="" \ + # Minimax + MINIMAX_API_KEY="" \ + # Mistral + MISTRAL_API_KEY="" \ + # Moonshot + MOONSHOT_API_KEY="" MOONSHOT_PROXY_URL="" \ + # Novita + NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \ + # Ollama + OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \ + # OpenAI + OPENAI_API_KEY="" OPENAI_MODEL_LIST="" OPENAI_PROXY_URL="" \ + # OpenRouter + OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \ + # Perplexity + PERPLEXITY_API_KEY="" PERPLEXITY_PROXY_URL="" \ + # Qwen + QWEN_API_KEY="" QWEN_MODEL_LIST="" \ + # SiliconCloud + SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \ + # Spark + SPARK_API_KEY="" \ + # Stepfun + STEPFUN_API_KEY="" \ + # Taichu + TAICHU_API_KEY="" \ + # TogetherAI + TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \ + # Upstage + UPSTAGE_API_KEY="" \ + # 01.AI + ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \ + # Zhipu + ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" + +USER nextjs + +EXPOSE 3210/tcp + +CMD \ + if [ -n "$PROXY_URL" ]; then \ + # Set regex for IPv4 + IP_REGEX="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$"; \ + # Set proxychains command + PROXYCHAINS="proxychains -q"; \ + # Parse the proxy URL + host_with_port="${PROXY_URL#*//}"; \ + host="${host_with_port%%:*}"; \ + port="${PROXY_URL##*:}"; \ + protocol="${PROXY_URL%%://*}"; \ + # Resolve to IP address if the host is a domain + if ! [[ "$host" =~ "$IP_REGEX" ]]; then \ + nslookup=$(nslookup -q="A" "$host" | tail -n +3 | grep 'Address:'); \ + if [ -n "$nslookup" ]; then \ + host=$(echo "$nslookup" | tail -n 1 | awk '{print $2}'); \ + fi; \ + fi; \ + # Generate proxychains configuration file + printf "%s\n" \ + 'localnet 127.0.0.0/255.0.0.0' \ + 'localnet ::1/128' \ + 'proxy_dns' \ + 'remote_dns_subnet 224' \ + 'strict_chain' \ + 'tcp_connect_time_out 8000' \ + 'tcp_read_time_out 15000' \ + '[ProxyList]' \ + "$protocol $host $port" \ + > "/etc/proxychains4.conf"; \ + fi; \ + # Run the server + ${PROXYCHAINS} node "/app/server.js"; diff --git a/DigitalHumanWeb/Dockerfile.database b/DigitalHumanWeb/Dockerfile.database new file mode 100644 index 0000000..3f11381 --- /dev/null +++ b/DigitalHumanWeb/Dockerfile.database @@ -0,0 +1,245 @@ +## Base image for all the stages +FROM node:20-slim AS base + +ARG USE_CN_MIRROR + +ENV DEBIAN_FRONTEND="noninteractive" + +RUN \ + # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true + if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \ + sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" "/etc/apt/sources.list.d/debian.sources"; \ + fi \ + # Add required package & update base package + && apt update \ + && apt install busybox proxychains-ng -qy \ + && apt full-upgrade -qy \ + && apt autoremove -qy --purge \ + && apt clean -qy \ + # Configure BusyBox + && busybox --install -s \ + # Add nextjs:nodejs to run the app + && addgroup --system --gid 1001 nodejs \ + && adduser --system --home "/app" --gid 1001 -uid 1001 nextjs \ + # Set permission for nextjs:nodejs + && chown -R nextjs:nodejs "/etc/proxychains4.conf" \ + # Cleanup temp files + && rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/* + +## Builder image, install all the dependencies and build the app +FROM base AS builder + +ARG USE_CN_MIRROR + +ENV NEXT_PUBLIC_SERVICE_MODE="server" \ + APP_URL="http://app.com" \ + DATABASE_DRIVER="node" \ + DATABASE_URL="postgres://postgres:password@localhost:5432/postgres" \ + KEY_VAULTS_SECRET="use-for-build" + +# Sentry +ENV NEXT_PUBLIC_SENTRY_DSN="" \ + SENTRY_ORG="" \ + SENTRY_PROJECT="" + +# Posthog +ENV NEXT_PUBLIC_ANALYTICS_POSTHOG="" \ + NEXT_PUBLIC_POSTHOG_HOST="" \ + NEXT_PUBLIC_POSTHOG_KEY="" + +# Umami +ENV NEXT_PUBLIC_ANALYTICS_UMAMI="" \ + NEXT_PUBLIC_UMAMI_SCRIPT_URL="" \ + NEXT_PUBLIC_UMAMI_WEBSITE_ID="" + +# Node +ENV NODE_OPTIONS="--max-old-space-size=8192" + +WORKDIR /app + +COPY package.json ./ +COPY .npmrc ./ + +RUN \ + # If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true + if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \ + export SENTRYCLI_CDNURL="https://npmmirror.com/mirrors/sentry-cli"; \ + npm config set registry "https://registry.npmmirror.com/"; \ + fi \ + # Set the registry for corepack + && export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \ + # Enable corepack + && corepack enable \ + # Use pnpm for corepack + && corepack use pnpm \ + # Install the dependencies + && pnpm i \ + # Add sharp and db migration dependencies + && mkdir -p /deps \ + && pnpm add sharp pg drizzle-orm --prefix /deps + +COPY . . + +# run build standalone for docker version +RUN npm run build:docker + +## Application image, copy all the files for production +FROM scratch AS app + +COPY --from=builder /app/public /app/public + +# Automatically leverage output traces to reduce image size +# https://nextjs.org/docs/advanced-features/output-file-tracing +COPY --from=builder /app/.next/standalone /app/ +COPY --from=builder /app/.next/static /app/.next/static + +# copy dependencies +COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm +COPY --from=builder /deps/node_modules/pg /app/node_modules/pg +COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm + +# Copy database migrations +COPY --from=builder /app/src/database/server/migrations /app/migrations +COPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs +COPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js + +## Production image, copy all the files and run next +FROM base + +# Copy all the files from app, set the correct permission for prerender cache +COPY --from=app --chown=nextjs:nodejs /app /app + +ENV NODE_ENV="production" \ + NODE_TLS_REJECT_UNAUTHORIZED="" + +# set hostname to localhost +ENV HOSTNAME="0.0.0.0" \ + PORT="3210" + +# General Variables +ENV ACCESS_CODE="" \ + APP_URL="" \ + API_KEY_SELECT_MODE="" \ + DEFAULT_AGENT_CONFIG="" \ + SYSTEM_AGENT="" \ + FEATURE_FLAGS="" \ + PROXY_URL="" + +# Database +ENV KEY_VAULTS_SECRET="" \ + DATABASE_DRIVER="node" \ + DATABASE_URL="" + +# Next Auth +ENV NEXT_AUTH_SECRET="" \ + NEXT_AUTH_SSO_PROVIDERS="" \ + NEXTAUTH_URL="" + +# S3 +ENV NEXT_PUBLIC_S3_DOMAIN="" \ + S3_PUBLIC_DOMAIN="" \ + S3_ACCESS_KEY_ID="" \ + S3_BUCKET="" \ + S3_ENDPOINT="" \ + S3_SECRET_ACCESS_KEY="" + +# Model Variables +ENV \ + # AI21 + AI21_API_KEY="" \ + # Ai360 + AI360_API_KEY="" \ + # Anthropic + ANTHROPIC_API_KEY="" ANTHROPIC_PROXY_URL="" \ + # Amazon Bedrock + AWS_ACCESS_KEY_ID="" AWS_SECRET_ACCESS_KEY="" AWS_REGION="" AWS_BEDROCK_MODEL_LIST="" \ + # Azure OpenAI + AZURE_API_KEY="" AZURE_API_VERSION="" AZURE_ENDPOINT="" AZURE_MODEL_LIST="" \ + # Baichuan + BAICHUAN_API_KEY="" \ + # DeepSeek + DEEPSEEK_API_KEY="" \ + # Fireworks AI + FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \ + # GitHub + GITHUB_TOKEN="" GITHUB_MODEL_LIST="" \ + # Google + GOOGLE_API_KEY="" GOOGLE_PROXY_URL="" \ + # Groq + GROQ_API_KEY="" GROQ_MODEL_LIST="" GROQ_PROXY_URL="" \ + # Minimax + MINIMAX_API_KEY="" \ + # Mistral + MISTRAL_API_KEY="" \ + # Moonshot + MOONSHOT_API_KEY="" MOONSHOT_PROXY_URL="" \ + # Novita + NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \ + # Ollama + OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \ + # OpenAI + OPENAI_API_KEY="" OPENAI_MODEL_LIST="" OPENAI_PROXY_URL="" \ + # OpenRouter + OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \ + # Perplexity + PERPLEXITY_API_KEY="" PERPLEXITY_PROXY_URL="" \ + # Qwen + QWEN_API_KEY="" QWEN_MODEL_LIST="" \ + # SiliconCloud + SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \ + # Spark + SPARK_API_KEY="" \ + # Stepfun + STEPFUN_API_KEY="" \ + # Taichu + TAICHU_API_KEY="" \ + # TogetherAI + TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \ + # Upstage + UPSTAGE_API_KEY="" \ + # 01.AI + ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \ + # Zhipu + ZHIPU_API_KEY="" + +USER nextjs + +EXPOSE 3210/tcp + +CMD \ + if [ -n "$PROXY_URL" ]; then \ + # Set regex for IPv4 + IP_REGEX="^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$"; \ + # Set proxychains command + PROXYCHAINS="proxychains -q"; \ + # Parse the proxy URL + host_with_port="${PROXY_URL#*//}"; \ + host="${host_with_port%%:*}"; \ + port="${PROXY_URL##*:}"; \ + protocol="${PROXY_URL%%://*}"; \ + # Resolve to IP address if the host is a domain + if ! [[ "$host" =~ "$IP_REGEX" ]]; then \ + nslookup=$(nslookup -q="A" "$host" | tail -n +3 | grep 'Address:'); \ + if [ -n "$nslookup" ]; then \ + host=$(echo "$nslookup" | tail -n 1 | awk '{print $2}'); \ + fi; \ + fi; \ + # Generate proxychains configuration file + printf "%s\n" \ + 'localnet 127.0.0.0/255.0.0.0' \ + 'localnet ::1/128' \ + 'proxy_dns' \ + 'remote_dns_subnet 224' \ + 'strict_chain' \ + 'tcp_connect_time_out 8000' \ + 'tcp_read_time_out 15000' \ + '[ProxyList]' \ + "$protocol $host $port" \ + > "/etc/proxychains4.conf"; \ + fi; \ + # Run migration + node "/app/docker.cjs"; \ + if [ "$?" -eq "0" ]; then \ + # Run the server + ${PROXYCHAINS} node "/app/server.js"; \ + fi; diff --git a/DigitalHumanWeb/LICENSE b/DigitalHumanWeb/LICENSE new file mode 100644 index 0000000..4704b86 --- /dev/null +++ b/DigitalHumanWeb/LICENSE @@ -0,0 +1,38 @@ +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/DigitalHumanWeb/README.ja-JP.md b/DigitalHumanWeb/README.ja-JP.md new file mode 100644 index 0000000..d69681f --- /dev/null +++ b/DigitalHumanWeb/README.ja-JP.md @@ -0,0 +1,809 @@ +
+ +[![][image-banner]][vercel-link] + +# Lobe Chat + +オープンソースのモダンデザインChatGPT/LLMs UI/フレームワーク。
+音声合成、マルチモーダル、拡張可能な([function call][docs-functionc-call])プラグインシステムをサポート。
+プライベートなOpenAI ChatGPT/Claude/Gemini/Groq/Ollamaチャットアプリケーションをワンクリックで**無料**でデプロイ。 + +[English](./README.md) · [简体中文](./README.zh-CN.md) · **日本語** · [公式サイト][official-site] · [変更履歴](./CHANGELOG.md) · [ドキュメント][docs] · [ブログ][blog] · [フィードバック][github-issues-link] + + + +[![][github-release-shield]][github-release-link] +[![][docker-release-shield]][docker-release-link] +[![][vercel-shield]][vercel-link] +[![][discord-shield]][discord-link]
+[![][codecov-shield]][codecov-link] +[![][github-action-test-shield]][github-action-test-link] +[![][github-action-release-shield]][github-action-release-link] +[![][github-releasedate-shield]][github-releasedate-link]
+[![][github-contributors-shield]][github-contributors-link] +[![][github-forks-shield]][github-forks-link] +[![][github-stars-shield]][github-stars-link] +[![][github-issues-shield]][github-issues-link] +[![][github-license-shield]][github-license-link]
+[![][sponsor-shield]][sponsor-link] + +**LobeChatリポジトリを共有** + +[![][share-x-shield]][share-x-link] +[![][share-telegram-shield]][share-telegram-link] +[![][share-whatsapp-shield]][share-whatsapp-link] +[![][share-reddit-shield]][share-reddit-link] +[![][share-weibo-shield]][share-weibo-link] +[![][share-mastodon-shield]][share-mastodon-link] +[![][share-linkedin-shield]][share-linkedin-link] + +新しい時代の思考と創造を先導します。あなたのために、スーパー個人のために作られました。 + +[![][github-trending-shield]][github-trending-url] + +[![][image-overview]][vercel-link] + +
+ +
+目次 + +#### TOC + +- [👋🏻 はじめに & コミュニティに参加](#-はじめに--コミュニティに参加) +- [✨ 特徴](#-特徴) + - [`1` マルチモデルサービスプロバイダーのサポート](#1-マルチモデルサービスプロバイダーのサポート) + - [`2` ローカル大規模言語モデル (LLM) のサポート](#2-ローカル大規模言語モデル-llm-のサポート) + - [`3` モデルの視覚認識](#3-モデルの視覚認識) + - [`4` TTS & STT 音声会話](#4-tts--stt-音声会話) + - [`5` テキストから画像生成](#5-テキストから画像生成) + - [`6` プラグインシステム (Function Calling)](#6-プラグインシステム-function-calling) + - [`7` エージェントマーケット (GPTs)](#7-エージェントマーケット-gpts) + - [`8` ローカル / リモートデータベースのサポート](#8-ローカル--リモートデータベースのサポート) + - [`9` マルチユーザ管理のサポート](#9-マルチユーザ管理のサポート) + - [`10` プログレッシブウェブアプリ (PWA)](#10-プログレッシブウェブアプリ-pwa) + - [`11` モバイルデバイスの適応](#11-モバイルデバイスの適応) + - [`12` カスタムテーマ](#12-カスタムテーマ) + - [`*` その他の特徴](#-その他の特徴) +- [⚡️ パフォーマンス](#️-パフォーマンス) +- [🛳 自己ホスティング](#-自己ホスティング) + - [`A` Vercel、Zeabur、Sealosでのデプロイ](#a-vercelzeabursealosでのデプロイ) + - [`B` Dockerでのデプロイ](#b-dockerでのデプロイ) + - [環境変数](#環境変数) +- [📦 エコシステム](#-エコシステム) +- [🧩 プラグイン](#-プラグイン) +- [⌨️ ローカル開発](#️-ローカル開発) +- [🤝 貢献](#-貢献) +- [❤️ スポンサー](#️-スポンサー) +- [🔗 その他の製品](#-その他の製品) + +#### + +
+ +
+ +## 👋🏻 はじめに & コミュニティに参加 + +私たちは、AIGCのためのモダンデザインコンポーネントとツールを提供することを目指すデザインエンジニアのグループです。 +ブートストラッピングアプローチを採用することで、開発者とユーザーに対してよりオープンで透明性のある、使いやすい製品エコシステムを提供することを目指しています。 + +ユーザーやプロの開発者にとって、LobeHubはあなたのAIエージェントの遊び場となるでしょう。LobeChatは現在アクティブに開発中であり、遭遇した[問題][issues-link]についてのフィードバックを歓迎します。 + +| [![][vercel-shield-badge]][vercel-link] | インストールや登録は不要です!私たちのウェブサイトにアクセスして、直接体験してください。 | +| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | +| [![][discord-shield-badge]][discord-link] | 私たちのDiscordコミュニティに参加しましょう!ここでは、LobeHubの開発者や他の熱心なユーザーとつながることができます。 | + +> \[!IMPORTANT] +> +> **スターを付けてください**。GitHubからのすべてのリリース通知を遅延なく受け取ることができます\~ ⭐️ + +[![][image-star]][github-stars-link] + +
+ スター履歴 + + + + +
+ +## ✨ 特徴 + +[![][image-feat-privoder]][docs-feat-provider] + +### `1` [マルチモデルサービスプロバイダーのサポート][docs-feat-provider] + +LobeChatの継続的な開発において、AI会話サービスを提供する際のモデルサービスプロバイダーの多様性がコミュニティのニーズを満たすために重要であることを深く理解しています。そのため、単一のモデルサービスプロバイダーに限定せず、複数のモデルサービスプロバイダーをサポートすることで、ユーザーにより多様で豊富な会話の選択肢を提供しています。 + +このようにして、LobeChatは異なるユーザーのニーズにより柔軟に対応し、開発者にも幅広い選択肢を提供します。 + +#### サポートされているモデルサービスプロバイダー + +以下のモデルサービスプロバイダーをサポートしています: + +- **AWS Bedrock**:AWS Bedrockサービスと統合され、**Claude / LLama2**などのモデルをサポートし、強力な自然言語処理能力を提供します。[詳細はこちら](https://aws.amazon.com/cn/bedrock) +- **Anthropic (Claude)**:Anthropicの**Claude**シリーズモデルにアクセスし、Claude 3およびClaude 2を含む、マルチモーダル機能と拡張コンテキストで業界の新しいベンチマークを設定します。[詳細はこちら](https://www.anthropic.com/claude) +- **Google AI (Gemini Pro, Gemini Vision)**:Googleの**Gemini**シリーズモデルにアクセスし、GeminiおよびGemini Proを含む、高度な言語理解と生成をサポートします。[詳細はこちら](https://deepmind.google/technologies/gemini/) +- **Groq**:GroqのAIモデルにアクセスし、メッセージシーケンスを効率的に処理し、応答を生成し、マルチターンの対話や単一のインタラクションタスクを実行できます。[詳細はこちら](https://groq.com/) +- **OpenRouter**:**Claude 3**、**Gemma**、**Mistral**、**Llama2**、**Cohere**などのモデルのルーティングをサポートし、インテリジェントなルーティング最適化をサポートし、使用効率を向上させ、オープンで柔軟です。[詳細はこちら](https://openrouter.ai/) +- **01.AI (Yi Model)**:01.AIモデルを統合し、推論速度が速いAPIシリーズを提供し、処理時間を短縮しながら優れたモデル性能を維持します。[詳細はこちら](https://01.ai/) +- **Together.ai**:Together Inference APIを通じて、100以上の主要なオープンソースのチャット、言語、画像、コード、および埋め込みモデルにアクセスできます。これらのモデルについては、使用した分だけ支払います。[詳細はこちら](https://www.together.ai/) +- **ChatGLM**:智谱の**ChatGLM**シリーズモデル(GLM-4/GLM-4-vision/GLM-3-turbo)を追加し、ユーザーにもう一つの効率的な会話モデルの選択肢を提供します。[詳細はこちら](https://www.zhipuai.cn/) +- **Moonshot AI (Dark Side of the Moon)**:中国の革新的なAIスタートアップであるMoonshotシリーズモデルと統合し、より深い会話理解を提供します。[詳細はこちら](https://www.moonshot.cn/) +- **Minimax**:Minimaxモデルを統合し、MoEモデル**abab6**を含む、より広範な選択肢を提供します。[詳細はこちら](https://www.minimaxi.com/) +- **DeepSeek**:中国の革新的なAIスタートアップであるDeepSeekシリーズモデルと統合し、性能と価格のバランスを取ったモデルを提供します。[詳細はこちら](https://www.deepseek.com/) +- **Qwen**:Qwenシリーズモデルを統合し、最新の**qwen-turbo**、**qwen-plus**、**qwen-max**を含む。[詳細はこちら](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction) +- **Novita AI**:**Llama**、**Mistral**、その他の主要なオープンソースモデルに最安値でアクセスできます。検閲されないロールプレイに参加し、創造的な議論を引き起こし、制限のないイノベーションを促進します。**使用した分だけ支払います。** [詳細はこちら](https://novita.ai/llm-api?utm_source=lobechat&utm_medium=ch&utm_campaign=api) + +同時に、ReplicateやPerplexityなどのモデルサービスプロバイダーのサポートも計画しています。これにより、サービスプロバイダーのライブラリをさらに充実させることができます。LobeChatがあなたのお気に入りのサービスプロバイダーをサポートすることを希望する場合は、[コミュニティディスカッション](https://github.com/lobehub/lobe-chat/discussions/1284)に参加してください。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-local]][docs-feat-local] + +### `2` [ローカル大規模言語モデル (LLM) のサポート][docs-feat-local] + +特定のユーザーのニーズに応えるために、LobeChatは[Ollama](https://ollama.ai)に基づいてローカルモデルの使用をサポートしており、ユーザーが自分自身またはサードパーティのモデルを柔軟に使用できるようにしています。 + +> \[!TIP] +> +> [📘 LobeChatでのOllamaの使用][docs-usage-ollama]について詳しくはこちらをご覧ください。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-vision]][docs-feat-vision] + +### `3` [モデルの視覚認識][docs-feat-vision] + +LobeChatは、OpenAIの最新の視覚認識機能を備えた[`gpt-4-vision`](https://platform.openai.com/docs/guides/vision)モデルをサポートしています。 +これは視覚を認識できるマルチモーダルインテリジェンスです。ユーザーは簡単に画像をアップロードしたり、画像をドラッグアンドドロップして対話ボックスに入れることができ、 +エージェントは画像の内容を認識し、これに基づいてインテリジェントな会話を行い、よりスマートで多様なチャットシナリオを作成します。 + +この機能は、新しいインタラクティブな方法を提供し、コミュニケーションがテキストを超えて視覚要素を含むことを可能にします。 +日常の使用での画像共有や特定の業界での画像解釈に関係なく、エージェントは優れた会話体験を提供します。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-tts]][docs-feat-tts] + +### `4` [TTS & STT 音声会話][docs-feat-tts] + +LobeChatは、テキストから音声への変換(Text-to-Speech、TTS)および音声からテキストへの変換(Speech-to-Text、STT)技術をサポートしており、 +テキストメッセージを明瞭な音声出力に変換し、ユーザーが実際の人と話しているかのように対話エージェントと対話できるようにします。 +ユーザーは、エージェントに適した音声を選択することができます。 + +さらに、TTSは聴覚学習を好む人や忙しい中で情報を受け取りたい人にとって優れたソリューションを提供します。 +LobeChatでは、異なる地域や文化的背景のユーザーのニーズに応えるために、さまざまな高品質の音声オプション(OpenAI Audio、Microsoft Edge Speech)を慎重に選択しました。 +ユーザーは、個人の好みや特定のシナリオに応じて適切な音声を選択し、パーソナライズされたコミュニケーション体験を得ることができます。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-t2i]][docs-feat-t2i] + +### `5` [テキストから画像生成][docs-feat-t2i] + +最新のテキストから画像生成技術をサポートし、LobeChatはユーザーがエージェントとの対話中に直接画像作成ツールを呼び出すことができるようになりました。 +[`DALL-E 3`](https://openai.com/dall-e-3)、[`MidJourney`](https://www.midjourney.com/)、[`Pollinations`](https://pollinations.ai/)などのAIツールの能力を活用することで、 +エージェントはあなたのアイデアを画像に変えることができます。 + +これにより、プライベートで没入感のある創造プロセスが可能になり、個人的な対話に視覚的なストーリーテリングをシームレスに統合することができます。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-plugin]][docs-feat-plugin] + +### `6` [プラグインシステム (Function Calling)][docs-feat-plugin] + +LobeChatのプラグインエコシステムは、そのコア機能の重要な拡張であり、LobeChatアシスタントの実用性と柔軟性を大幅に向上させます。 + + + +プラグインを利用することで、LobeChatアシスタントはリアルタイムの情報を取得して処理することができ、ウェブ情報を検索し、ユーザーに即時かつ関連性の高いニュースを提供することができます。 + +さらに、これらのプラグインはニュースの集約に限定されず、他の実用的な機能にも拡張できます。たとえば、ドキュメントの迅速な検索、画像の生成、Bilibili、Steamなどのさまざまなプラットフォームからのデータの取得、さまざまなサードパーティサービスとの連携などです。 + +> \[!TIP] +> +> [📘 プラグインの使用][docs-usage-plugin]について詳しくはこちらをご覧ください。 + + + +| 最近の提出 | 説明 | +| ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | +| [ショッピングツール](https://chat-preview.lobehub.com/settings/agent)
By **shoppingtools** on **2024-07-19** | eBayとAliExpressで製品を検索し、eBayのイベントとクーポンを見つけます。プロンプトの例を取得します。
`ショッピング` `e-bay` `ali-express` `クーポン` | +| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)
By **savvytrader** on **2024-06-27** | リアルタイムの株式、暗号通貨、その他の投資データ。
`株式` `分析` | +| [ソーシャル検索](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` | + +> 📊 合計プラグイン数: [**52**](https://github.com/lobehub/lobe-chat-plugins) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-agent]][docs-feat-agent] + +### `7` [エージェントマーケット (GPTs)][docs-feat-agent] + +LobeChatエージェントマーケットプレイスでは、クリエイターが多くの優れたエージェントを発見できる活気に満ちた革新的なコミュニティを提供しています。 +これらのエージェントは、仕事のシナリオで重要な役割を果たすだけでなく、学習プロセスでも大いに便利です。 +私たちのマーケットプレイスは、単なるショーケースプラットフォームではなく、協力の場でもあります。ここでは、誰もが自分の知恵を貢献し、開発したエージェントを共有できます。 + +> \[!TIP] +> +> [🤖/🏪 エージェントを提出][submit-agents-link]することで、簡単にエージェント作品をプラットフォームに提出できます。 +> 重要なのは、LobeChatが高度な自動化国際化(i18n)ワークフローを確立しており、 +> あなたのエージェントを複数の言語バージョンにシームレスに翻訳できることです。 +> これにより、ユーザーがどの言語を話していても、エージェントを障害なく体験できます。 + +> \[!IMPORTANT] +> +> すべてのユーザーがこの成長するエコシステムに参加し、エージェントの反復と最適化に参加することを歓迎します。 +> 一緒に、より面白く、実用的で革新的なエージェントを作成し、エージェントの多様性と実用性をさらに豊かにしましょう。 + + + +| 最近の提出 | 説明 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Cプログラム学習アシスタント](https://chat-preview.lobehub.com/market?agent=sichuan-university-941-c-programming-assistant)
By **[YBGuoYang](https://github.com/YBGuoYang)** on **2024-07-28** | Cプログラム設計の学習を支援します
`941` | +| [ブランドパイオニア](https://chat-preview.lobehub.com/market?agent=brand-pioneer)
By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-25** | ブランド開発の専門家、思想リーダー、ブランド戦略のスーパー天才、ブランドビジョナリー。ブランドパイオニアは、革新の最前線の探検家であり、自分の分野の発明者です。市場を提供し、専門分野の画期的な進展を特徴とする未来の世界を想像させてください。
`ビジネス` `ブランドパイオニア` `ブランド開発` `ビジネスアシスタント` `ブランドナラティブ` | +| [ネットワークセキュリティアシスタント](https://chat-preview.lobehub.com/market?agent=cybersecurity-copilot)
By **[huoji120](https://github.com/huoji120)** on **2024-07-23** | ログ、コード、逆コンパイルを分析し、問題を特定し、最適化の提案を提供するネットワークセキュリティの専門家アシスタント。
`ネットワークセキュリティ` `トラフィック分析` `ログ分析` `コード逆コンパイル` `ctf` | +| [BIDOSx2](https://chat-preview.lobehub.com/market?agent=bidosx-2-v-2)
By **[SaintFresh](https://github.com/SaintFresh)** on **2024-07-21** | 従来のAIを超越する高度なAI LLM。'BIDOS'は、'ブランドのアイデア、開発、運営、スケーリング'と'ビジネスインテリジェンス決定最適化システム'の両方を意味します。
`ブランド開発` `aiアシスタント` `市場分析` `戦略計画` `ビジネス最適化` `ビジネスインテリジェンス` | + +> 📊 合計エージェント数: [**307** ](https://github.com/lobehub/lobe-chat-agents) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-database]][docs-feat-database] + +### `8` [ローカル / リモートデータベースのサポート][docs-feat-database] + +LobeChatは、サーバーサイドデータベースとローカルデータベースの両方の使用をサポートしています。ニーズに応じて、適切なデプロイメントソリューションを選択できます: + +- **ローカルデータベース**:データとプライバシー保護に対するより多くの制御を希望するユーザーに適しています。LobeChatはCRDT(Conflict-Free Replicated Data Type)技術を使用してマルチデバイス同期を実現しています。これはシームレスなデータ同期体験を提供することを目的とした実験的な機能です。 +- **サーバーサイドデータベース**:より便利なユーザー体験を希望するユーザーに適しています。LobeChatはPostgreSQLをサーバーサイドデータベースとしてサポートしています。サーバーサイドデータベースの設定方法についての詳細なドキュメントは、[サーバーサイドデータベースの設定](https://lobehub.com/docs/self-hosting/advanced/server-database)をご覧ください。 + +どのデータベースを選択しても、LobeChatは優れたユーザー体験を提供します。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-auth]][docs-feat-auth] + +### `9` [マルチユーザ管理のサポート][docs-feat-auth] + +LobeChatはマルチユーザ管理をサポートし、異なるニーズに応じて2つの主要なユーザ認証および管理ソリューションを提供します: + +- **next-auth**:LobeChatは、複数の認証方法(OAuth、メールログイン、資格情報ログインなど)をサポートする柔軟で強力な認証ライブラリである`next-auth`を統合しています。`next-auth`を使用すると、ユーザの登録、ログイン、セッション管理、ソーシャルログインなどの機能を簡単に実装し、ユーザデータのセキュリティとプライバシーを確保できます。 + +- **Clerk**:より高度なユーザ管理機能が必要なユーザ向けに、LobeChatは`Clerk`もサポートしています。`Clerk`は、現代的なユーザ管理プラットフォームであり、多要素認証(MFA)、ユーザプロファイル管理、ログイン活動の監視など、より豊富な機能を提供します。`Clerk`を使用すると、より高いセキュリティと柔軟性を得ることができ、複雑なユーザ管理ニーズに簡単に対応できます。 + +どのユーザ管理ソリューションを選択しても、LobeChatは優れたユーザー体験と強力な機能サポートを提供します。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-pwa]][docs-feat-pwa] + +### `10` [プログレッシブウェブアプリ (PWA)][docs-feat-pwa] + +私たちは、今日のマルチデバイス環境でユーザーにシームレスな体験を提供することの重要性を深く理解しています。 +そのため、プログレッシブウェブアプリケーション([PWA](https://support.google.com/chrome/answer/9658361))技術を採用しました。 +これは、ウェブアプリケーションをネイティブアプリに近い体験に引き上げるモダンなウェブ技術です。 + +PWAを通じて、LobeChatはデスクトップとモバイルデバイスの両方で高度に最適化されたユーザー体験を提供しながら、その軽量で高性能な特性を維持します。 +視覚的および感覚的には、インターフェースを慎重に設計し、ネイティブアプリと区別がつかないようにし、 +スムーズなアニメーション、レスポンシブレイアウト、および異なるデバイスの画面解像度に適応するようにしています。 + +> \[!NOTE] +> +> PWAのインストールプロセスに慣れていない場合は、以下の手順に従ってLobeChatをデスクトップアプリケーション(モバイルデバイスにも適用)として追加できます: +> +> - コンピュータでChromeまたはEdgeブラウザを起動します。 +> - LobeChatのウェブページにアクセスします。 +> - アドレスバーの右上にあるインストールアイコンをクリックします。 +> - 画面の指示に従ってPWAのインストールを完了します。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-mobile]][docs-feat-mobile] + +### `11` [モバイルデバイスの適応][docs-feat-mobile] + +モバイルデバイスのユーザー体験を向上させるために、一連の最適化設計を行いました。現在、モバイルユーザー体験のバージョンを繰り返し改善しています。ご意見やアイデアがある場合は、GitHub IssuesやPull Requestsを通じてフィードバックをお寄せください。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-theme]][docs-feat-theme] + +### `12` [カスタムテーマ][docs-feat-theme] + +デザインエンジニアリング指向のアプリケーションとして、LobeChatはユーザーの個別体験を重視しており、 +柔軟で多様なテーマモードを導入しています。日中のライトモードと夜間のダークモードを含みます。 +テーマモードの切り替えに加えて、さまざまな色のカスタマイズオプションを提供し、ユーザーが自分の好みに応じてアプリケーションのテーマカラーを調整できるようにしています。 +落ち着いたダークブルー、活気のあるピーチピンク、プロフェッショナルなグレーホワイトなど、LobeChatでは自分のスタイルに合った色の選択肢を見つけることができます。 + +> \[!TIP] +> +> デフォルトの設定は、ユーザーのシステムのカラーモードをインテリジェントに認識し、テーマを自動的に切り替えて、オペレーティングシステムと一貫した視覚体験を提供します。 +> 詳細を手動で制御するのが好きなユーザーには、直感的な設定オプションと、会話シナリオに対してチャットバブルモードとドキュメントモードの選択肢を提供します。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +### `*` その他の特徴 + +これらの特徴に加えて、LobeChatは基本的な技術基盤も優れています: + +- [x] 💨 **迅速なデプロイ**:VercelプラットフォームまたはDockerイメージを使用して、ワンクリックでデプロイを行い、1分以内にプロセスを完了できます。複雑な設定は不要です。 +- [x] 🌐 **カスタムドメイン**:ユーザーが独自のドメインを持っている場合、プラットフォームにバインドして、どこからでも対話エージェントに迅速にアクセスできます。 +- [x] 🔒 **プライバシー保護**:すべてのデータはユーザーのブラウザにローカルに保存され、ユーザーのプライバシーを保護します。 +- [x] 💎 **洗練されたUIデザイン**:慎重に設計されたインターフェースで、エレガントな外観とスムーズなインタラクションを提供します。ライトモードとダークモードをサポートし、モバイルフレンドリーです。PWAサポートにより、よりネイティブに近い体験を提供します。 +- [x] 🗣️ **スムーズな会話体験**:流れるような応答により、スムーズな会話体験を提供します。Markdownレンダリングを完全にサポートし、コードのハイライト、LaTexの数式、Mermaidのフローチャートなどを含みます。 + +> ✨ LobeChatの進化に伴い、さらに多くの機能が追加されます。 + +--- + +> \[!NOTE] +> +> 今後の[ロードマップ][github-project-link]計画は、Projectsセクションで確認できます。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⚡️ パフォーマンス + +> \[!NOTE] +> +> 完全なレポートのリストは[📘 Lighthouseレポート][docs-lighthouse]で確認できます。 + +| デスクトップ | モバイル | +| :-----------------------------------------: | :----------------------------------------: | +| ![][chat-desktop] | ![][chat-mobile] | +| [📑 Lighthouseレポート][chat-desktop-report] | [📑 Lighthouseレポート][chat-mobile-report] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🛳 自己ホスティング + +LobeChatは、Vercelと[Dockerイメージ][docker-release-link]を使用した自己ホスティングバージョンを提供しています。これにより、事前の知識がなくても数分で独自のチャットボットをデプロイできます。 + +> \[!TIP] +> +> [📘 独自のLobeChatを構築する][docs-self-hosting]について詳しくはこちらをご覧ください。 + +### `A` Vercel、Zeabur、Sealosでのデプロイ + +このサービスをVercelまたはZeaburでデプロイしたい場合は、以下の手順に従ってください: + +- [OpenAI API Key](https://platform.openai.com/account/api-keys)を準備します。 +- 下のボタンをクリックしてデプロイを開始します:GitHubアカウントで直接ログインし、環境変数セクションに`OPENAI_API_KEY`(必須)と`ACCESS_CODE`(推奨)を入力します。 +- デプロイが完了したら、使用を開始できます。 +- カスタムドメインをバインド(オプション):Vercelが割り当てたドメインのDNSは一部の地域で汚染されているため、カスタムドメインをバインドすることで直接接続できます。 + +
+ +| Vercelでデプロイ | Zeaburでデプロイ | Sealosでデプロイ | +| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | +| [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] | + +
+ +#### フォーク後 + +フォーク後、リポジトリのアクションページで他のアクションを無効にし、アップストリーム同期アクションのみを保持します。 + +#### 更新を維持 + +READMEのワンクリックデプロイ手順に従って独自のプロジェクトをデプロイした場合、「更新が利用可能です」というプロンプトが常に表示されることがあります。これは、Vercelがデフォルトで新しいプロジェクトを作成し、フォークしないため、更新を正確に検出できないためです。 + +> \[!TIP] +> +> [📘 最新バージョンと自動同期][docs-upstream-sync]の手順に従って再デプロイすることをお勧めします。 + +
+ +### `B` Dockerでのデプロイ + +[![][docker-release-shield]][docker-release-link] +[![][docker-size-shield]][docker-size-link] +[![][docker-pulls-shield]][docker-pulls-link] + +LobeChatサービスを独自のプライベートデバイスにデプロイするためのDockerイメージを提供しています。以下のコマンドを使用してLobeChatサービスを開始します: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!TIP] +> +> OpenAIサービスをプロキシ経由で使用する必要がある場合は、`OPENAI_PROXY_URL`環境変数を使用してプロキシアドレスを設定できます: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!NOTE] +> +> Dockerを使用したデプロイの詳細な手順については、[📘 Dockerデプロイガイド][docs-docker]を参照してください。 + +
+ +### 環境変数 + +このプロジェクトは、環境変数で設定される追加の構成項目を提供します: + +| 環境変数 | 必須 | 説明 | 例 | +| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `OPENAI_API_KEY` | はい | これはOpenAIアカウントページで申請したAPIキーです | `sk-xxxxxx...xxxxxx` | +| `OPENAI_PROXY_URL` | いいえ | OpenAIインターフェイスプロキシを手動で設定する場合、この設定項目を使って、デフォルトのOpenAI APIリクエストベースURLを上書きすることができます。 | `https://api.chatanywhere.cn` または `https://aihubmix.com/v1`
デフォルトの値は
`https://api.openai.com/v1` | +| `ACCESS_CODE` | いいえ | このサービスにアクセスするためのパスワードを追加します。漏洩を避けるために長いパスワードを設定することができます。この値にカンマが含まれる場合は、パスワードの配列となります。 | `awCTe)re_r74` または `rtrt_ewee3@09!` または `code1,code2,code3` | +| `OPENAI_MODEL_LIST` | いいえ | モデルリストをコントロールするために使用します。モデルを追加するには `+` を、モデルを非表示にするには `-` を、モデルの表示名をカンマ区切りでカスタマイズするには `model_name=display_name` を使用します。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` | + +> \[!NOTE] +> +> 環境変数の完全なリストは [📘環境変数][docs-env-var] にあります + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 📦 エコシステム + +| NPM | リポジトリ | 説明 | バージョン | +| --------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------- | +| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | AIGC ウェブアプリケーション構築専用のオープンソースUIコンポーネントライブラリ。 | [![][lobe-ui-shield]][lobe-ui-link] | +| [@lobehub/icons][lobe-icons-link] | [lobehub/lobe-icons][lobe-icons-github] | 人気の AI/LLM モデルブランドの SVG ロゴとアイコン集。 | [![][lobe-icons-shield]][lobe-icons-link] | +| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | 高品質で信頼性の高い TTS/STT React Hooks ライブラリ | [![][lobe-tts-shield]][lobe-tts-link] | +| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeHub の ESlint、Stylelint、Commitlint、Prettier、Remark、Semantic Release の設定。 | [![][lobe-lint-shield]][lobe-lint-link] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🧩 プラグイン + +プラグインは、LobeChatの[関数呼び出し][docs-functionc-call]機能を拡張する手段を提供します。プラグインを使用して、新しい関数呼び出しやメッセージ結果の新しいレンダリング方法を導入することができます。プラグイン開発に興味がある方は、Wikiの[📘プラグイン開発ガイド][docs-plugin-dev]を参照してください。 + +- [lobe-chat-plugins][lobe-chat-plugins]: これはLobeChatのプラグインインデックスです。このリポジトリからindex.jsonにアクセスし、LobeChatで利用可能なプラグインのリストをユーザに表示します。 +- [chat-plugin-template][chat-plugin-template]: これはLobeChatプラグイン開発用のプラグインテンプレートです。 +- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: LobeChatプラグインSDKは、Lobe Chat用の優れたチャットプラグインの作成を支援します。 +- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: LobeChat Plugins Gatewayは、LobeChatプラグインのためのゲートウェイを提供するバックエンドサービスです。このサービスはVercelを使用してデプロイされます。プライマリAPIのPOST /api/v1/runnerはEdge Functionとしてデプロイされます。 + +> \[!NOTE] +> +> プラグインシステムは現在大規模な開発中です。詳しくは以下の issue をご覧ください: +> +> - [x] [**プラグインフェイズ 1**](https://github.com/lobehub/lobe-chat/issues/73): プラグインを本体から分離し、メンテナンスのためにプラグインを独立したリポジトリに分割し、プラグインの動的ロードを実現する。 +> - [x] [**プラグインフェイズ 2**](https://github.com/lobehub/lobe-chat/issues/97): プラグイン使用の安全性と安定性、より正確な異常状態の提示、プラグインアーキテクチャの保守性、開発者フレンドリー。 +> - [x] [**プラグインフェイズ 3**](https://github.com/lobehub/lobe-chat/issues/149): より高度で包括的なカスタマイズ機能、プラグイン認証のサポート、サンプル。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⌨️ ローカル開発 + +GitHub Codespaces を使ってオンライン開発ができます: + +[![][codespaces-shield]][codespaces-link] + +Or clone it for local development: + +```fish +$ git clone https://github.com/lobehub/lobe-chat.git +$ cd lobe-chat +$ pnpm install +$ pnpm dev +``` + +より詳しい情報をお知りになりたい方は、[📘開発ガイド][docs-dev-guide]をご覧ください。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🤝 コントリビュート + +どのようなタイプのコントリビュートも大歓迎です;コードを提供することに興味がある方は、GitHub の [Issues][github-issues-link] や [Projects][github-project-link] をチェックして、あなたの力をお貸しください。 + +> \[!TIP] +> +> 私たちは技術主導のフォーラムを創設し、知識の交流とアイデアの交換を促進することで、相互のインスピレーションと協力的なイノベーションを生み出すことを目指しています。 +> +> LobeChat の改善にご協力ください。製品設計のフィードバックやユーザー体験に関するディスカッションを直接お寄せください。 +> +> **プリンシパルメンテナー:** [@arvinxx](https://github.com/arvinxx) [@canisminor1990](https://github.com/canisminor1990) + +[![][pr-welcome-shield]][pr-welcome-link] +[![][submit-agents-shield]][submit-agents-link] +[![][submit-plugin-shield]][submit-plugin-link] + + + + + + + + + + + + + +
+


+
+ + + + + + + + + +
+ + + + +
+
+ +
+ +[![][back-to-top]](#readme-top) + +
+ +## ❤️ スポンサー + +あなたの一度きりの寄付が、私たちの銀河系で輝きを放ちます!皆様は流れ星であり、私たちの旅路に迅速かつ明るい影響を与えます。私たちを信じてくださり、ありがとうございます。皆様の寛大なお気持ちが、私たちの使命に向かって、一度に輝かしい閃光を放つよう導いてくださるのです。 + + + + + + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🔗 その他の製品 + +- **[🅰️ Lobe SD Theme][lobe-theme]:** Stable Diffusion WebUI のためのモダンなテーマ、絶妙なインターフェースデザイン、高度にカスタマイズ可能なUI、効率を高める機能。 +- **[⛵️ Lobe Midjourney WebUI][lobe-midjourney-webui]:** Midjourney の WebUI は、AI を活用しテキストプロンプトから豊富で多様な画像を素早く生成し、創造性を刺激して会話を盛り上げます。 +- **[🌏 Lobe i18n][lobe-i18n] :** Lobe i18n は ChatGPT を利用した国際化翻訳プロセスの自動化ツールです。大きなファイルの自動分割、増分更新、OpenAIモデル、APIプロキシ、温度のカスタマイズオプションなどの機能をサポートしています。 +- **[💌 Lobe Commit][lobe-commit]:** Lobe Commit は、Langchain/ChatGPT を活用して Gitmoji ベースのコミットメッセージを生成する CLI ツールです。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +--- + +

📝 License

+ +[![][fossa-license-shield]][fossa-license-link] + +
+ +Copyright © 2024 [LobeHub][profile-link].
+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 +[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html +[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk +[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template +[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway +[codecov-link]: https://codecov.io/gh/lobehub/lobe-chat +[codecov-shield]: https://img.shields.io/codecov/c/github/lobehub/lobe-chat?labelColor=black&style=flat-square&logo=codecov&logoColor=white +[codespaces-link]: https://codespaces.new/lobehub/lobe-chat +[codespaces-shield]: https://github.com/codespaces/badge.svg +[deploy-button-image]: https://vercel.com/button +[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat +[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg +[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat +[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg +[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI +[discord-link]: https://discord.gg/AYFPHvv2jT +[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square +[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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/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 +[docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers +[docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa +[docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image +[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://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 +[docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync +[docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama +[docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic +[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat +[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large +[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-chat/release.yml +[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square +[github-action-test-link]: https://github.com/actions/workflows/lobehub/lobe-chat/test.yml +[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-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/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 +[github-releasedate-link]: https://github.com/lobehub/lobe-chat/releases +[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square +[github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers +[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square +[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256 +[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 +[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551 +[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp +[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png +[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/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 +[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit +[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n +[lobe-icons-github]: https://github.com/lobehub/lobe-icons +[lobe-icons-link]: https://www.npmjs.com/package/@lobehub/icons +[lobe-icons-shield]: https://img.shields.io/npm/v/@lobehub/icons?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-lint-github]: https://github.com/lobehub/lobe-lint +[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint +[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-midjourney-webui]: https://github.com/lobehub/lobe-midjourney-webui +[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme +[lobe-tts-github]: https://github.com/lobehub/lobe-tts +[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts +[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[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 +[share-linkedin-link]: https://linkedin.com/feed +[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square +[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI +[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square +[share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square +[share-telegram-link]: https://t.me/share/url"?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square +[share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square +[share-whatsapp-link]: https://api.whatsapp.com/send?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI +[share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square +[share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square +[sponsor-link]: https://opencollective.com/lobehub 'Become ❤️ LobeHub Sponsor' +[sponsor-shield]: https://img.shields.io/badge/-Sponsor%20LobeHub-f04f88?logo=opencollective&logoColor=white&style=flat-square +[submit-agents-link]: https://github.com/lobehub/lobe-chat-agents +[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge +[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/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/DigitalHumanWeb/README.md b/DigitalHumanWeb/README.md new file mode 100644 index 0000000..b7c9a7c --- /dev/null +++ b/DigitalHumanWeb/README.md @@ -0,0 +1,830 @@ +
+ +[![][image-banner]][vercel-link] + +# Lobe Chat + +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) · [日本語](./README.ja-JP.md) · [Official Site][official-site] · [Changelog](./CHANGELOG.md) · [Documents][docs] · [Blog][blog] · [Feedback][github-issues-link] + + + +[![][github-release-shield]][github-release-link] +[![][docker-release-shield]][docker-release-link] +[![][vercel-shield]][vercel-link] +[![][discord-shield]][discord-link]
+[![][codecov-shield]][codecov-link] +[![][github-action-test-shield]][github-action-test-link] +[![][github-action-release-shield]][github-action-release-link] +[![][github-releasedate-shield]][github-releasedate-link]
+[![][github-contributors-shield]][github-contributors-link] +[![][github-forks-shield]][github-forks-link] +[![][github-stars-shield]][github-stars-link] +[![][github-issues-shield]][github-issues-link] +[![][github-license-shield]][github-license-link]
+[![][sponsor-shield]][sponsor-link] + +**Share LobeChat Repository** + +[![][share-x-shield]][share-x-link] +[![][share-telegram-shield]][share-telegram-link] +[![][share-whatsapp-shield]][share-whatsapp-link] +[![][share-reddit-shield]][share-reddit-link] +[![][share-weibo-shield]][share-weibo-link] +[![][share-mastodon-shield]][share-mastodon-link] +[![][share-linkedin-shield]][share-linkedin-link] + +Pioneering the new age of thinking and creating. Built for you, the Super Individual. + +[![][github-trending-shield]][github-trending-url] + +[![][image-overview]][vercel-link] + +
+ +
+Table of contents + +#### TOC + +- [👋🏻 Getting Started & Join Our Community](#-getting-started--join-our-community) +- [✨ Features](#-features) + - [`1` File Upload/Knowledge Base](#1-file-uploadknowledge-base) + - [`2` Multi-Model Service Provider Support](#2-multi-model-service-provider-support) + - [`3` Local Large Language Model (LLM) Support](#3-local-large-language-model-llm-support) + - [`4` Model Visual Recognition](#4-model-visual-recognition) + - [`5` TTS & STT Voice Conversation](#5-tts--stt-voice-conversation) + - [`6` Text to Image Generation](#6-text-to-image-generation) + - [`7` Plugin System (Function Calling)](#7-plugin-system-function-calling) + - [`8` Agent Market (GPTs)](#8-agent-market-gpts) + - [`9` Support Local / Remote Database](#9-support-local--remote-database) + - [`10` Support Multi-User Management](#10-support-multi-user-management) + - [`11` Progressive Web App (PWA)](#11-progressive-web-app-pwa) + - [`12` Mobile Device Adaptation](#12-mobile-device-adaptation) + - [`13` Custom Themes](#13-custom-themes) + - [`*` What's more](#-whats-more) +- [⚡️ Performance](#️-performance) +- [🛳 Self Hosting](#-self-hosting) + - [`A` Deploying with Vercel, Zeabur or Sealos](#a-deploying-with-vercel-zeabur-or-sealos) + - [`B` Deploying with Docker](#b-deploying-with-docker) + - [Environment Variable](#environment-variable) +- [📦 Ecosystem](#-ecosystem) +- [🧩 Plugins](#-plugins) +- [⌨️ Local Development](#️-local-development) +- [🤝 Contributing](#-contributing) +- [❤️ Sponsor](#️-sponsor) +- [🔗 More Products](#-more-products) + +#### + +
+ +
+ +## 👋🏻 Getting Started & Join Our Community + +We are a group of e/acc design-engineers, hoping to provide modern design components and tools for AIGC. +By adopting the Bootstrapping approach, we aim to provide developers and users with a more open, transparent, and user-friendly product ecosystem. + +Whether for users or professional developers, LobeHub will be your AI Agent playground. Please be aware that LobeChat is currently under active development, and feedback is welcome for any [issues][issues-link] encountered. + +| [![][vercel-shield-badge]][vercel-link] | No installation or registration necessary! Visit our website to experience it firsthand. | +| :---------------------------------------- | :----------------------------------------------------------------------------------------------------------------- | +| [![][discord-shield-badge]][discord-link] | Join our Discord community! This is where you can connect with developers and other enthusiastic users of LobeHub. | + +> \[!IMPORTANT] +> +> **Star Us**, You will receive all release notifications from GitHub without any delay \~ ⭐️ + +[![][image-star]][github-stars-link] + +
+ Star History + + + + +
+ +## ✨ Features + +[![][image-feat-knowledgebase]][docs-feat-knowledgebase] + +### `1` [File Upload/Knowledge Base][docs-feat-knowledgebase] + +LobeChat supports file upload and knowledge base functionality. You can upload various types of files including documents, images, audio, and video, as well as create knowledge bases, making it convenient for users to manage and search for files. Additionally, you can utilize files and knowledge base features during conversations, enabling a richer dialogue experience. + + + +> \[!TIP] +> +> Learn more on [📘 LobeChat Knowledge Base Launch — From Now On, Every Step Counts](https://lobehub.com/blog/knowledge-base) + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-privoder]][docs-feat-provider] + +### `2` [Multi-Model Service Provider Support][docs-feat-provider] + +In the continuous development of LobeChat, we deeply understand the importance of diversity in model service providers for meeting the needs of the community when providing AI conversation services. Therefore, we have expanded our support to multiple model service providers, rather than being limited to a single one, in order to offer users a more diverse and rich selection of conversations. + +In this way, LobeChat can more flexibly adapt to the needs of different users, while also providing developers with a wider range of choices. + +#### Supported Model Service Providers + +We have implemented support for the following model service providers: + +- **AWS Bedrock**: Integrated with AWS Bedrock service, supporting models such as **Claude / LLama2**, providing powerful natural language processing capabilities. [Learn more](https://aws.amazon.com/cn/bedrock) +- **Anthropic (Claude)**: Accessed Anthropic's **Claude** series models, including Claude 3 and Claude 2, with breakthroughs in multi-modal capabilities and extended context, setting a new industry benchmark. [Learn more](https://www.anthropic.com/claude) +- **Google AI (Gemini Pro, Gemini Vision)**: Access to Google's **Gemini** series models, including Gemini and Gemini Pro, to support advanced language understanding and generation. [Learn more](https://deepmind.google/technologies/gemini/) +- **Groq**: Accessed Groq's AI models, efficiently processing message sequences and generating responses, capable of multi-turn dialogues and single-interaction tasks. [Learn more](https://groq.com/) +- **OpenRouter**: Supports routing of models including **Claude 3**, **Gemma**, **Mistral**, **Llama2** and **Cohere**, with intelligent routing optimization to improve usage efficiency, open and flexible. [Learn more](https://openrouter.ai/) +- **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/) +- **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) +- **Novita AI**: Access **Llama**, **Mistral**, and other leading open-source models at cheapest prices. Engage in uncensored role-play, spark creative discussions, and foster unrestricted innovation. **Pay For What You Use.** [Learn more](https://novita.ai/llm-api?utm_source=lobechat&utm_medium=ch&utm_campaign=api) + +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). + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-local]][docs-feat-local] + +### `3` [Local Large Language Model (LLM) Support][docs-feat-local] + +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. + +> \[!TIP] +> +> Learn more about [📘 Using Ollama in LobeChat][docs-usage-ollama] by checking it out. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-vision]][docs-feat-vision] + +### `4` [Model Visual Recognition][docs-feat-vision] + +LobeChat now supports OpenAI's latest [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision) model with visual recognition capabilities, +a multimodal intelligence that can perceive visuals. Users can easily upload or drag and drop images into the dialogue box, +and the agent will be able to recognize the content of the images and engage in intelligent conversation based on this, +creating smarter and more diversified chat scenarios. + +This feature opens up new interactive methods, allowing communication to transcend text and include a wealth of visual elements. +Whether it's sharing images in daily use or interpreting images within specific industries, the agent provides an outstanding conversational experience. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-tts]][docs-feat-tts] + +### `5` [TTS & STT Voice Conversation][docs-feat-tts] + +LobeChat supports Text-to-Speech (TTS) and Speech-to-Text (STT) technologies, enabling our application to convert text messages into clear voice outputs, +allowing users to interact with our conversational agent as if they were talking to a real person. Users can choose from a variety of voices to pair with the agent. + +Moreover, TTS offers an excellent solution for those who prefer auditory learning or desire to receive information while busy. +In LobeChat, we have meticulously selected a range of high-quality voice options (OpenAI Audio, Microsoft Edge Speech) to meet the needs of users from different regions and cultural backgrounds. +Users can choose the voice that suits their personal preferences or specific scenarios, resulting in a personalized communication experience. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-t2i]][docs-feat-t2i] + +### `6` [Text to Image Generation][docs-feat-t2i] + +With support for the latest text-to-image generation technology, LobeChat now allows users to invoke image creation tools directly within conversations with the agent. By leveraging the capabilities of AI tools such as [`DALL-E 3`](https://openai.com/dall-e-3), [`MidJourney`](https://www.midjourney.com/), and [`Pollinations`](https://pollinations.ai/), the agents are now equipped to transform your ideas into images. + +This enables a more private and immersive creative process, allowing for the seamless integration of visual storytelling into your personal dialogue with the agent. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-plugin]][docs-feat-plugin] + +### `7` [Plugin System (Function Calling)][docs-feat-plugin] + +The plugin ecosystem of LobeChat is an important extension of its core functionality, greatly enhancing the practicality and flexibility of the LobeChat assistant. + + + +By utilizing plugins, LobeChat assistants can obtain and process real-time information, such as searching for web information and providing users with instant and relevant news. + +In addition, these plugins are not limited to news aggregation, but can also extend to other practical functions, such as quickly searching documents, generating images, obtaining data from various platforms like Bilibili, Steam, and interacting with various third-party services. + +> \[!TIP] +> +> Learn more about [📘 Plugin Usage][docs-usage-plugin] by checking it out. + + + +| Recent Submits | Description | +| ---------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | +| [Tongyi wanxiang Image Generator](https://chat-preview.lobehub.com/settings/agent)
By **YoungTx** on **2024-08-09** | This plugin uses Alibaba's Tongyi Wanxiang model to generate images based on text prompts.
`image` `tongyi` `wanxiang` | +| [Shopping tools](https://chat-preview.lobehub.com/settings/agent)
By **shoppingtools** on **2024-07-19** | Search for products on eBay & AliExpress, find eBay events & coupons. Get prompt examples.
`shopping` `e-bay` `ali-express` `coupons` | +| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)
By **savvytrader** on **2024-06-27** | Realtime stock, crypto and other investment data.
`stock` `analyze` | +| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | Search aggregation service, specifically designed for LLMs
`web` `search` | + +> 📊 Total plugins: [**50**](https://github.com/lobehub/lobe-chat-plugins) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-agent]][docs-feat-agent] + +### `8` [Agent Market (GPTs)][docs-feat-agent] + +In LobeChat Agent Marketplace, creators can discover a vibrant and innovative community that brings together a multitude of well-designed agents, +which not only play an important role in work scenarios but also offer great convenience in learning processes. +Our marketplace is not just a showcase platform but also a collaborative space. Here, everyone can contribute their wisdom and share the agents they have developed. + +> \[!TIP] +> +> By [🤖/🏪 Submit Agents][submit-agents-link], you can easily submit your agent creations to our platform. +> Importantly, LobeChat has established a sophisticated automated internationalization (i18n) workflow, +> capable of seamlessly translating your agent into multiple language versions. +> This means that no matter what language your users speak, they can experience your agent without barriers. + +> \[!IMPORTANT] +> +> We welcome all users to join this growing ecosystem and participate in the iteration and optimization of agents. +> Together, we can create more interesting, practical, and innovative agents, further enriching the diversity and practicality of the agent offerings. + + + +| Recent Submits | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [Contract Clause Refiner v1.0](https://chat-preview.lobehub.com/market?agent=business-contract)
By **[houhoufm](https://github.com/houhoufm)** on **2024-09-24** | Output: {Optimize contract clauses for professional and concise expression}
`contract-optimization` `legal-consultation` `copywriting` `terminology` `project-management` | +| [Meeting Assistant v1.0](https://chat-preview.lobehub.com/market?agent=meeting)
By **[houhoufm](https://github.com/houhoufm)** on **2024-09-24** | Professional meeting report assistant, distilling meeting key points into report sentences
`meeting-reports` `writing` `communication` `workflow` `professional-skills` | +| [Stable Album Cover Prompter](https://chat-preview.lobehub.com/market?agent=title-bpm-stimmung)
By **[MellowTrixX](https://github.com/MellowTrixX)** on **2024-09-24** | Professional graphic designer for front cover design specializing in creating visual concepts and designs for melodic techno music albums.
`album-cover` `prompt` `stable-diffusion` `cover-design` `cover-prompts` | +| [Advertising Copywriting Master](https://chat-preview.lobehub.com/market?agent=advertising-copywriting-master)
By **[leter](https://github.com/leter)** on **2024-09-23** | Specializing in product function analysis and advertising copywriting that resonates with user values
`advertising-copy` `user-values` `marketing-strategy` | + +> 📊 Total agents: [**392** ](https://github.com/lobehub/lobe-chat-agents) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-database]][docs-feat-database] + +### `9` [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] + +### `10` [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**](https://go.clerk.com/exgqLG0): 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] + +### `11` [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, +a modern web technology that elevates web applications to an experience close to that of native apps. + +Through PWA, LobeChat can offer a highly optimized user experience on both desktop and mobile devices while maintaining its lightweight and high-performance characteristics. +Visually and in terms of feel, we have also meticulously designed the interface to ensure it is indistinguishable from native apps, +providing smooth animations, responsive layouts, and adapting to different device screen resolutions. + +> \[!NOTE] +> +> If you are unfamiliar with the installation process of PWA, you can add LobeChat as your desktop application (also applicable to mobile devices) by following these steps: +> +> - Launch the Chrome or Edge browser on your computer. +> - Visit the LobeChat webpage. +> - In the upper right corner of the address bar, click on the Install icon. +> - Follow the instructions on the screen to complete the PWA Installation. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-mobile]][docs-feat-mobile] + +### `12` [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. + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-theme]][docs-feat-theme] + +### `13` [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. +Beyond switching theme modes, a range of color customization options allow users to adjust the application's theme colors according to their preferences. +Whether it's a desire for a sober dark blue, a lively peach pink, or a professional gray-white, users can find their style of color choices in LobeChat. + +> \[!TIP] +> +> The default configuration can intelligently recognize the user's system color mode and automatically switch themes to ensure a consistent visual experience with the operating system. +> For users who like to manually control details, LobeChat also offers intuitive setting options and a choice between chat bubble mode and document mode for conversation scenarios. + +
+ +[![][back-to-top]](#readme-top) + +
+ +### `*` What's more + +Beside these features, LobeChat also have much better basic technique underground: + +- [x] 💨 **Quick Deployment**: Using the Vercel platform or docker image, you can deploy with just one click and complete the process within 1 minute without any complex configuration. +- [x] 🌐 **Custom Domain**: If users have their own domain, they can bind it to the platform for quick access to the dialogue agent from anywhere. +- [x] 🔒 **Privacy Protection**: All data is stored locally in the user's browser, ensuring user privacy. +- [x] 💎 **Exquisite UI Design**: With a carefully designed interface, it offers an elegant appearance and smooth interaction. It supports light and dark themes and is mobile-friendly. PWA support provides a more native-like experience. +- [x] 🗣️ **Smooth Conversation Experience**: Fluid responses ensure a smooth conversation experience. It fully supports Markdown rendering, including code highlighting, LaTex formulas, Mermaid flowcharts, and more. + +> ✨ more features will be added when LobeChat evolve. + +--- + +> \[!NOTE] +> +> You can find our upcoming [Roadmap][github-project-link] plans in the Projects section. + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⚡️ Performance + +> \[!NOTE] +> +> The complete list of reports can be found in the [📘 Lighthouse Reports][docs-lighthouse] + +| Desktop | Mobile | +| :-----------------------------------------: | :----------------------------------------: | +| ![][chat-desktop] | ![][chat-mobile] | +| [📑 Lighthouse Report][chat-desktop-report] | [📑 Lighthouse Report][chat-mobile-report] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🛳 Self Hosting + +LobeChat provides Self-Hosted Version with Vercel and [Docker Image][docker-release-link]. This allows you to deploy your own chatbot within a few minutes without any prior knowledge. + +> \[!TIP] +> +> Learn more about [📘 Build your own LobeChat][docs-self-hosting] by checking it out. + +### `A` Deploying with Vercel, Zeabur or Sealos + +If you want to deploy this service yourself on either Vercel or Zeabur, you can follow these steps: + +- Prepare your [OpenAI API Key](https://platform.openai.com/account/api-keys). +- Click the button below to start deployment: Log in directly with your GitHub account, and remember to fill in the `OPENAI_API_KEY`(required) and `ACCESS_CODE` (recommended) on the environment variable section. +- After deployment, you can start using it. +- Bind a custom domain (optional): The DNS of the domain assigned by Vercel is polluted in some areas; binding a custom domain can connect directly. + +
+ +| Deploy with Vercel | Deploy with Zeabur | Deploy with Sealos | Deploy with RepoCloud | +| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------------: | +| [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] | [![][deploy-on-repocloud-button-image]][deploy-on-repocloud-link] | + +
+ +#### After Fork + +After fork, only retain the upstream sync action and disable other actions in your repository on GitHub. + +#### Keep Updated + +If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available." This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to detect updates accurately. + +> \[!TIP] +> +> We suggest you redeploy using the following steps, [📘 Auto Sync With Latest][docs-upstream-sync] + +
+ +### `B` Deploying with Docker + +[![][docker-release-shield]][docker-release-link] +[![][docker-size-shield]][docker-size-link] +[![][docker-pulls-shield]][docker-pulls-link] + +We provide a Docker image for deploying the LobeChat service on your own private device. Use the following command to start the LobeChat service: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!TIP] +> +> If you need to use the OpenAI service through a proxy, you can configure the proxy address using the `OPENAI_PROXY_URL` environment variable: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!NOTE] +> +> For detailed instructions on deploying with Docker, please refer to the [📘 Docker Deployment Guide][docs-docker] + +
+ +### Environment Variable + +This project provides some additional configuration items set with environment variables: + +| Environment Variable | Required | Description | Example | +| -------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `OPENAI_API_KEY` | Yes | This is the API key you apply on the OpenAI account page | `sk-xxxxxx...xxxxxx` | +| `OPENAI_PROXY_URL` | No | If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL | `https://api.chatanywhere.cn` or `https://aihubmix.com/v1`
The default value is
`https://api.openai.com/v1` | +| `ACCESS_CODE` | No | Add a password to access this service; you can set a long password to avoid leaking. If this value contains a comma, it is a password array. | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` | +| `OPENAI_MODEL_LIST` | No | Used to control the model list. Use `+` to add a model, `-` to hide a model, and `model_name=display_name` to customize the display name of a model, separated by commas. | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` | + +> \[!NOTE] +> +> The complete list of environment variables can be found in the [📘 Environment Variables][docs-env-var] + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 📦 Ecosystem + +| NPM | Repository | Description | Version | +| --------------------------------- | --------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------- | +| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | Open-source UI component library dedicated to building AIGC web applications. | [![][lobe-ui-shield]][lobe-ui-link] | +| [@lobehub/icons][lobe-icons-link] | [lobehub/lobe-icons][lobe-icons-github] | Popular AI / LLM Model Brand SVG Logo and Icon Collection. | [![][lobe-icons-shield]][lobe-icons-link] | +| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | High-quality & reliable TTS/STT React Hooks library | [![][lobe-tts-shield]][lobe-tts-link] | +| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | Configurations for ESlint, Stylelint, Commitlint, Prettier, Remark, and Semantic Release for LobeHub. | [![][lobe-lint-shield]][lobe-lint-link] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🧩 Plugins + +Plugins provide a means to extend the [Function Calling][docs-functionc-call] capabilities of LobeChat. They can be used to introduce new function calls and even new ways to render message results. If you are interested in plugin development, please refer to our [📘 Plugin Development Guide][docs-plugin-dev] in the Wiki. + +- [lobe-chat-plugins][lobe-chat-plugins]: This is the plugin index for LobeChat. It accesses index.json from this repository to display a list of available plugins for LobeChat to the user. +- [chat-plugin-template][chat-plugin-template]: This is the plugin template for LobeChat plugin development. +- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: The LobeChat Plugin SDK assists you in creating exceptional chat plugins for Lobe Chat. +- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: The LobeChat Plugins Gateway is a backend service that provides a gateway for LobeChat plugins. We deploy this service using Vercel. The primary API POST /api/v1/runner is deployed as an Edge Function. + +> \[!NOTE] +> +> The plugin system is currently undergoing major development. You can learn more in the following issues: +> +> - [x] [**Plugin Phase 1**](https://github.com/lobehub/lobe-chat/issues/73): Implement separation of the plugin from the main body, split the plugin into an independent repository for maintenance, and realize dynamic loading of the plugin. +> - [x] [**Plugin Phase 2**](https://github.com/lobehub/lobe-chat/issues/97): The security and stability of the plugin's use, more accurately presenting abnormal states, the maintainability of the plugin architecture, and developer-friendly. +> - [x] [**Plugin Phase 3**](https://github.com/lobehub/lobe-chat/issues/149): Higher-level and more comprehensive customization capabilities, support for plugin authentication, and examples. + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⌨️ Local Development + +You can use GitHub Codespaces for online development: + +[![][codespaces-shield]][codespaces-link] + +Or clone it for local development: + +```fish +$ git clone https://github.com/lobehub/lobe-chat.git +$ cd lobe-chat +$ pnpm install +$ pnpm dev +``` + +If you would like to learn more details, please feel free to look at our [📘 Development Guide][docs-dev-guide]. + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🤝 Contributing + +Contributions of all types are more than welcome; if you are interested in contributing code, feel free to check out our GitHub [Issues][github-issues-link] and [Projects][github-project-link] to get stuck in to show us what you’re made of. + +> \[!TIP] +> +> We are creating a technology-driven forum, fostering knowledge interaction and the exchange of ideas that may culminate in mutual inspiration and collaborative innovation. +> +> Help us make LobeChat better. Welcome to provide product design feedback, user experience discussions directly to us. +> +> **Principal Maintainers:** [@arvinxx](https://github.com/arvinxx) [@canisminor1990](https://github.com/canisminor1990) + +[![][pr-welcome-shield]][pr-welcome-link] +[![][submit-agents-shield]][submit-agents-link] +[![][submit-plugin-shield]][submit-plugin-link] + + + + + + + + + + + + + +
+


+
+ + + + + + + + + +
+ + + + +
+
+ +
+ +[![][back-to-top]](#readme-top) + +
+ +## ❤️ Sponsor + +Every bit counts and your one-time donation sparkles in our galaxy of support! You're a shooting star, making a swift and bright impact on our journey. Thank you for believing in us – your generosity guides us toward our mission, one brilliant flash at a time. + + + + + + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🔗 More Products + +- **[🅰️ Lobe SD Theme][lobe-theme]:** Modern theme for Stable Diffusion WebUI, exquisite interface design, highly customizable UI, and efficiency-boosting features. +- **[⛵️ Lobe Midjourney WebUI][lobe-midjourney-webui]:** WebUI for Midjourney, leverages AI to quickly generate a wide array of rich and diverse images from text prompts, sparking creativity and enhancing conversations. +- **[🌏 Lobe i18n][lobe-i18n] :** Lobe i18n is an automation tool for the i18n (internationalization) translation process, powered by ChatGPT. It supports features such as automatic splitting of large files, incremental updates, and customization options for the OpenAI model, API proxy, and temperature. +- **[💌 Lobe Commit][lobe-commit]:** Lobe Commit is a CLI tool that leverages Langchain/ChatGPT to generate Gitmoji-based commit messages. + +
+ +[![][back-to-top]](#readme-top) + +
+ +--- + +

📝 License

+ +[![][fossa-license-shield]][fossa-license-link] + +
+ +Copyright © 2024 [LobeHub][profile-link].
+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 +[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html +[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk +[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template +[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway +[codecov-link]: https://codecov.io/gh/lobehub/lobe-chat +[codecov-shield]: https://img.shields.io/codecov/c/github/lobehub/lobe-chat?labelColor=black&style=flat-square&logo=codecov&logoColor=white +[codespaces-link]: https://codespaces.new/lobehub/lobe-chat +[codespaces-shield]: https://github.com/codespaces/badge.svg +[deploy-button-image]: https://vercel.com/button +[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat +[deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg +[deploy-on-repocloud-link]: https://repocloud.io/details/?app_id=248 +[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg +[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat +[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg +[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI +[discord-link]: https://discord.gg/AYFPHvv2jT +[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square +[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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/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-knowledgebase]: https://lobehub.com/blog/knowledge-base +[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 +[docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers +[docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa +[docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image +[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://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 +[docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync +[docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama +[docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic +[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat +[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large +[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-chat/release.yml +[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square +[github-action-test-link]: https://github.com/actions/workflows/lobehub/lobe-chat/test.yml +[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-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/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 +[github-releasedate-link]: https://github.com/lobehub/lobe-chat/releases +[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square +[github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers +[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square +[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256 +[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-knowledgebase]: https://github.com/user-attachments/assets/77e58e1c-c82f-4341-b159-f4eeede9967f +[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 +[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551 +[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp +[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png +[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/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 +[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit +[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n +[lobe-icons-github]: https://github.com/lobehub/lobe-icons +[lobe-icons-link]: https://www.npmjs.com/package/@lobehub/icons +[lobe-icons-shield]: https://img.shields.io/npm/v/@lobehub/icons?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-lint-github]: https://github.com/lobehub/lobe-lint +[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint +[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-midjourney-webui]: https://github.com/lobehub/lobe-midjourney-webui +[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme +[lobe-tts-github]: https://github.com/lobehub/lobe-tts +[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts +[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[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 +[share-linkedin-link]: https://linkedin.com/feed +[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square +[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI +[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square +[share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square +[share-telegram-link]: https://t.me/share/url"?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square +[share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square +[share-whatsapp-link]: https://api.whatsapp.com/send?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI +[share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square +[share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square +[sponsor-link]: https://opencollective.com/lobehub 'Become ❤️ LobeHub Sponsor' +[sponsor-shield]: https://img.shields.io/badge/-Sponsor%20LobeHub-f04f88?logo=opencollective&logoColor=white&style=flat-square +[submit-agents-link]: https://github.com/lobehub/lobe-chat-agents +[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge +[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/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/DigitalHumanWeb/README.zh-CN.md b/DigitalHumanWeb/README.zh-CN.md new file mode 100644 index 0000000..95781a2 --- /dev/null +++ b/DigitalHumanWeb/README.zh-CN.md @@ -0,0 +1,849 @@ +
+ +[![][image-banner]][vercel-link] + +

Lobe Chat

+ +现代化设计的开源 ChatGPT/LLMs 聊天应用与开发框架
+支持语音合成、多模态、可扩展的([function call][docs-functionc-call])插件系统
+一键**免费**拥有你自己的 ChatGPT/Gemini/Claude/Ollama 应用 + +[English](./README.md) · **简体中文** · [日本語](./README.ja-JP.md) · [官网][official-site] · [更新日志](./CHANGELOG.md) · [文档][docs] · [博客][blog] · [反馈问题][github-issues-link] + + + +[![][github-release-shield]][github-release-link] +[![][docker-release-shield]][docker-release-link] +[![][vercel-shield]][vercel-link] +[![][discord-shield]][discord-link]
+[![][codecov-shield]][codecov-link] +[![][github-action-test-shield]][github-action-test-link] +[![][github-action-release-shield]][github-action-release-link] +[![][github-releasedate-shield]][github-releasedate-link]
+[![][github-contributors-shield]][github-contributors-link] +[![][github-forks-shield]][github-forks-link] +[![][github-stars-shield]][github-stars-link] +[![][github-issues-shield]][github-issues-link] +[![][github-license-shield]][github-license-link]
+[![][sponsor-shield]][sponsor-link] + +**分享 LobeChat 给你的好友** + +[![][share-x-shield]][share-x-link] +[![][share-telegram-shield]][share-telegram-link] +[![][share-whatsapp-shield]][share-whatsapp-link] +[![][share-reddit-shield]][share-reddit-link] +[![][share-weibo-shield]][share-weibo-link] +[![][share-mastodon-shield]][share-mastodon-link] + +探索私人生产力的未来。在个体崛起的时代中为你打造. + +[![][github-trending-shield]][github-trending-url] +[![][github-hello-shield]][github-hello-url] + +[![][image-overview]][vercel-link] + +
+ +
+目录树 + +#### TOC + +- [👋🏻 开始使用 & 交流](#-开始使用--交流) +- [✨ 特性一览](#-特性一览) + - [`1` 文件上传 / 知识库](#1-文件上传--知识库) + - [`2` 多模型服务商支持](#2-多模型服务商支持) + - [`3` 支持本地大语言模型 (LLM)](#3-支持本地大语言模型-llm) + - [`4` 模型视觉识别 (Model Visual)](#4-模型视觉识别-model-visual) + - [`5` TTS & STT 语音会话](#5-tts--stt-语音会话) + - [`6` Text to Image 文生图](#6-text-to-image-文生图) + - [`7` 插件系统 (Tools Calling)](#7-插件系统-tools-calling) + - [`8` 助手市场 (GPTs)](#8-助手市场-gpts) + - [`9` 支持本地 / 远程数据库](#9-支持本地--远程数据库) + - [`10` 支持多用户管理](#10-支持多用户管理) + - [`11` 渐进式 Web 应用 (PWA)](#11-渐进式-web-应用-pwa) + - [`12` 移动设备适配](#12-移动设备适配) + - [`13` 自定义主题](#13-自定义主题) + - [更多特性](#更多特性) +- [⚡️ 性能测试](#️-性能测试) +- [🛳 开箱即用](#-开箱即用) + - [`A` 使用 Vercel、Zeabur 或 Sealos 部署](#a-使用-vercelzeabur-或-sealos-部署) + - [`B` 使用 Docker 部署](#b-使用-docker-部署) + - [环境变量](#环境变量) + - [获取 OpenAI API Key](#获取-openai-api-key) +- [📦 生态系统](#-生态系统) +- [🧩 插件体系](#-插件体系) +- [⌨️ 本地开发](#️-本地开发) +- [🤝 参与贡献](#-参与贡献) +- [❤ 社区赞助](#-社区赞助) +- [🔗 更多工具](#-更多工具) + +#### + +
+ +
+ +## 👋🏻 开始使用 & 交流 + +我们是一群充满热情的设计工程师,希望为 AIGC 提供现代化的设计组件和工具,并以开源的方式分享。 +同时通过 Bootstrapping 的方式,我们希望能够为开发者和用户提供一个更加开放、更加透明友好的产品生态。 + +不论普通用户与专业开发者,LobeHub 旨在成为所有人的 AI Agent 实验场。LobeChat 目前正在积极开发中,有任何需求或者问题,欢迎提交 [issues][issues-link] + +| [![][vercel-shield-badge]][vercel-link] | 无需安装或注册!访问我们的网站,快速体验 | +| :---------------------------------------- | :--------------------------------------------------------------------------- | +| [![][discord-shield-badge]][discord-link] | 加入我们的 Discord 社区!这是你可以与开发者和其他 LobeHub 热衷用户交流的地方 | + +> \[!IMPORTANT] +> +> **收藏项目**,你将从 GitHub 上无延迟地接收所有发布通知~⭐️ + +[![][image-star]][github-stars-link] + +
Star History + + + + +
+ +## ✨ 特性一览 + +[![][image-feat-knowledgebase]][docs-feat-knowledgebase] + +### `1` [文件上传 / 知识库][docs-feat-knowledgebase] + +LobeChat 支持文件上传与知识库功能,你可以上传文件、图片、音频、视频等多种类型的文件,以及创建知识库,方便用户管理和查找文件。同时在对话中使用文件和知识库功能,实现更加丰富的对话体验。 + + + +> \[!TIP] +> +> 查阅 [📘 LobeChat 知识库上线 —— 此刻起,跬步千里](https://lobehub.com/zh/blog/knowledge-base) 了解详情。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-privoder]][docs-feat-provider] + +### `2` [多模型服务商支持][docs-feat-provider] + +在 LobeChat 的不断发展过程中,我们深刻理解到在提供 AI 会话服务时模型服务商的多样性对于满足社区需求的重要性。因此,我们不再局限于单一的模型服务商,而是拓展了对多种模型服务商的支持,以便为用户提供更为丰富和多样化的会话选择。 + +通过这种方式,LobeChat 能够更灵活地适应不同用户的需求,同时也为开发者提供了更为广泛的选择空间。 + +#### 已支持的模型服务商 + +我们已经实现了对以下模型服务商的支持: + +- **AWS Bedrock**:集成了 AWS Bedrock 服务,支持了 **Claude / LLama2** 等模型,提供了强大的自然语言处理能力。[了解更多](https://aws.amazon.com/cn/bedrock) +- **Google AI (Gemini Pro、Gemini Vision)**:接入了 Google 的 **Gemini** 系列模型,包括 Gemini 和 Gemini Pro,以支持更高级的语言理解和生成。[了解更多](https://deepmind.google/technologies/gemini/) +- **Anthropic (Claude)**:接入了 Anthropic 的 **Claude** 系列模型,包括 Claude 3 和 Claude 2,多模态突破,超长上下文,树立行业新基准。[了解更多](https://www.anthropic.com/claude) +- **ChatGLM**:加入了智谱的 **ChatGLM** 系列模型(GLM-4/GLM-4-vision/GLM-3-turbo),为用户提供了另一种高效的会话模型选择。[了解更多](https://www.zhipuai.cn/) +- **Moonshot AI (月之暗面)**:集成了 Moonshot 系列模型,这是一家来自中国的创新性 AI 创业公司,旨在提供更深层次的会话理解。[了解更多](https://www.moonshot.cn/) +- **Together.ai**:集成部署了数百种开源模型和向量模型,无需本地部署即可随时访问这些模型。[了解更多](https://www.together.ai/) +- **01.AI (零一万物)**:集成了零一万物模型,系列 API 具备较快的推理速度,这不仅缩短了处理时间,同时也保持了出色的模型效果。[了解更多](https://www.lingyiwanwu.com/) +- **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)。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-local]][docs-feat-local] + +### `3` [支持本地大语言模型 (LLM)][docs-feat-local] + +为了满足特定用户的需求,LobeChat 还基于 [Ollama](https://ollama.ai) 支持了本地模型的使用,让用户能够更灵活地使用自己的或第三方的模型。 + +> \[!TIP] +> +> 查阅 [📘 在 LobeChat 中使用 Ollama][docs-usage-ollama] 获得更多信息 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-vision]][docs-feat-vision] + +### `4` [模型视觉识别 (Model Visual)][docs-feat-vision] + +LobeChat 已经支持 OpenAI 最新的 [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision) 支持视觉识别的模型,这是一个具备视觉识别能力的多模态应用。 +用户可以轻松上传图片或者拖拽图片到对话框中,助手将能够识别图片内容,并在此基础上进行智能对话,构建更智能、更多元化的聊天场景。 + +这一特性打开了新的互动方式,使得交流不再局限于文字,而是可以涵盖丰富的视觉元素。无论是日常使用中的图片分享,还是在特定行业内的图像解读,助手都能提供出色的对话体验。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-tts]][docs-feat-tts] + +### `5` [TTS & STT 语音会话][docs-feat-tts] + +LobeChat 支持文字转语音(Text-to-Speech,TTS)和语音转文字(Speech-to-Text,STT)技术,这使得我们的应用能够将文本信息转化为清晰的语音输出,用户可以像与真人交谈一样与我们的对话助手进行交流。 +用户可以从多种声音中选择,给助手搭配合适的音源。 同时,对于那些倾向于听觉学习或者想要在忙碌中获取信息的用户来说,TTS 提供了一个极佳的解决方案。 + +在 LobeChat 中,我们精心挑选了一系列高品质的声音选项 (OpenAI Audio, Microsoft Edge Speech),以满足不同地域和文化背景用户的需求。用户可以根据个人喜好或者特定场景来选择合适的语音,从而获得个性化的交流体验。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-t2i]][docs-feat-t2i] + +### `6` [Text to Image 文生图][docs-feat-t2i] + +支持最新的文本到图片生成技术,LobeChat 现在能够让用户在与助手对话中直接调用文生图工具进行创作。 +通过利用 [`DALL-E 3`](https://openai.com/dall-e-3)、[`MidJourney`](https://www.midjourney.com/) 和 [`Pollinations`](https://pollinations.ai/) 等 AI 工具的能力, 助手们现在可以将你的想法转化为图像。 +同时可以更私密和沉浸式地完成你的创作过程。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-plugin]][docs-feat-plugin] + +### `7` [插件系统 (Tools Calling)][docs-feat-plugin] + +LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地增强了 ChatGPT 的实用性和灵活性。 + + + +通过利用插件,ChatGPT 能够实现实时信息的获取和处理,例如自动获取最新新闻头条,为用户提供即时且相关的资讯。 + +此外,这些插件不仅局限于新闻聚合,还可以扩展到其他实用的功能,如快速检索文档、生成图象、获取电商平台数据,以及其他各式各样的第三方服务。 + +> 通过文档了解更多 [📘 插件使用][docs-usage-plugin] + + + +| 最近新增 | 插件描述 | +| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | +| [通义万象图像生成器](https://chat-preview.lobehub.com/settings/agent)
By **YoungTx** on **2024-08-09** | 此插件使用阿里巴巴的通义万象模型根据文本提示生成图像。
`图像` `通义` `万象` | +| [购物工具](https://chat-preview.lobehub.com/settings/agent)
By **shoppingtools** on **2024-07-19** | 在 eBay 和 AliExpress 上搜索产品,查找 eBay 活动和优惠券。获取快速示例。
`购物` `e-bay` `ali-express` `优惠券` | +| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)
By **savvytrader** on **2024-06-27** | 实时股票、加密货币和其他投资数据。
`股票` `分析` | +| [Search1API](https://chat-preview.lobehub.com/settings/agent)
By **fatwang2** on **2024-05-06** | 搜索聚合服务,专为 LLMs 设计
`web` `search` | + +> 📊 Total plugins: [**50**](https://github.com/lobehub/lobe-chat-plugins) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-agent]][docs-feat-agent] + +### `8` [助手市场 (GPTs)][docs-feat-agent] + +在 LobeChat 的助手市场中,创作者们可以发现一个充满活力和创新的社区,它汇聚了众多精心设计的助手,这些助手不仅在工作场景中发挥着重要作用,也在学习过程中提供了极大的便利。 +我们的市场不仅是一个展示平台,更是一个协作的空间。在这里,每个人都可以贡献自己的智慧,分享个人开发的助手。 + +> \[!TIP] +> +> 通过 [🤖/🏪 提交助手][submit-agents-link] ,你可以轻松地将你的助手作品提交到我们的平台。我们特别强调的是,LobeChat 建立了一套精密的自动化国际化(i18n)工作流程, 它的强大之处在于能够无缝地将你的助手转化为多种语言版本。 +> 这意味着,不论你的用户使用何种语言,他们都能无障碍地体验到你的助手。 + +> \[!IMPORTANT] +> +> 我欢迎所有用户加入这个不断成长的生态系统,共同参与到助手的迭代与优化中来。共同创造出更多有趣、实用且具有创新性的助手,进一步丰富助手的多样性和实用性。 + + + +| 最近新增 | 助手说明 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| [合同条款精炼师 v1.0](https://chat-preview.lobehub.com/market?agent=business-contract)
By **[houhoufm](https://github.com/houhoufm)** on **2024-09-24** | 输出: {优化合同条款,专业简洁表达}
`合同优化` `法律咨询` `文案撰写` `专业术语` `项目管理` | +| [会议助手 v1.0](https://chat-preview.lobehub.com/market?agent=meeting)
By **[houhoufm](https://github.com/houhoufm)** on **2024-09-24** | 专业会议汇报助手,提炼会议要点成汇报句子
`会议汇报` `撰写` `沟通` `工作流程` `专业技能` | +| [稳定专辑封面提示生成器](https://chat-preview.lobehub.com/market?agent=title-bpm-stimmung)
By **[MellowTrixX](https://github.com/MellowTrixX)** on **2024-09-24** | 专业的平面设计师,专注于为旋律科技音乐专辑创建视觉概念和设计。
`专辑封面` `提示` `稳定扩散` `封面设计` `封面提示` | +| [广告文案创作大师](https://chat-preview.lobehub.com/market?agent=advertising-copywriting-master)
By **[leter](https://github.com/leter)** on **2024-09-23** | 擅长产品功能分析与用户价值观广告文案创作
`广告文案` `用户价值观` `营销策略` | + +> 📊 Total agents: [**392** ](https://github.com/lobehub/lobe-chat-agents) + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-database]][docs-feat-database] + +### `9` [支持本地 / 远程数据库][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] + +### `10` [支持多用户管理][docs-feat-auth] + +LobeChat 支持多用户管理,提供了两种主要的用户认证和管理方案,以满足不同需求: + +- **next-auth**:LobeChat 集成了 `next-auth`,一个灵活且强大的身份验证库,支持多种身份验证方式,包括 OAuth、邮件登录、凭证登录等。通过 `next-auth`,您可以轻松实现用户的注册、登录、会话管理以及社交登录等功能,确保用户数据的安全性和隐私性。 + +- [**Clerk**](https://go.clerk.com/exgqLG0):对于需要更高级用户管理功能的用户,LobeChat 还支持 `Clerk`,一个现代化的用户管理平台。`Clerk` 提供了更丰富的功能,如多因素认证 (MFA)、白名单、用户管理、登录活动监控等。通过 `Clerk`,您可以获得更高的安全性和灵活性,轻松应对生产级的用户管理需求。 + +您可以根据自己的需求,选择合适的用户管理方案。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-pwa]][docs-feat-pwa] + +### `11` [渐进式 Web 应用 (PWA)][docs-feat-pwa] + +我们深知在当今多设备环境下为用户提供无缝体验的重要性。为此,我们采用了渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术, +这是一种能够将网页应用提升至接近原生应用体验的现代 Web 技术。通过 PWA,LobeChat 能够在桌面和移动设备上提供高度优化的用户体验,同时保持轻量级和高性能的特点。 +在视觉和感觉上,我们也经过精心设计,以确保它的界面与原生应用无差别,提供流畅的动画、响应式布局和适配不同设备的屏幕分辨率。 + +> \[!NOTE] +> +> 若您未熟悉 PWA 的安装过程,您可以按照以下步骤将 LobeChat 添加为您的桌面应用(也适用于移动设备): +> +> - 在电脑上运行 Chrome 或 Edge 浏览器 . +> - 访问 LobeChat 网页 . +> - 在地址栏的右上角,单击 安装 图标 . +> - 根据屏幕上的指示完成 PWA 的安装 . + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-mobile]][docs-feat-mobile] + +### `12` [移动设备适配][docs-feat-mobile] + +针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +[![][image-feat-theme]][docs-feat-theme] + +### `13` [自定义主题][docs-feat-theme] + +作为设计工程师出身,LobeChat 在界面设计上充分考虑用户的个性化体验,因此引入了灵活多变的主题模式,其中包括日间的亮色模式和夜间的深色模式。 +除了主题模式的切换,还提供了一系列的颜色定制选项,允许用户根据自己的喜好来调整应用的主题色彩。无论是想要沉稳的深蓝,还是希望活泼的桃粉,或者是专业的灰白,用户都能够在 LobeChat 中找到匹配自己风格的颜色选择。 + +> \[!TIP] +> +> 默认配置能够智能地识别用户系统的颜色模式,自动进行主题切换,以确保应用界面与操作系统保持一致的视觉体验。对于喜欢手动调控细节的用户,LobeChat 同样提供了直观的设置选项,针对聊天场景也提供了对话气泡模式和文档模式的选择。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +### 更多特性 + +除了上述功能特性以外,LobeChat 所具有的设计和技术能力将为你带来更多使用保障: + +- [x] 💎 **精致 UI 设计**:经过精心设计的界面,具有优雅的外观和流畅的交互效果,支持亮暗色主题,适配移动端。支持 PWA,提供更加接近原生应用的体验。 +- [x] 🗣️ **流畅的对话体验**:流式响应带来流畅的对话体验,并且支持完整的 Markdown 渲染,包括代码高亮、LaTex 公式、Mermaid 流程图等。 +- [x] 💨 **快速部署**:使用 Vercel 平台或者我们的 Docker 镜像,只需点击一键部署按钮,即可在 1 分钟内完成部署,无需复杂的配置过程。 +- [x] 🔒 **隐私安全**:所有数据保存在用户浏览器本地,保证用户的隐私安全。 +- [x] 🌐 **自定义域名**:如果用户拥有自己的域名,可以将其绑定到平台上,方便在任何地方快速访问对话助手。 + +> ✨ 随着产品迭代持续更新,我们将会带来更多更多令人激动的功能! + +--- + +> \[!NOTE] +> +> 你可以在 Projects 中找到我们后续的 [Roadmap][github-project-link] 计划 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⚡️ 性能测试 + +> \[!NOTE] +> +> 完整测试报告可见 [📘 Lighthouse 性能测试][docs-lighthouse] + +| Desktop | Mobile | +| :-------------------------------------------: | :------------------------------------------: | +| ![][chat-desktop] | ![][chat-mobile] | +| [📑 Lighthouse 测试报告][chat-desktop-report] | [📑 Lighthouse 测试报告][chat-mobile-report] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🛳 开箱即用 + +LobeChat 提供了 Vercel 的 自托管版本 和 [Docker 镜像][docker-release-link],这使你可以在几分钟内构建自己的聊天机器人,无需任何基础知识。 + +> \[!TIP] +> +> 完整教程请查阅 [📘 构建属于自己的 Lobe Chat][docs-self-hosting] + +### `A` 使用 Vercel、Zeabur 或 Sealos 部署 + +如果想在 Vercel 或 Zeabur 上部署该服务,可以按照以下步骤进行操作: + +- 准备好你的 [OpenAI API Key](https://platform.openai.com/account/api-keys) 。 +- 点击下方按钮开始部署: 直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY` (必填) and `ACCESS_CODE`(推荐); +- 部署完毕后,即可开始使用; +- 绑定自定义域名(可选):Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。 + +
+ +| 使用 Vercel 部署 | 使用 Zeabur 部署 | 使用 Sealos 部署 | +| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | +| [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] | + +
+ +#### Fork 之后 + +在 Fork 后,请只保留 "upstream sync" Action 并在你 fork 的 GitHub Repo 中禁用其他 Action。 + +#### 保持更新 + +如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。 + +> \[!TIP] +> +> 我们建议按照 [📘 自动同步更新][docs-upstream-sync] 步骤重新部署。 + +
+ +### `B` 使用 Docker 部署 + +[![][docker-release-shield]][docker-release-link] +[![][docker-size-shield]][docker-size-link] +[![][docker-pulls-shield]][docker-pulls-link] + +我们提供了 Docker 镜像,供你在自己的私有设备上部署 LobeChat 服务。使用以下命令即可使用一键启动 LobeChat 服务: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!TIP] +> +> 如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +> \[!NOTE] +> +> 有关 Docker 部署的详细说明,详见 [📘 使用 Docker 部署][docs-docker] + +
+ +### 环境变量 + +本项目提供了一些额外的配置项,使用环境变量进行设置: + +| 环境变量 | 类型 | 描述 | 示例 | +| ------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` | +| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1`
默认值:
`https://api.openai.com/v1` | +| `ACCESS_CODE` | 可选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCTe)re_r74` or `rtrt_ewee3@09!` or `code1,code2,code3` | +| `OPENAI_MODEL_LIST` | 可选 | 用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名` 来自定义模型的展示名,用英文逗号隔开。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` | + +> \[!NOTE] +> +> 完整环境变量可见 [📘 环境变量][docs-env-var] + +
+ +### 获取 OpenAI API Key + +API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节以 OpenAI 模型服务商为例,简要介绍获取 API Key 的方式。 + +#### `A` 通过 OpenAI 官方渠道 + +- 注册一个 [OpenAI 账户](https://platform.openai.com/signup),你需要使用国际手机号、非大陆邮箱进行注册; +- 注册完毕后,前往 [API Keys](https://platform.openai.com/api-keys) 页面,点击 `Create new secret key` 创建新的 API Key: + +| 步骤 1:打开创建窗口 | 步骤 2:创建 API Key | 步骤 3:获取 API Key | +| -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| | | | + +- 将此 API Key 填写到 LobeChat 的 API Key 配置中,即可开始使用。 + +> \[!TIP] +> +> 账户注册后,一般有 5 美元的免费额度,但有效期只有三个月。 +> 如果你希望长期使用你的 API Key,你需要完成支付的信用卡绑定。由于 OpenAI 只支持外币信用卡,因此你需要找到合适的支付渠道,此处不再详细展开。 + +
+ +#### `B` 通过 OpenAI 第三方代理商 + +如果你发现注册 OpenAI 账户或者绑定外币信用卡比较麻烦,可以考虑借助一些知名的 OpenAI 第三方代理商来获取 API Key,这可以有效降低获取 OpenAI API Key 的门槛。但与此同时,一旦使用三方服务,你可能也需要承担潜在的风险, +请根据你自己的实际情况自行决策。以下是常见的第三方模型代理商列表,供你参考: + +| | 服务商 | 特性说明 | Proxy 代理地址 | 链接 | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------- | ------------------------- | ------------------------------- | +| | **AiHubMix** | 使用 OpenAI 企业接口,全站模型价格为官方 **86 折**(含 GPT-4 ) | `https://aihubmix.com/v1` | [获取](https://lobe.li/XHnZIUP) | + +> \[!WARNING] +> +> **免责申明**: 在此推荐的 OpenAI API Key 由第三方代理商提供,所以我们不对 API Key 的 **有效性** 和 **安全性** 负责,请你自行承担购买和使用 API Key 的风险。 + +> \[!NOTE] +> +> 如果你是模型服务商,并认为自己的服务足够稳定且价格实惠,欢迎联系我们,我们会在自行体验和测试后酌情推荐。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 📦 生态系统 + +| NPM | 仓库 | 描述 | 版本 | +| --------------------------------- | --------------------------------------- | ---------------------------------------------------------------------------------------- | ----------------------------------------- | +| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | 构建 AIGC 网页应用程序而设计的开源 UI 组件库 | [![][lobe-ui-shield]][lobe-ui-link] | +| [@lobehub/icons][lobe-icons-link] | [lobehub/lobe-icons][lobe-icons-github] | 主流 AI / LLM 模型和公司 SVG Logo 与 Icon 合集 | [![][lobe-icons-shield]][lobe-icons-link] | +| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | AI TTS / STT 语音合成 / 识别 React Hooks 库 | [![][lobe-tts-shield]][lobe-tts-link] | +| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeHub 代码样式规范 ESlint,Stylelint,Commitlint,Prettier,Remark 和 Semantic Release | [![][lobe-lint-shield]][lobe-lint-link] | + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🧩 插件体系 + +插件提供了扩展 LobeChat [Function Calling][docs-functionc-call] 能力的方法。可以用于引入新的 Function Calling,甚至是新的消息结果渲染方式。如果你对插件开发感兴趣,请在 Wiki 中查阅我们的 [📘 插件开发指引][docs-plugin-dev] 。 + +- [lobe-chat-plugins][lobe-chat-plugins]:插件索引从该仓库的 index.json 中获取插件列表并显示给用户。 +- [chat-plugin-template][chat-plugin-template]:插件开发模版,你可以通过项目模版快速新建插件项目。 +- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]:插件 SDK 可帮助您创建出色的 Lobe Chat 插件。 +- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]:插件网关是一个后端服务,作为 LobeChat 插件的网关。我们使用 Vercel 部署此服务。主要的 API POST /api/v1/runner 被部署为 Edge Function。 + +> \[!NOTE] +> +> 插件系统目前正在进行重大开发。您可以在以下 Issues 中了解更多信息: +> +> - [x] [**插件一期**](https://github.com/lobehub/lobe-chat/issues/73): 实现插件与主体分离,将插件拆分为独立仓库维护,并实现插件的动态加载 +> - [x] [**插件二期**](https://github.com/lobehub/lobe-chat/issues/97): 插件的安全性与使用的稳定性,更加精准地呈现异常状态,插件架构的可维护性与开发者友好 +> - [x] [**插件三期**](https://github.com/lobehub/lobe-chat/issues/149):更高阶与完善的自定义能力,支持插件鉴权与示例 + +
+ +[![][back-to-top]](#readme-top) + +
+ +## ⌨️ 本地开发 + +可以使用 GitHub Codespaces 进行在线开发: + +[![][codespaces-shield]][codespaces-link] + +或者使用以下命令进行本地开发: + +```fish +$ git clone https://github.com/lobehub/lobe-chat.git +$ cd lobe-chat +$ pnpm install +$ pnpm run dev +``` + +如果你希望了解更多详情,欢迎可以查阅我们的 [📘 开发指南][docs-dev-guide] + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🤝 参与贡献 + +我们非常欢迎各种形式的贡献。如果你对贡献代码感兴趣,可以查看我们的 GitHub [Issues][github-issues-link] 和 [Projects][github-project-link],大展身手,向我们展示你的奇思妙想。 + +> \[!TIP] +> +> 我们希望创建一个技术分享型社区,一个可以促进知识共享、想法交流,激发彼此鼓励和协作的环境。 +> 同时欢迎联系我们提供产品功能和使用体验反馈,帮助我们将 LobeChat 建设得更好。 +> +> **组织维护者:** [@arvinxx](https://github.com/arvinxx) [@canisminor1990](https://github.com/canisminor1990) + +[![][pr-welcome-shield]][pr-welcome-link] +[![][submit-agents-shield]][submit-agents-link] +[![][submit-plugin-shield]][submit-plugin-link] + + + + + + + + + + + + + +
+


+
+ + + + + + + + + +
+ + + + +
+
+ +
+ +[![][back-to-top]](#readme-top) + +
+ +## ❤ 社区赞助 + +每一分支持都珍贵无比,汇聚成我们支持的璀璨银河!你就像一颗划破夜空的流星,瞬间点亮我们前行的道路。感谢你对我们的信任 —— 你的支持笔就像星辰导航,一次又一次地为项目指明前进的光芒。 + + + + + + + + +
+ +[![][back-to-top]](#readme-top) + +
+ +## 🔗 更多工具 + +- **[🅰️ Lobe SD Theme][lobe-theme]:** Stable Diffusion WebUI 的现代主题,精致的界面设计,高度可定制的 UI,以及提高效率的功能。 +- **[⛵️ Lobe Midjourney WebUI][lobe-midjourney-webui]:** Midjourney WebUI, 能够根据文本提示快速生成丰富多样的图像,激发创造力,增强对话交流。 +- **[🌏 Lobe i18n][lobe-i18n]:** Lobe i18n 是一个由 ChatGPT 驱动的 i18n(国际化)翻译过程的自动化工具。它支持自动分割大文件、增量更新,以及为 OpenAI 模型、API 代理和温度提供定制选项的功能。 +- **[💌 Lobe Commit][lobe-commit]:** Lobe Commit 是一个 CLI 工具,它利用 Langchain/ChatGPT 生成基于 Gitmoji 的提交消息。 + +
+ +[![][back-to-top]](#readme-top) + +
+ +--- + +

📝 License

+ +[![][fossa-license-shield]][fossa-license-link] + +
+ +Copyright © 2023 [LobeHub][profile-link].
+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 +[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html +[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk +[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template +[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway +[codecov-link]: https://codecov.io/gh/lobehub/lobe-chat +[codecov-shield]: https://img.shields.io/codecov/c/github/lobehub/lobe-chat?labelColor=black&style=flat-square&logo=codecov&logoColor=white +[codespaces-link]: https://codespaces.new/lobehub/lobe-chat +[codespaces-shield]: https://github.com/codespaces/badge.svg +[deploy-button-image]: https://vercel.com/button +[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat +[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg +[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat +[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg +[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI +[discord-link]: https://discord.gg/AYFPHvv2jT +[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square +[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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-knowledgebase]: https://lobehub.com/blog/knowledge-base +[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 +[docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers +[docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa +[docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image +[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://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 +[docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync +[docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama +[docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic +[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat +[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large +[github-action-release-link]: https://github.com/lobehub/lobe-chat/actions/workflows/release.yml +[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square +[github-action-test-link]: https://github.com/lobehub/lobe-chat/actions/workflows/test.yml +[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-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-hello-shield]: https://abroad.hellogithub.com/v1/widgets/recommend.svg?rid=39701baf5a734cb894ec812248a5655a&claim_uid=HxYvFN34htJzGCD&theme=dark&theme=neutral&theme=dark&theme=neutral +[github-hello-url]: https://hellogithub.com/repository/39701baf5a734cb894ec812248a5655a +[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/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 +[github-releasedate-link]: https://github.com/lobehub/lobe-chat/releases +[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square +[github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers +[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square +[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256 +[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-knowledgebase]: https://github.com/user-attachments/assets/77e58e1c-c82f-4341-b159-f4eeede9967f +[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 +[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551 +[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp +[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png +[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/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 +[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit +[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n +[lobe-icons-github]: https://github.com/lobehub/lobe-icons +[lobe-icons-link]: https://www.npmjs.com/package/@lobehub/icons +[lobe-icons-shield]: https://img.shields.io/npm/v/@lobehub/icons?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-lint-github]: https://github.com/lobehub/lobe-lint +[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint +[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[lobe-midjourney-webui]: https://github.com/lobehub/lobe-midjourney-webui +[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme +[lobe-tts-github]: https://github.com/lobehub/lobe-tts +[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts +[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square +[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 +[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI +[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square +[share-reddit-link]: https://www.reddit.com/submit?title=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square +[share-telegram-link]: https://t.me/share/url"?text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square +[share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square +[share-whatsapp-link]: https://api.whatsapp.com/send?text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI +[share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square +[share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=%E6%8E%A8%E8%8D%90%E4%B8%80%E4%B8%AA%20GitHub%20%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE%20%F0%9F%A4%AF%20LobeChat%20-%20%E5%BC%80%E6%BA%90%E7%9A%84%E3%80%81%E5%8F%AF%E6%89%A9%E5%B1%95%E7%9A%84%EF%BC%88Function%20Calling%EF%BC%89%E9%AB%98%E6%80%A7%E8%83%BD%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA%E6%A1%86%E6%9E%B6%E3%80%82%0A%E5%AE%83%E6%94%AF%E6%8C%81%E4%B8%80%E9%94%AE%E5%85%8D%E8%B4%B9%E9%83%A8%E7%BD%B2%E7%A7%81%E4%BA%BA%20ChatGPT%2FLLM%20%E7%BD%91%E9%A1%B5%E5%BA%94%E7%94%A8%E7%A8%8B%E5%BA%8F&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat +[share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square +[sponsor-link]: https://opencollective.com/lobehub 'Become ❤ LobeHub Sponsor' +[sponsor-shield]: https://img.shields.io/badge/-Sponsor%20LobeHub-f04f88?logo=opencollective&logoColor=white&style=flat-square +[submit-agents-link]: https://github.com/lobehub/lobe-chat-agents +[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge +[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/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/DigitalHumanWeb/__mocks__/zustand/traditional.ts b/DigitalHumanWeb/__mocks__/zustand/traditional.ts new file mode 100644 index 0000000..262acd0 --- /dev/null +++ b/DigitalHumanWeb/__mocks__/zustand/traditional.ts @@ -0,0 +1,25 @@ +import { act } from 'react-dom/test-utils'; +import { beforeEach } from 'vitest'; +import { createWithEqualityFn as actualCreate } from 'zustand/traditional'; + +// a variable to hold reset functions for all stores declared in the app +const storeResetFns = new Set<() => void>(); + +// when creating a store, we get its initial state, create a reset function and add it in the set +const createImpl = (createState: any) => { + const store = actualCreate(createState, Object.is); + const initialState = store.getState(); + storeResetFns.add(() => store.setState(initialState, true)); + return store; +}; + +// Reset all stores after each test run +beforeEach(() => { + act(() => { + for (const resetFn of storeResetFns) { + resetFn(); + } + }); +}); + +export const createWithEqualityFn = (f: any) => (f === undefined ? createImpl : createImpl(f)); diff --git a/DigitalHumanWeb/codecov.yml b/DigitalHumanWeb/codecov.yml new file mode 100644 index 0000000..5fb59f6 --- /dev/null +++ b/DigitalHumanWeb/codecov.yml @@ -0,0 +1,11 @@ +coverage: + status: + project: + default: off + server: + flags: + - server + app: + flags: + - app + patch: off diff --git a/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.md b/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.md new file mode 100644 index 0000000..e531c49 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.md @@ -0,0 +1,193 @@ +# New Authentication Provider Guide + +LobeChat uses [Auth.js v5](https://authjs.dev/) as the external authentication service. Auth.js is an open-source authentication library that provides a simple way to implement authentication and authorization features. This document will introduce how to use Auth.js to implement a new authentication provider. + +### TOC + +- [Add New Authentication Provider](#add-new-authentication-provider) + - [Pre-requisites: Check the Official Provider List](#pre-requisites-check-the-official-provider-list) + - [Step 1: Add Authenticator Core Code](#step-1-add-authenticator-core-code) + - [Step 2: Update Server Configuration Code](#step-2-update-server-configuration-code) + - [Step 3: Change Frontend Pages](#step-3-change-frontend-pages) + - [Step 4: Configure the Environment Variables](#step-4-configure-the-environment-variables) + - [Step 5: Modify server-side user information processing logic](#step-5-modify-server-side-user-information-processing-logic) + +## Add New Authentication Provider + +To add a new authentication provider in LobeChat (for example, adding Okta), you need to follow the steps below: + +### Pre-requisites: Check the Official Provider List + +First, you need to check the [Auth.js Provider List](https://authjs.dev/reference/core/providers) to see if your provider is already supported. If yes, you can directly use the SDK provided by Auth.js to implement the authentication feature. + +Next, I will use [Okta](https://authjs.dev/reference/core/providers/okta) as an example to introduce how to add a new authentication provider. + +### Step 1: Add Authenticator Core Code + +Open the `src/app/api/auth/next-auth.ts` file and import `next-auth/providers/okta`. + +```ts +import { NextAuth } from 'next-auth'; +import Auth0 from 'next-auth/providers/auth0'; +import Okta from 'next-auth/providers/okta'; + +// Import Okta provider +``` + +Add the predefined server configuration. + +```ts +// Import server configuration +const { OKTA_CLIENT_ID, OKTA_CLIENT_SECRET, OKTA_ISSUER } = getServerConfig(); + +const nextAuth = NextAuth({ + providers: [ + // ... Other providers + + Okta({ + clientId: OKTA_CLIENT_ID, + clientSecret: OKTA_CLIENT_SECRET, + issuer: OKTA_ISSUER, + }), + ], +}); +``` + +### Step 2: Update Server Configuration Code + +Open the `src/config/server/app.ts` file and add Okta-related environment variables in the `getAppConfig` function. + +```ts +export const getAppConfig = () => { + // ... Other code + + return { + // ... Other environment variables + + OKTA_CLIENT_ID: process.env.OKTA_CLIENT_ID || '', + OKTA_CLIENT_SECRET: process.env.OKTA_CLIENT_SECRET || '', + OKTA_ISSUER: process.env.OKTA_ISSUER || '', + }; +}; +``` + +### Step 3: Change Frontend Pages + +Modify the `signIn` function parameter in `src/Features/Conversation/Error/OAuthForm.tsx` and \`src/app/settings/common/Common.tsx + +The default is `auth0`, which you can change to `okta` to switch to the Okta provider, or remove this parameter to support all added authentication services + +This value is the id of the Auth.js provider, and you can read the source code of the corresponding `next-auth/providers` module to read the default ID. + +### Step 4: Configure the Environment Variables + +Add `OKTA_CLIENT_ID`、`OKTA_CLIENT_SECRET`、`OKTA_ISSUER` environment variables when you deploy. + +### Step 5: Modify server-side user information processing logic + +#### Get user information in the frontend + +Use the `useOAuthSession()` method in the frontend page to get the user information `user` returned by the backend: + +```ts +import { useOAuthSession } from '@/hooks/useOAuthSession'; + +const { user, isOAuthLoggedIn } = useOAuthSession(); +``` + +The default type of `user` is `User`, and the type definition is: + +```ts +interface User { + id?: string; + name?: string | null; + email?: string | null; + image?: string | null; +} +``` + +#### Modify user `id` handling logic + +The `user.id` is used to identify users. When introducing a new OAuth identity provider, you need to handle the information carried in the OAuth callback in `src/app/api/auth/next-auth.ts`. You need to select the user's `id` from this information. Before that, we need to understand the data processing sequence of `Auth.js`: + +```txt +authorize --> jwt --> session +``` + +By default, in the `jwt --> session` process, `Auth.js` will [automatically assign the user `id` to `account.providerAccountId` based on the login type](https://authjs.dev/reference/core/types#provideraccountid). If you need to select a different value as the user `id`, you need to implement the following handling logic: + +```ts +callbacks: { + async jwt({ token, account, profile }) { + if (account) { + // You can select a different value from `account` or `profile` + token.userId = account.providerAccountId; + } + return token; + }, +}, +``` + +#### Customize `session` return + +If you want to carry more information about `profile` and `account` in the `session`, according to the data processing order mentioned above in `Auth.js`, you must first copy this information to the `token`. For example, add the user avatar URL `profile.picture` to the `session`: + +```diff + callbacks: { + async jwt({ token, profile, account }) { + if (profile && account) { + token.userId = account.providerAccountId; ++ token.avatar = profile.picture; + } + return token; + }, + async session({ session, token }) { + if (session.user) { + session.user.id = token.userId ?? session.user.id; ++ session.user.avatar = token.avatar; + } + return session; + }, + }, +``` + +Then supplement the type definition for the new parameters: + +```ts +declare module '@auth/core/jwt' { + interface JWT { + // ... + avatar?: string; + } +} + +declare module 'next-auth' { + interface User { + avatar?: string; + } +} +``` + +> [More built-in type extensions in Auth.js](https://authjs.dev/getting-started/typescript#module-augmentation) + +#### Differentiate multiple authentication providers in the processing logic + +If you have configured multiple authentication providers and their `userId` mappings are different, you can use the `account.provider` parameter in the `jwt` method to get the default id of the identity provider and enter different processing logic. + +```ts + callbacks: { + async jwt({ token, profile, account }) { + if (profile && account) { + if (account.provider === 'authing') + token.userId = account.providerAccountId ?? token.sub; + else if (acount.provider === 'auth0') + token.userId = profile.sub ?? token.sub; + else + // other providers + } + return token; + }, + } +``` + +Now, you can use Okta as your provider to implement the authentication feature in LobeChat. diff --git a/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.zh-CN.md new file mode 100644 index 0000000..20d31ea --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Add-New-Authentication-Providers.zh-CN.md @@ -0,0 +1,192 @@ +# 新身份验证方式开发指南 + +LobeChat 使用 [Auth.js v5](https://authjs.dev/) 作为外部身份验证服务。Auth.js 是一个开源的身份验证库,它提供了一种简单的方式来实现身份验证和授权功能。本文档将介绍如何使用 Auth.js 来实现新的身份验证方式。 + +### TOC + +- [添加新的身份验证提供者](#添加新的身份验证提供者) + - [准备工作:查阅官方的提供者列表](#准备工作查阅官方的提供者列表) + - [步骤 1: 新增关键代码](#步骤-1-新增关键代码) + - [步骤 2: 更新服务端配置代码](#步骤-2-更新服务端配置代码) + - [步骤 3: 修改前端页面](#步骤-3-修改前端页面) + - [步骤 4: 配置环境变量](#步骤-4-配置环境变量) + - [步骤 5: 修改服务端用户信息处理逻辑](#步骤-5-修改服务端用户信息处理逻辑) + +## 添加新的身份验证提供者 + +为了在 LobeChat 中添加新的身份验证提供者(例如添加 Okta),你需要完成以下步骤: + +### 准备工作:查阅官方的提供者列表 + +首先,你需要查阅 [Auth.js 提供者列表](https://authjs.dev/reference/core/providers) 来了解是否你的提供者已经被支持。如果你的提供者已经被支持,你可以直接使用 Auth.js 提供的 SDK 来实现身份验证功能。 + +接下来我会以 [Okta](https://authjs.dev/reference/core/providers/okta) 为例来介绍如何添加新的身份验证提供者 + +### 步骤 1: 新增关键代码 + +打开 `src/app/api/auth/next-auth.ts` 文件,引入 `next-auth/providers/okta` + +```ts +import { NextAuth } from 'next-auth'; +import Auth0 from 'next-auth/providers/auth0'; +import Okta from 'next-auth/providers/okta'; + +// 引入 Okta 提供者 +``` + +新增预定义的服务端配置 + +```ts +// 导入服务器配置 +const { OKTA_CLIENT_ID, OKTA_CLIENT_SECRET, OKTA_ISSUER } = getServerConfig(); + +const nextAuth = NextAuth({ + providers: [ + // ... 其他提供者 + + Okta({ + clientId: OKTA_CLIENT_ID, + clientSecret: OKTA_CLIENT_SECRET, + issuer: OKTA_ISSUER, + }), + ], +}); +``` + +### 步骤 2: 更新服务端配置代码 + +打开 `src/config/server/app.ts` 文件,在 `getAppConfig` 函数中新增 Okta 相关的环境变量 + +```ts +export const getAppConfig = () => { + // ... 其他代码 + + return { + // ... 其他环境变量 + + OKTA_CLIENT_ID: process.env.OKTA_CLIENT_ID || '', + OKTA_CLIENT_SECRET: process.env.OKTA_CLIENT_SECRET || '', + OKTA_ISSUER: process.env.OKTA_ISSUER || '', + }; +}; +``` + +### 步骤 3: 修改前端页面 + +修改在 `src/features/Conversation/Error/OAuthForm.tsx` 及 `src/app/settings/common/Common.tsx` 中的 `signIn` 函数参数 + +默认为 `auth0`,你可以将其修改为 `okta` 以切换到 Okta 提供者,或删除该参数以支持所有已添加的身份验证服务 + +该值为 Auth.js 提供者 的 id,你可以阅读相应的 `next-auth/providers` 模块源码以读取默认 ID + +### 步骤 4: 配置环境变量 + +在部署时新增 Okta 相关的环境变量 `OKTA_CLIENT_ID`、`OKTA_CLIENT_SECRET`、`OKTA_ISSUER`,并填入相应的值,即可使用 + +### 步骤 5: 修改服务端用户信息处理逻辑 + +#### 在前端获取用户信息 + +在前端页面中使用 `useOAuthSession()` 方法获取后端返回的用户信息 `user`: + +```ts +import { useOAuthSession } from '@/hooks/useOAuthSession'; + +const { user, isOAuthLoggedIn } = useOAuthSession(); +``` + +默认的 `user` 类型为 `User`,类型定义为: + +```ts +interface User { + id?: string; + name?: string | null; + email?: string | null; + image?: string | null; +} +``` + +#### 修改用户 `id` 处理逻辑 + +`user.id` 用于标识用户。当引入新身份 OAuth 提供者后,您需要在 `src/app/api/auth/next-auth.ts` 中处理 OAuth 回调所携带的信息。您需要从中选取用户的 `id`。在此之前,我们需要了解 `Auth.js` 的数据处理顺序: + +```txt +authorize --> jwt --> session +``` + +默认情况下,在 `jwt --> session` 过程中,`Auth.js` 会[自动根据登陆类型](https://authjs.dev/reference/core/types#provideraccountid)将用户 `id` 赋值到 `account.providerAccountId` 中。 如果您需要选取其他值作为用户 `id` ,您需要实现以下处理逻辑。 + +```ts + callbacks: { + async jwt({ token, account, profile }) { + if (account) { + // 您可以从 `account` 或 `profile` 中选取其他值 + token.userId = account.providerAccountId; + } + return token; + }, + }, +``` + +#### 自定义 `session` 返回 + +如果您想在 `session` 中携带更多关于 `profile` 及 `account` 的信息,根据上面提到的 `Auth.js` 数据处理顺序,那必须先将该信息复制到 `token` 上。 +示例:把用户头像 URL:`profile.picture` 添加到`session` 中: + +```diff + callbacks: { + async jwt({ token, profile, account }) { + if (profile && account) { + token.userId = account.providerAccountId; ++ token.avatar = profile.picture; + } + return token; + }, + async session({ session, token }) { + if (session.user) { + session.user.id = token.userId ?? session.user.id; ++ session.user.avatar = token.avatar; + } + return session; + }, + }, +``` + +然后补充对新增参数的类型定义: + +```ts +declare module '@auth/core/jwt' { + interface JWT { + // ... + avatar?: string; + } +} + +declare module 'next-auth' { + interface User { + avatar?: string; + } +} +``` + +> [更多`Auth.js`内置类型拓展](https://authjs.dev/getting-started/typescript#module-augmentation) + +#### 在处理逻辑中区分多个身份验证提供者 + +如果您配置了多个身份验证提供者,并且他们的 `userId` 映射各不相同,可以在 `jwt` 方法中的 `account.provider` 参数获取身份提供者的默认 id ,从而进入不同的处理逻辑。 + +```ts + callbacks: { + async jwt({ token, profile, account }) { + if (profile && account) { + if (account.provider === 'Authing') + token.userId = account.providerAccountId ?? token.sub; + else if (acount.provider === 'Okta') + token.userId = profile.sub ?? token.sub; + else + // other providers + } + return token; + }, + } +``` diff --git a/DigitalHumanWeb/contributing/Basic/Architecture.md b/DigitalHumanWeb/contributing/Basic/Architecture.md new file mode 100644 index 0000000..dd812bd --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Architecture.md @@ -0,0 +1,47 @@ +# Architecture Design + +LobeChat is an AI conversation application built on the Next.js framework, aiming to provide an AI productivity platform that enables users to interact with AI through natural language. The following is an overview of the architecture design of LobeChat: + +#### TOC + +- [Application Architecture Overview](#application-architecture-overview) +- [Frontend Architecture](#frontend-architecture) +- [Edge Runtime API](#edge-runtime-api) +- [Agents Market](#agents-market) +- [Plugin Market](#plugin-market) +- [Security and Performance Optimization](#security-and-performance-optimization) +- [Development and Deployment Process](#development-and-deployment-process) + +## Application Architecture Overview + +The overall architecture of LobeChat consists of the frontend, EdgeRuntime API, Agents Market, Plugin Market, and independent plugins. These components collaborate to provide a complete AI experience. + +## Frontend Architecture + +The frontend of LobeChat adopts the Next.js framework, leveraging its powerful server-side rendering (SSR) capability and routing functionality. The frontend utilizes a stack of technologies, including the antd component library, lobe-ui AIGC component library, zustand state management, swr request library, i18next internationalization library, and more. These technologies collectively support the functionality and features of LobeChat. + +The components in the frontend architecture include app, components, config, const, features, helpers, hooks, layout, locales, migrations, prompts, services, store, styles, types, and utils. Each component has specific responsibilities and collaborates with others to achieve different functionalities. + +## Edge Runtime API + +The Edge Runtime API is one of the core components of LobeChat, responsible for handling the core logic of AI conversations. It provides interaction interfaces with the AI engine, including natural language processing, intent recognition, and response generation. The EdgeRuntime API communicates with the frontend, receiving user input and returning corresponding responses. + +## Agents Market + +The Agents Market is a crucial part of LobeChat, providing various AI agents for different scenarios to handle specific tasks and domains. The Agents Market also offers functionality for discovering and uploading agents, allowing users to find agents created by others and easily share their own agents in the market. + +## Plugin Market + +The Plugin Market is another key component of LobeChat, offering various plugins to extend the functionality and features of LobeChat. Plugins can be independent functional modules or integrated with agents from the Agents Market. During conversations, the assistant automatically identifies user input, recognizes suitable plugins, and passes them to the corresponding plugins for processing and returns the results. + +## Security and Performance Optimization + +LobeChat's security strategy includes authentication and permission management. Users need to authenticate before using LobeChat, and operations are restricted based on the user's permissions. + +To optimize performance, LobeChat utilizes Next.js SSR functionality to achieve fast page loading and response times. Additionally, a series of performance optimization measures are implemented, including code splitting, caching, and resource compression. + +## Development and Deployment Process + +LobeChat's development process includes version control, testing, continuous integration, and continuous deployment. The development team uses version control systems for code management and conducts unit and integration testing to ensure code quality. Continuous integration and deployment processes ensure rapid delivery and deployment of code. + +The above is a brief introduction to the architecture design of LobeChat, detailing the responsibilities and collaboration of each component, as well as the impact of design decisions on application functionality and performance. diff --git a/DigitalHumanWeb/contributing/Basic/Architecture.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Architecture.zh-CN.md new file mode 100644 index 0000000..865a48c --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Architecture.zh-CN.md @@ -0,0 +1,47 @@ +# 架构设计 + +LobeChat 是一个基于 Next.js 框架构建的 AI 会话应用,旨在提供一个 AI 生产力平台,使用户能够与 AI 进行自然语言交互。以下是 LobeChat 的架构设计介稿: + +#### TOC + +- [应用架构概览](#应用架构概览) +- [前端架构](#前端架构) +- [Edge Runtime API](#edge-runtime-api) +- [Agents 市场](#agents-市场) +- [插件市场](#插件市场) +- [安全性和性能优化](#安全性和性能优化) +- [开发和部署流程](#开发和部署流程) + +## 应用架构概览 + +LobeChat 的整体架构由前端、EdgeRuntime API、Agents 市场、插件市场和独立插件组成。这些组件相互协作,以提供完整的 AI 体验。 + +## 前端架构 + +LobeChat 的前端采用 Next.js 框架,利用其强大的 SSR(服务器端渲染)能力和路由功能。前端使用了一系列技术栈,包括 antd 组件库和 lobe-ui AIGC 组件库、zustand 状态管理、swr 请求库、i18next 国际化库等。这些技术栈共同支持了 LobeChat 的功能和特性。 + +前端架构中的组件包括 app、components、config、const、features、helpers、hooks、layout、locales、migrations、prompts、services、store、styles、types 和 utils。每个组件都有特定的职责,并与其他组件协同工作,以实现不同的功能。 + +## Edge Runtime API + +Edge Runtime API 是 LobeChat 的核心组件之一,负责处理 AI 会话的核心逻辑。它提供了与 AI 引擎的交互接口,包括自然语言处理、意图识别和回复生成等。EdgeRuntime API 与前端进行通信,接收用户的输入并返回相应的回复。 + +## Agents 市场 + +Agents 市场是 LobeChat 的一个重要组成部分,它提供了各种不同场景的 AI Agent,用于处理特定的任务和领域。Agents 市场还提供了使用和上传 Agent 的功能,使用户能够发现其他人制作的 Agent ,也可以一键分享自己的 Agent 到市场上。 + +## 插件市场 + +插件市场是 LobeChat 的另一个关键组件,它提供了各种插件,用于扩展 LobeChat 的功能和特性。插件可以是独立的功能模块,也可以与 Agents 市场的 Agent 进行集成。在会话中,助手将自动识别用户的输入,并识别适合的插件并传递给相应的插件进行处理,并返回处理结果。 + +## 安全性和性能优化 + +LobeChat 的安全性策略包括身份验证和权限管理。用户需要进行身份验证后才能使用 LobeChat,同时根据用户的权限进行相应的操作限制。 + +为了优化性能,LobeChat 使用了 Next.js 的 SSR 功能,实现了快速的页面加载和响应时间。此外,还采用了一系列的性能优化措施,包括代码分割、缓存和资源压缩等。 + +## 开发和部署流程 + +LobeChat 的开发流程包括版本控制、测试、持续集成和持续部署。开发团队使用版本控制系统进行代码管理,并进行单元测试和集成测试以确保代码质量。持续集成和持续部署流程确保了代码的快速交付和部署。 + +以上是 LobeChat 的架构设计介绍简介,详细解释了各个组件的职责和协作方式,以及设计决策对应用功能和性能的影响。 diff --git a/DigitalHumanWeb/contributing/Basic/Chat-API.md b/DigitalHumanWeb/contributing/Basic/Chat-API.md new file mode 100644 index 0000000..682e714 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Chat-API.md @@ -0,0 +1,136 @@ +# Conversation API Implementation Logic + +The implementation of LobeChat's large model AI mainly relies on OpenAI's API, including the core conversation API on the backend and the integrated API on the frontend. Next, we will introduce the implementation approach and code for the backend and frontend separately. + +#### TOC + +- [Backend Implementation](#backend-implementation) + - [Core Conversation API](#core-conversation-api) + - [Conversation Result Processing](#conversation-result-processing) +- [Frontend Implementation](#frontend-implementation) + - [Frontend Integration](#frontend-integration) + - [Using Streaming to Get Results](#using-streaming-to-get-results) + +## Backend Implementation + +The following code removes authentication, error handling, and other logic, retaining only the core functionality logic. + +### Core Conversation API + +In the file `src/app/api/openai/chat/handler.ts`, we define a `POST` method, which first parses the payload data from the request (i.e., the conversation content sent by the client), and then retrieves the authorization information from the request. Then, we create an `openai` object and call the `createChatCompletion` method, which is responsible for sending the conversation request to OpenAI and returning the result. + +```ts +export const POST = async (req: Request) => { + const payload = await req.json(); + + const { apiKey, endpoint } = getOpenAIAuthFromRequest(req); + + const openai = createOpenai(apiKey, endpoint); + + return createChatCompletion({ openai, payload }); +}; +``` + +### Conversation Result Processing + +In the file `src/app/api/openai/chat/createChatCompletion.ts`, we define the `createChatCompletion` method, which first preprocesses the payload data, then calls OpenAI's `chat.completions.create` method to send the request, and uses the `OpenAIStream` from the [Vercel AI SDK](https://sdk.vercel.ai/docs) to convert the returned result into a streaming response. + +```ts +import { OpenAIStream, StreamingTextResponse } from 'ai'; + +export const createChatCompletion = async ({ payload, openai }: CreateChatCompletionOptions) => { + const { messages, ...params } = payload; + + const formatMessages = messages.map((m) => ({ + content: m.content, + name: m.name, + role: m.role, + })); + + const response = await openai.chat.completions.create( + { + messages: formatMessages, + ...params, + stream: true, + }, + { headers: { Accept: '*/*' } }, + ); + const stream = OpenAIStream(response); + return new StreamingTextResponse(stream); +}; +``` + +## Frontend Implementation + +### Frontend Integration + +In the `src/services/chatModel.ts` file, we define the `fetchChatModel` method, which first preprocesses the payload data, then sends a POST request to the `/chat` endpoint on the backend, and returns the request result. + +```ts +export const fetchChatModel = ( + { plugins: enabledPlugins, ...params }: Partial, + options?: FetchChatModelOptions, +) => { + const payload = merge( + { + model: initialLobeAgentConfig.model, + stream: true, + ...initialLobeAgentConfig.params, + }, + params, + ); + + const filterFunctions: ChatCompletionFunctions[] = pluginSelectors.enabledSchema(enabledPlugins)( + usePluginStore.getState(), + ); + + const functions = filterFunctions.length === 0 ? undefined : filterFunctions; + + return fetch(OPENAI_URLS.chat, { + body: JSON.stringify({ ...payload, functions }), + headers: createHeaderWithOpenAI({ 'Content-Type': 'application/json' }), + method: 'POST', + signal: options?.signal, + }); +}; +``` + +### Using Streaming to Get Results + +In the `src/utils/fetch.ts` file, we define the `fetchSSE` method, which uses a streaming approach to retrieve data. When a new data chunk is read, it calls the `onMessageHandle` callback function to process the data chunk, achieving a typewriter-like output effect. + +```ts +export const fetchSSE = async (fetchFn: () => Promise, options: FetchSSEOptions = {}) => { + const response = await fetchFn(); + + if (!response.ok) { + const chatMessageError = await getMessageError(response); + + options.onErrorHandle?.(chatMessageError); + return; + } + + const returnRes = response.clone(); + + const data = response.body; + + if (!data) return; + + const reader = data.getReader(); + const decoder = new TextDecoder(); + + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + done = doneReading; + const chunkValue = decoder.decode(value); + + options.onMessageHandle?.(chunkValue); + } + + return returnRes; +}; +``` + +The above is the core implementation of the LobeChat session API. With an understanding of these core codes, further expansion and optimization of LobeChat's AI functionality can be achieved. diff --git a/DigitalHumanWeb/contributing/Basic/Chat-API.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Chat-API.zh-CN.md new file mode 100644 index 0000000..498ae65 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Chat-API.zh-CN.md @@ -0,0 +1,174 @@ +# 会话 API 实现逻辑 + +LobeChat 的大模型 AI 实现主要依赖于 OpenAI 的 API,包括后端的核心会话 API 和前端的集成 API。接下来,我们将分别介绍后端和前端的实现思路和代码。 + +#### TOC + +- [后端实现](#后端实现) + - [核心会话 API](#核心会话-api) + - [会话结果处理](#会话结果处理) +- [前端实现](#前端实现) + - [前端集成](#前端集成) + - [使用流式获取结果](#使用流式获取结果) + +## 后端实现 + +以下代码中移除了鉴权、错误处理等逻辑,仅保留了核心的主要功能逻辑。 + +### 核心会话 API + +在 `src/app/api/openai/chat/route.ts` 中,定义了一个处理 POST 请求的方法,主要负责从请求体中提取 `OpenAIChatStreamPayload` 类型的 payload,并使用 `createBizOpenAI` 函数根据请求和模型信息创建 OpenAI 实例。随后,该方法调用 `createChatCompletion` 来处理实际的会话,并返回响应结果。如果创建 OpenAI 实例过程中出现错误,则直接返回错误响应。 + +```ts +export const POST = async (req: Request) => { + const payload = (await req.json()) as OpenAIChatStreamPayload; + + const openaiOrErrResponse = createBizOpenAI(req, payload.model); + + // if resOrOpenAI is a Response, it means there is an error,just return it + if (openaiOrErrResponse instanceof Response) return openaiOrErrResponse; + + return createChatCompletion({ openai: openaiOrErrResponse, payload }); +}; +``` + +### 会话结果处理 + +而在 `src/app/api/openai/chat/createChatCompletion.ts` 文件中,`createChatCompletion` 方法主要负责与 OpenAI API 进行交互,处理会话请求。它首先对 payload 中的消息进行预处理,然后通过 `openai.chat.completions.create` 方法发送 API 请求,并使用 `OpenAIStream` 将返回的响应转换为流式格式。如果在 API 调用过程中出现错误,方法将生成并处理相应的错误响应。 + +```ts +import { OpenAIStream, StreamingTextResponse } from 'ai'; + +export const createChatCompletion = async ({ payload, openai }: CreateChatCompletionOptions) => { + // 预处理消息 + const { messages, ...params } = payload; + // 发送 API 请求 + try { + const response = await openai.chat.completions.create( + { + messages, + ...params, + stream: true, + } as unknown as OpenAI.ChatCompletionCreateParamsStreaming, + { headers: { Accept: '*/*' } }, + ); + const stream = OpenAIStream(response); + return new StreamingTextResponse(stream); + } catch (error) { + // 检查错误是否为 OpenAI APIError + if (error instanceof OpenAI.APIError) { + let errorResult: any; + // 如果错误是 OpenAI APIError,那么会有一个 error 对象 + if (error.error) { + errorResult = error.error; + } else if (error.cause) { + errorResult = error.cause; + } + // 如果没有其他请求错误,错误对象是一个类似 Response 的对象 + else { + errorResult = { headers: error.headers, stack: error.stack, status: error.status }; + } + console.error(errorResult); + // 返回错误响应 + return createErrorResponse(ChatErrorType.OpenAIBizError, { + endpoint: openai.baseURL, + error: errorResult, + }); + } + console.error(error); + return createErrorResponse(ChatErrorType.InternalServerError, { + endpoint: openai.baseURL, + error: JSON.stringify(error), + }); + } +}; +``` + +## 前端实现 + +### 前端集成 + +在 `src/services/chat.ts` 文件中,我们定义了 `ChatService` 类。这个类提供了一些方法来处理与 OpenAI 聊天 API 的交互。 + +`createAssistantMessage` 方法用于创建一个新的助手消息。它接收一个包含插件、消息和其他参数的对象,以及一个可选的 `FetchOptions` 对象。这个方法会合并默认的代理配置和传入的参数,预处理消息和工具,然后调用 `getChatCompletion` 方法获取聊天完成任务。 + +`getChatCompletion` 方法用于获取聊天完成任务。它接收一个 `OpenAIChatStreamPayload` 对象和一个可选的 `FetchOptions` 对象。这个方法会合并默认的代理配置和传入的参数,然后发送 POST 请求到 OpenAI 的聊天 API。 + +`runPluginApi` 方法用于运行插件 API 并获取结果。它接收一个 `PluginRequestPayload` 对象和一个可选的 `FetchOptions` 对象。这个方法会从工具存储中获取状态,通过插件标识符获取插件设置和清单,然后发送 POST 请求到插件的网关 URL。 + +`fetchPresetTaskResult` 方法用于获取预设任务的结果。它使用 `fetchAIFactory` 工厂函数创建一个新的函数,这个函数接收一个聊天完成任务的参数,并返回一个 Promise。当 Promise 解析时,返回的结果是聊天完成任务的结果。 + +`processMessages` 方法用于处理聊天消息。它接收一个聊天消息数组,一个可选的模型名称,和一个可选的工具数组。这个方法会处理消息内容,将输入的 `messages` 数组映射为 `OpenAIChatMessage` 类型的数组,如果存在启用的工具,将工具的系统角色添加到系统消息中。 + +```ts +class ChatService { + // 创建一个新的助手消息 + createAssistantMessage(params: object, fetchOptions?: FetchOptions) { + // 实现细节... + } + + // 获取聊天完成任务 + getChatCompletion(payload: OpenAIChatStreamPayload, fetchOptions?: FetchOptions) { + // 实现细节... + } + + // 运行插件 API 并获取结果 + runPluginApi(payload: PluginRequestPayload, fetchOptions?: FetchOptions) { + // 实现细节... + } + + // 获取预设任务的结果 + fetchPresetTaskResult() { + // 实现细节... + } + + // 处理聊天消息 + processMessages(messages: ChatMessage[], modelName?: string, tools?: Tool[]) { + // 实现细节... + } +} +``` + +### 使用流式获取结果 + +在 `src/utils/fetch.ts` 文件中,我们定义了 `fetchSSE` 方法,该方法使用流式方法获取数据,当读取到新的数据块时,会调用 `onMessageHandle` 回调函数处理数据块,进而实现打字机输出效果。 + +```ts +export const fetchSSE = async (fetchFn: () => Promise, options: FetchSSEOptions = {}) => { + const response = await fetchFn(); + + // 如果不 ok 说明有请求错误 + if (!response.ok) { + const chatMessageError = await getMessageError(response); + + options.onErrorHandle?.(chatMessageError); + return; + } + + const returnRes = response.clone(); + + const data = response.body; + + if (!data) return; + let output = ''; + const reader = data.getReader(); + const decoder = new TextDecoder(); + + let done = false; + + while (!done) { + const { value, done: doneReading } = await reader.read(); + done = doneReading; + const chunkValue = decoder.decode(value, { stream: true }); + + output += chunkValue; + options.onMessageHandle?.(chunkValue); + } + + await options?.onFinish?.(output); + + return returnRes; +}; +``` + +以上就是 LobeChat 会话 API 的核心实现。在理解了这些核心代码的基础上,便可以进一步扩展和优化 LobeChat 的 AI 功能。 diff --git a/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.md b/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.md new file mode 100644 index 0000000..85ee16c --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.md @@ -0,0 +1,83 @@ +# Code Style and Contribution Guidelines + +Welcome to the Code Style and Contribution Guidelines for LobeChat. This guide will help you understand our code standards and contribution process, ensuring code consistency and smooth project progression. + +## TOC + +- [Code Style](#code-style) + - [ESLint](#eslint) + - [Prettier](#prettier) + - [remarklint](#remarklint) + - [stylelint](#stylelint) +- [Contribution Process](#contribution-process) + - [Gitmoji](#gitmoji) + - [Semantic Release](#semantic-release) + - [Commitlint](#commitlint) + - [How to Contribute](#how-to-contribute) + +## Code Style + +In LobeChat, we use the `@lobehub/lint` package to maintain a unified code style. This package incorporates configurations for `ESLint`, `Prettier`, `remarklint`, and `stylelint` to ensure that our JavaScript, Markdown, and CSS files adhere to the same coding standards. + +### ESLint + +We use ESLint to check for issues in our JavaScript code. You can find the `.eslintrc.js` file in the project's root directory, which contains our extensions and custom rules for the ESLint configuration of `@lobehub/lint`. + +To ensure your code aligns with the project's standards, run ESLint before committing your code. + +### Prettier + +Prettier is responsible for code formatting to maintain consistency. Our Prettier configuration can be found in `.prettierrc.js`, imported from `@lobehub/lint`. + +It's recommended to configure your editor to run Prettier automatically upon saving files or manually run it before committing. + +### remarklint + +For Markdown files, we use remarklint to ensure consistent document formatting. You can find the corresponding configuration file in the project. + +### stylelint + +We utilize stylelint to standardize the style of our CSS code. In the configuration file for stylelint, we have made some custom rule adjustments based on `@lobehub/lint` configuration. + +Ensure that your style code passes stylelint checks before committing. + +## Contribution Process + +LobeChat follows the gitmoji and semantic release as our code submission and release process. + +### Gitmoji + +When committing code, please use gitmoji to label your commit messages. This helps other contributors quickly understand the content and purpose of your submission. + +Gitmoji commit messages use specific emojis to represent the type or intent of the commit. Here's an example: + +``` +📝 Update README with contribution guidelines + +- Added section about code style preferences +- Included instructions for running tests +- Corrected typos and improved formatting +``` + +In this example, the 📝 emoji represents a documentation update. The commit message clearly describes the changes and provides specific details. + +### Semantic Release + +We use semantic release to automate version control and release processes. Ensure that your commit messages adhere to the semantic release specifications so that when the code is merged into the main branch, the system can automatically create a new version and release it. + +### Commitlint + +To ensure consistency in commit messages, we use `commitlint` to check the format of commit messages. You can find the relevant rules in the `.commitlintrc.js` configuration file. + +Before committing your code, ensure that your commit messages adhere to our standards. + +### How to Contribute + +1. Fork the project to your account. +2. Create a new branch for development. +3. After completing the development, ensure that your code passes the aforementioned code style checks. +4. Commit your changes and use appropriate gitmoji to label your commit message. +5. Create a Pull Request to the main branch of the original project. +6. Await code review and make necessary modifications based on feedback. + +Thank you for following these guidelines, as they help us maintain the quality and consistency of the project. We look forward to your contributions! diff --git a/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.zh-CN.md new file mode 100644 index 0000000..3e68199 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Contributing-Guidelines.zh-CN.md @@ -0,0 +1,85 @@ +# 代码风格与贡献指南 + +欢迎来到 LobeChat 的代码风格与贡献指南。本指南将帮助您理解我们的代码规范和贡献流程,确保代码的一致性和项目的顺利进行。 + +## TOC + +- [代码风格](#代码风格) + - [ESLint](#eslint) + - [Prettier](#prettier) + - [remarklint](#remarklint) + - [stylelint](#stylelint) +- [贡献流程](#贡献流程) + - [Gitmoji](#gitmoji) + - [Semantic Release](#semantic-release) + - [Commitlint](#commitlint) + - [如何贡献](#如何贡献) + +## 代码风格 + +在 LobeChat 中,我们使用 `@lobehub/lint` 程序包来统一代码风格。该程序包内置了 `ESLint`、`Prettier`、`remarklint` 和 `stylelint` 的配置,以确保我们的 JavaScript、Markdown 和 CSS 文件遵循相同的编码标准。 + +### ESLint + +我们的项目使用 ESLint 来检查 JavaScript 代码中的问题。您可以在项目根目录下找到 `.eslintrc.js` 文件,其中包含了我们对 `@lobehub/lint` 的 ESLint 配置的扩展和自定义规则。 + +为了与 Next.js 框架兼容,我们在配置中添加了 `plugin:@next/next/recommended`。此外,我们禁用了一些规则,以适应我们项目的特定需求。 + +请在提交代码前运行 ESLint,以确保您的代码符合项目规范。 + +### Prettier + +Prettier 负责代码格式化,以保证代码的一致性。您可以在 `.prettierrc.js` 中找到我们的 Prettier 配置,它是从 `@lobehub/lint` 导入的。 + +在保存文件时,建议您配置您的编辑器以自动运行 Prettier,或者在提交前手动运行它。 + +### remarklint + +对于 Markdown 文件,我们使用 remarklint 来确保文档格式的统一。您可以在项目中找到相应的配置文件。 + +### stylelint + +我们使用 stylelint 来规范 CSS 代码的风格。在 `stylelint` 的配置文件中,我们基于 `@lobehub/lint` 的配置进行了一些自定义规则的调整。 + +确保您的样式代码在提交前通过了 stylelint 的检查。 + +## 贡献流程 + +LobeChat 采用 gitmoji 和 semantic release 作为我们的代码提交和发布流程。 + +### Gitmoji + +在提交代码时,请使用 gitmoji 来标注您的提交信息。这有助于其他贡献者快速理解您提交的内容和目的。 + +Gitmoji commit messages 使用特定的 emoji 来表示提交的类型或意图。以下是一个示例: + +``` +📝 Update README with contribution guidelines + +- Added section about code style preferences +- Included instructions for running tests +- Corrected typos and improved formatting +``` + +在这个示例中,📝 emoji 代表了文档的更新。提交信息清晰地描述了更改的内容,提供了具体的细节。 + +### Semantic Release + +我们使用 semantic release 来自动化版本控制和发布流程。请确保您的提交信息遵循 semantic release 的规范,这样当代码合并到主分支后,系统就可以自动创建新的版本并发布。 + +### Commitlint + +为了确保提交信息的一致性,我们使用 `commitlint` 来检查提交信息格式。您可以在 `.commitlintrc.js` 配置文件中找到相关规则。 + +在您提交代码之前,请确保您的提交信息遵循我们的规范。 + +### 如何贡献 + +1. Fork 项目到您的账户。 +2. 创建一个新的分支进行开发。 +3. 开发完成后,确保您的代码通过了上述的代码风格检查。 +4. 提交您的更改,并使用合适的 gitmoji 标注您的提交信息。 +5. 创建一个 Pull Request 到原项目的主分支。 +6. 等待代码审查,并根据反馈进行必要的修改。 + +感谢您遵循这些指导原则,它们有助于我们维护项目的质量和一致性。我们期待您的贡献! diff --git a/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.md b/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.md new file mode 100644 index 0000000..81c5ef7 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.md @@ -0,0 +1,126 @@ +# How to Develop a New Feature + +LobeChat is built on the Next.js framework and uses TypeScript as the primary development language. When developing a new feature, we need to follow a certain development process to ensure the quality and stability of the code. The general process can be divided into the following five steps: + +1. Routing: Define routes (`src/app`). +2. Data Structure: Define data structures (`src/types`). +3. Business Logic Implementation: Zustand store (`src/store`). +4. Page Display: Write static components/pages (`src/app//features/.tsx`). +5. Function Binding: Bind the store with page triggers (`const [state, function] = useNewStore(s => [s.state, s.function])`). + +Taking the "Chat Messages" feature as an example, here are the brief steps to implement this feature: + +#### TOC + +- [1. Define Routes](#1-define-routes) +- [2. Define Data Structure](#2-define-data-structure) +- [3. Create Zustand Store](#3-create-zustand-store) +- [4. Create Page and Components](#4-create-page-and-components) +- [5. Function Binding](#5-function-binding) + +## 1. Define Routes + +In the `src/app` directory, we need to define a new route to host the "Chat Messages" page. Generally, we would create a new folder under `src/app`, for example, `chat`, and create a `page.tsx` file within this folder to export a React component as the main body of the page. + +```tsx +// src/app/chat/page.tsx +import ChatPage from './features/chat'; + +export default ChatPage; +``` + +## 2. Define Data Structure + +In the `src/types` directory, we need to define the data structure for "Chat Messages". For example, we create a `chat.ts` file and define the `ChatMessage` type within it: + +```ts +// src/types/chat.ts + +export type ChatMessage = { + id: string; + content: string; + timestamp: number; + sender: 'user' | 'bot'; +}; +``` + +## 3. Create Zustand Store + +In the `src/store` directory, we need to create a new Zustand Store to manage the state of "Chat Messages". For example, we create a `chatStore.ts` file and define a Zustand Store within it: + +```ts +// src/store/chatStore.ts +import create from 'zustand'; + +type ChatState = { + messages: ChatMessage[]; + addMessage: (message: ChatMessage) => void; +}; + +export const useChatStore = create((set) => ({ + messages: [], + addMessage: (message) => set((state) => ({ messages: [...state.messages, message] })), +})); +``` + +## 4. Create Page and Components + +In `src/app//features/.tsx`, we need to create a new page or component to display "Chat Messages". In this file, we can use the Zustand Store created earlier and Ant Design components to build the UI: + +```jsx +// src/features/chat/index.tsx +import { List, Typography } from 'antd'; +import { useChatStore } from 'src/store/chatStore'; + +const ChatPage = () => { + const messages = useChatStore((state) => state.messages); + + return ( + ( + + {message.content} + + )} + /> + ); +}; + +export default ChatPage; +``` + +## 5. Function Binding + +In a page or component, we need to bind the Zustand Store's state and methods to the UI. In the example above, we have already bound the `messages` state to the `dataSource` property of the list. Now, we also need a method to add new messages. We can define this method in the Zustand Store and then use it in the page or component: + +```jsx +import { Button } from 'antd'; + +const ChatPage = () => { + const messages = useChatStore((state) => state.messages); + const addMessage = useChatStore((state) => state.addMessage); + + const handleSend = () => { + addMessage({ id: '1', content: 'Hello, world!', timestamp: Date.now(), sender: 'user' }); + }; + + return ( + <> + ( + + {message.content} + + )} + /> + + + ); +}; + +export default ChatPage; +``` + +The above is the step to implement the "chat message" feature in LobeChat. Of course, in the actual development of LobeChat, the business requirements and scenarios faced in real situations are far more complex than the above demo. Please develop according to the actual situation. diff --git a/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.zh-CN.md new file mode 100644 index 0000000..4a4c411 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Feature-Development-Frontend.zh-CN.md @@ -0,0 +1,126 @@ +# 如何开发一个新功能:前端实现 + +LobeChat 基于 Next.js 框架构建,使用 TypeScript 作为主要开发语言。在开发新功能时,我们需要遵循一定的开发流程,以确保代码的质量和稳定性。大致的流程分为以下五步: + +1. 路由:定义路由 (`src/app`) +2. 数据结构: 定义数据结构 ( `src/types` ) +3. 业务功能实现: zustand store (`src/store`) +4. 页面展示:书写静态组件 / 页面 (`src/app//features/.tsx`) +5. 功能绑定:绑定 store 与页面的触发 (`const [state,function]= useNewStore(s=>[s.state,s.function])`) + +我们以 "会话消息" 功能为例,以下是实现这个功能的简要步骤: + +#### TOC + +- [1. 定义路由](#1-定义路由) +- [2. 定义数据结构](#2-定义数据结构) +- [3. 创建 Zustand Store](#3-创建-zustand-store) +- [4. 创建页面与组件](#4-创建页面与组件) +- [5. 功能绑定](#5-功能绑定) + +## 1. 定义路由 + +在 `src/app` 目录下,我们需要定义一个新的路由来承载 "会话消息" 页面。一般来说,我们会在 `src/app` 下创建一个新的文件夹,例如 `chat`,并且在这个文件夹中创建 `page.tsx`文件,在该文件中导出 React 组件作为页面的主体。 + +```tsx +// src/app/chat/page.tsx +import ChatPage from './features/chat'; + +export default ChatPage; +``` + +## 2. 定义数据结构 + +在 `src/types` 目录下,我们需要定义 "会话消息" 的数据结构。例如,我们创建一个 `chat.ts` 文件,并在其中定义 `ChatMessage` 类型: + +```ts +// src/types/chat.ts + +export type ChatMessage = { + id: string; + content: string; + timestamp: number; + sender: 'user' | 'bot'; +}; +``` + +## 3. 创建 Zustand Store + +在 `src/store` 目录下,我们需要创建一个新的 Zustand Store 来管理 "会话消息" 的状态。例如,我们创建一个 `chatStore.ts` 文件,并在其中定义一个 Zustand Store: + +```ts +// src/store/chatStore.ts +import create from 'zustand'; + +type ChatState = { + messages: ChatMessage[]; + addMessage: (message: ChatMessage) => void; +}; + +export const useChatStore = create((set) => ({ + messages: [], + addMessage: (message) => set((state) => ({ messages: [...state.messages, message] })), +})); +``` + +## 4. 创建页面与组件 + +在 `src/app//features/.tsx` 中,我们需要创建一个新的页面或组件来显示 "会话消息"。在这个文件中,我们可以使用上面创建的 Zustand Store,以及 Ant Design 的组件来构建 UI: + +```jsx +// src/features/chat/index.tsx +import { List, Typography } from 'antd'; +import { useChatStore } from 'src/store/chatStore'; + +const ChatPage = () => { + const messages = useChatStore((state) => state.messages); + + return ( + ( + + {message.content} + + )} + /> + ); +}; + +export default ChatPage; +``` + +## 5. 功能绑定 + +在页面或组件中,我们需要将 Zustand Store 的状态和方法绑定到 UI 上。在上面的示例中,我们已经将 `messages` 状态绑定到了列表的 `dataSource` 属性上。现在,我们还需要一个方法来添加新的消息。我们可以在 Zustand Store 中定义这个方法,然后在页面或组件中使用它: + +```jsx +import { Button } from 'antd'; + +const ChatPage = () => { + const messages = useChatStore((state) => state.messages); + const addMessage = useChatStore((state) => state.addMessage); + + const handleSend = () => { + addMessage({ id: '1', content: 'Hello, world!', timestamp: Date.now(), sender: 'user' }); + }; + + return ( + <> + ( + + {message.content} + + )} + /> + + + ); +}; + +export default ChatPage; +``` + +以上就是在 LobeChat 中实现 "会话消息" 功能的步骤。当然,在 LobeChat 的实际开发中,真实场景所面临的业务诉求和场景远比上述 demo 复杂,请根据实际情况进行开发。 diff --git a/DigitalHumanWeb/contributing/Basic/Feature-Development.md b/DigitalHumanWeb/contributing/Basic/Feature-Development.md new file mode 100644 index 0000000..a56bc88 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Feature-Development.md @@ -0,0 +1,713 @@ +# Complete Guide to LobeChat Feature Development + +This document aims to guide developers on how to develop a complete feature requirement in LobeChat. + +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](#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. 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. + +Define a new sessionGroup table in 3 steps: + +### 1. Establish Data Model Schema + +Define the data model of `DB_SessionGroup` in `src/database/schema/sessionGroup.ts`: + +```typescript +import { z } from 'zod'; + +export const DB_SessionGroupSchema = z.object({ + name: z.string(), + sort: z.number().optional(), +}); + +export type DB_SessionGroup = z.infer; +``` + +### 2. Create Database Indexes + +Since a new table needs to be added, an index needs to be added to the database schema for the `sessionGroup` table. + +Add `dbSchemaV4` in `src/database/core/schema.ts`: + +```diff +// ... previous implementations + +// ************************************** // +// ******* Version 3 - 2023-12-06 ******* // +// ************************************** // +// - Added `plugin` table + +export const dbSchemaV3 = { + ...dbSchemaV2, + plugins: + '&identifier, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt', +}; + ++ // ************************************** // ++ // ******* Version 4 - 2024-01-21 ******* // ++ // ************************************** // ++ // - Added `sessionGroup` table + ++ export const dbSchemaV4 = { ++ ...dbSchemaV3, ++ sessionGroups: '&id, name, sort, createdAt, updatedAt', ++ sessions: '&id, type, group, pinned, meta.title, meta.description, meta.tags, createdAt, updatedAt', +}; +``` + +> \[!Note] +> +> In addition to `sessionGroups`, the definition of `sessions` has also been modified here due to data migration. However, as this section only focuses on schema definition and does not delve into the implementation of data migration, please refer to section five for details. + +> \[!Important] +> +> If you are unfamiliar with the need to create indexes here and the syntax of schema definition, you may need to familiarize yourself with the basics of Dexie.js. You can refer to the [📘 Local Database](./Local-Database.zh-CN) section for relevant information. + +### 3. Add the sessionGroups Table to the Local DB + +Extend the local database class to include the new `sessionGroups` table: + +```diff + +import { dbSchemaV1, dbSchemaV2, dbSchemaV3, dbSchemaV4 } from './schemas'; + +interface LobeDBSchemaMap { + files: DB_File; + messages: DB_Message; + plugins: DB_Plugin; ++ sessionGroups: DB_SessionGroup; + sessions: DB_Session; + topics: DB_Topic; +} + +// Define a local DB +export class LocalDB extends Dexie { + public files: LobeDBTable<'files'>; + public sessions: LobeDBTable<'sessions'>; + public messages: LobeDBTable<'messages'>; + public topics: LobeDBTable<'topics'>; + public plugins: LobeDBTable<'plugins'>; ++ public sessionGroups: LobeDBTable<'sessionGroups'>; + + constructor() { + super(LOBE_CHAT_LOCAL_DB_NAME); + this.version(1).stores(dbSchemaV1); + this.version(2).stores(dbSchemaV2); + this.version(3).stores(dbSchemaV3); ++ this.version(4).stores(dbSchemaV4); + + this.files = this.table('files'); + this.sessions = this.table('sessions'); + this.messages = this.table('messages'); + this.topics = this.table('topics'); + this.plugins = this.table('plugins'); ++ this.sessionGroups = this.table('sessionGroups'); + } +} +``` + +As a result, you can now view the `sessionGroups` table in the `LOBE_CHAT_DB` in `Application` -> `Storage` -> `IndexedDB`. + +![](https://github.com/lobehub/lobe-chat/assets/28616219/aea50f66-4060-4a32-88c8-b3c672d05be8) + +## 2. Service Implementation / Model Implementation + +### Define Model + +When building the LobeChat application, the Model is responsible for interacting with the database. It defines how to read, insert, update, and delete data from the database, as well as defining specific business logic. + +In `src/database/model/sessionGroup.ts`, the `SessionGroupModel` is defined as follows: + +```typescript +import { BaseModel } from '@/database/client/core'; +import { DB_SessionGroup, DB_SessionGroupSchema } from '@/database/client/schemas/sessionGroup'; +import { nanoid } from '@/utils/uuid'; + +class _SessionGroupModel extends BaseModel { + constructor() { + super('sessions', DB_SessionGroupSchema); + } + + async create(name: string, sort?: number, id = nanoid()) { + return this._add({ name, sort }, id); + } + + // ... Implementation of other CRUD methods +} + +export const SessionGroupModel = new _SessionGroupModel(); +``` + +### Service Implementation + +In LobeChat, the Service layer is mainly responsible for communicating with the backend service, encapsulating business logic, and providing data to other layers in the frontend. `SessionService` is a service class specifically handling business logic related to sessions. It encapsulates operations such as creating sessions, querying sessions, and updating sessions. + +To maintain code maintainability and extensibility, we place the logic related to session grouping in the `SessionService`. This helps to keep the business logic of the session domain cohesive. When business requirements increase or change, it becomes easier to modify and extend within this domain. + +`SessionService` implements session group-related request logic by calling methods from `SessionGroupModel`. The following is the implementation of Session Group-related request logic in `sessionService`: + +```typescript +class SessionService { + // ... Omitted session business logic + + // ************************************** // + // *********** SessionGroup *********** // + // ************************************** // + + async createSessionGroup(name: string, sort?: number) { + const item = await SessionGroupModel.create(name, sort); + if (!item) { + throw new Error('session group create Error'); + } + + return item.id; + } + + // ... Other SessionGroup related implementations +} +``` + +## 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). + +### sessionGroup CRUD + +CRUD operations for session groups are the core behaviors for managing session group data. In `src/store/session/slice/sessionGroup`, we will implement the state logic related to session groups, including adding, deleting, updating session groups, and their sorting. + +The following are the methods of the `SessionGroupAction` interface that need to be implemented in the `action.ts` file: + +```ts +export interface SessionGroupAction { + // Add session group + addSessionGroup: (name: string) => Promise; + // Remove session group + removeSessionGroup: (id: string) => Promise; + // Update session group ID for a session + updateSessionGroupId: (sessionId: string, groupId: string) => Promise; + // Update session group name + updateSessionGroupName: (id: string, name: string) => Promise; + // Update session group sorting + updateSessionGroupSort: (items: SessionGroupItem[]) => Promise; +} +``` + +Taking the `addSessionGroup` method as an example, we first call the `createSessionGroup` method of `sessionService` to create a new session group, and then use the `refreshSessions` method to refresh the sessions state: + +```ts +export const createSessionGroupSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionGroupAction +> = (set, get) => ({ + // Implement the logic for adding a session group + addSessionGroup: async (name) => { + // Call the createSessionGroup method in the service layer and pass in the session group name + const id = await sessionService.createSessionGroup(name); + // Call the get method to get the current Store state and execute the refreshSessions method to refresh the session data + await get().refreshSessions(); + // Return the ID of the newly created session group + return id; + }, + // ... Other action implementations +}); +``` + +With the above implementation, we can ensure that after adding a new session group, the application's state will be updated in a timely manner, and the relevant components will receive the latest state and re-render. This approach improves the predictability and maintainability of the data flow, while also simplifying communication between components. + +### Sessions Group Logic Refactoring + +This requirement involves upgrading the Sessions feature to transform it from a single list to three different groups: `pinnedSessions` (pinned list), `customSessionGroups` (custom groups), and `defaultSessions` (default list). + +To handle these groups, we need to refactor the implementation logic of `useFetchSessions`. Here are the key changes: + +1. Use the `sessionService.getGroupedSessions` method to call the backend API and retrieve the grouped session data. +2. Save the retrieved data into three different state fields: `pinnedSessions`, `customSessionGroups`, and `defaultSessions`. + +#### `useFetchSessions` Method + +This method is defined in `createSessionSlice` as follows: + +```typescript +export const createSessionSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionAction +> = (set, get) => ({ + // ... other methods + useFetchSessions: () => + useSWR(FETCH_SESSIONS_KEY, sessionService.getGroupedSessions, { + onSuccess: (data) => { + set( + { + customSessionGroups: data.customGroup, + defaultSessions: data.default, + isSessionsFirstFetchFinished: true, + pinnedSessions: data.pinned, + sessions: data.all, + }, + false, + n('useFetchSessions/onSuccess', data), + ); + }, + }), +}); +``` + +After successfully retrieving the data, we use the `set` method to update the `customSessionGroups`, `defaultSessions`, `pinnedSessions`, and `sessions` states. This ensures that the states are synchronized with the latest session data. + +#### `sessionService.getGroupedSessions` Method + +The `sessionService.getGroupedSessions` method is responsible for calling the backend API `SessionModel.queryWithGroups()`. + +```typescript +class SessionService { + // ... other SessionGroup related implementations + + async getGroupedSessions(): Promise { + return SessionModel.queryWithGroups(); + } +} +``` + +#### `SessionModel.queryWithGroups` Method + +This method is the core method called by `sessionService.getGroupedSessions`, and it is responsible for querying and organizing session data. The code is as follows: + +```typescript +class _SessionModel extends BaseModel { + // ... other methods + + /** + * Query session data and categorize sessions based on groups. + * @returns {Promise} An object containing all sessions and categorized session lists. + */ + async queryWithGroups(): Promise { + // Query session group data + const groups = await SessionGroupModel.query(); + // Query custom session groups based on session group IDs + const customGroups = await this.queryByGroupIds(groups.map((item) => item.id)); + // Query default session list + const defaultItems = await this.querySessionsByGroupId(SessionDefaultGroup.Default); + // Query pinned sessions + const pinnedItems = await this.getPinnedSessions(); + + // Query all sessions + const all = await this.query(); + // Combine and return all sessions and their group information + return { + all, // Array containing all sessions + customGroup: groups.map((group) => ({ ...group, children: customGroups[group.id] })), // Custom groups + default: defaultItems, // Default session list + pinned: pinnedItems, // Pinned session list + }; + } +} +``` + +The `queryWithGroups` method first queries all session groups, then based on the IDs of these groups, it queries custom session groups, as well as default and pinned sessions. Finally, it returns an object containing all sessions and categorized session lists. + +### Adjusting sessions selectors + +Due to changes in the logic of grouping within sessions, we need to adjust the logic of the `sessions` selectors to ensure they can correctly handle the new data structure. + +Original selectors: + +```ts +// Default group +const defaultSessions = (s: SessionStore): LobeSessions => s.sessions; + +// Pinned group +const pinnedSessionList = (s: SessionStore) => + defaultSessions(s).filter((s) => s.group === SessionGroupDefaultKeys.Pinned); + +// Unpinned group +const unpinnedSessionList = (s: SessionStore) => + defaultSessions(s).filter((s) => s.group === SessionGroupDefaultKeys.Default); +``` + +Revised: + +```ts +const defaultSessions = (s: SessionStore): LobeSessions => s.defaultSessions; +const pinnedSessions = (s: SessionStore): LobeSessions => s.pinnedSessions; +const customSessionGroups = (s: SessionStore): CustomSessionGroup[] => s.customSessionGroups; +``` + +Since all data retrieval in the UI is implemented using syntax like `useSessionStore(sessionSelectors.defaultSessions)`, we only need to modify the selector implementation of `defaultSessions` to complete the data structure change. The data retrieval code in the UI layer does not need to be changed at all, which can greatly reduce the cost and risk of refactoring. + +> !\[Important] +> +> 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. + +## 4. UI Implementation and Action Binding + +Bind Store Action in the UI component to implement interactive logic, for example `CreateGroupModal`: + +```tsx +const CreateGroupModal = () => { + // ... Other logic + + const [updateSessionGroup, addCustomGroup] = useSessionStore((s) => [ + s.updateSessionGroupId, + s.addSessionGroup, + ]); + + return ( + { + // ... Other logic + const groupId = await addCustomGroup(name); + await updateSessionGroup(sessionId, groupId); + }} + > + {/* ... */} + + ); +}; +``` + +## 5. Data Migration + +In the process of software development, data migration is an inevitable issue, especially when the existing data structure cannot meet the new business requirements. For this iteration of SessionGroup, we need to handle the migration of the `group` field in the `session`, which is a typical data migration case. + +### Issues with the Old Data Structure + +In the old data structure, the `group` field was used to mark whether the session was "pinned" or belonged to a "default" group. However, when support for multiple session groups is needed, the original data structure becomes inflexible. + +For example: + +``` +before pin: group = abc +after pin: group = pinned +after unpin: group = default +``` + +From the above example, it can be seen that once a session is unpinned from the "pinned" state, the `group` field cannot be restored to its original `abc` value. This is because we do not have a separate field to maintain the pinned state. Therefore, we have introduced a new field `pinned` to indicate whether the session is pinned, while the `group` field will be used solely to identify the session group. + +### Migration Strategy + +The core logic of this migration is as follows: + +- When the user's `group` field is `pinned`, set their `pinned` field to `true`, and set the group to `default`. + +However, data migration in LobeChat typically involves two parts: **configuration file migration** and **database migration**. Therefore, the above logic will need to be implemented separately in these two areas. + +#### Configuration File Migration + +For configuration file migration, we recommend performing it before database migration, as configuration file migration is usually easier to test and validate. LobeChat's file migration configuration is located in the `src/migrations/index.ts` file, which defines the various versions of configuration file migration and their corresponding migration scripts. + +```diff +// Current latest version number +- export const CURRENT_CONFIG_VERSION = 2; ++ export const CURRENT_CONFIG_VERSION = 3; + +// Historical version upgrade module +const ConfigMigrations = [ ++ /** ++ * 2024.01.22 ++ * from `group = pinned` to `pinned:true` ++ */ ++ MigrationV2ToV3, + /** + * 2023.11.27 + * Migrate from single key database to dexie-based relational structure + */ + MigrationV1ToV2, + /** + * 2023.07.11 + * just the first version, Nothing to do + */ + MigrationV0ToV1, +]; +``` + +The logic for this configuration file migration is defined in `src/migrations/FromV2ToV3/index.ts`, simplified as follows: + +```ts +export class MigrationV2ToV3 implements Migration { + // Specify the version from which to upgrade + version = 2; + + migrate(data: MigrationData): MigrationData { + const { sessions } = data.state; + + return { + ...data, + state: { + ...data.state, + sessions: sessions.map((s) => this.migrateSession(s)), + }, + }; + } + + migrateSession = (session: V2Session): V3Session => { + return { + ...session, + group: 'default', + pinned: session.group === 'pinned', + }; + }; +} +``` + +It can be seen that the migration implementation is very simple. However, it is important to ensure the correctness of the migration, so corresponding test cases need to be written in `src/migrations/FromV2ToV3/migrations.test.ts`: + +```ts +import { MigrationData, VersionController } from '@/migrations/VersionController'; + +import { MigrationV1ToV2 } from '../FromV1ToV2'; +import inputV1Data from '../FromV1ToV2/fixtures/input-v1-session.json'; +import inputV2Data from './fixtures/input-v2-session.json'; +import outputV3DataFromV1 from './fixtures/output-v3-from-v1.json'; +import outputV3Data from './fixtures/output-v3.json'; +import { MigrationV2ToV3 } from './index'; + +describe('MigrationV2ToV3', () => { + let migrations; + let versionController: VersionController; + + beforeEach(() => { + migrations = [MigrationV2ToV3]; + versionController = new VersionController(migrations, 3); + }); + + it('should migrate data correctly through multiple versions', () => { + const data: MigrationData = inputV2Data; + + const migratedData = versionController.migrate(data); + + expect(migratedData.version).toEqual(outputV3Data.version); + expect(migratedData.state.sessions).toEqual(outputV3Data.state.sessions); + expect(migratedData.state.topics).toEqual(outputV3Data.state.topics); + expect(migratedData.state.messages).toEqual(outputV3Data.state.messages); + }); + + it('should work correct from v1 to v3', () => { + const data: MigrationData = inputV1Data; + + versionController = new VersionController([MigrationV2ToV3, MigrationV1ToV2], 3); + + const migratedData = versionController.migrate(data); + + expect(migratedData.version).toEqual(outputV3DataFromV1.version); + expect(migratedData.state.sessions).toEqual(outputV3DataFromV1.state.sessions); + expect(migratedData.state.topics).toEqual(outputV3DataFromV1.state.topics); + expect(migratedData.state.messages).toEqual(outputV3DataFromV1.state.messages); + }); +}); +``` + +```markdown + +``` + +Unit tests require the use of `fixtures` to fix the test data. The test cases include verification logic for two parts: 1) the correctness of a single migration (v2 -> v3) and 2) the correctness of a complete migration (v1 -> v3). + +> \[!Important] +> +> The version number in the configuration file may not match the database version number, as database version updates do not always involve changes to the data structure (such as adding tables or fields), while configuration file version updates usually involve data migration. + +```` + +#### Database Migration + +Database migration needs to be implemented in the `LocalDB` class, which is defined in the `src/database/core/db.ts` file. The migration process involves adding a new `pinned` field for each record in the `sessions` table and resetting the `group` field: + +```diff +export class LocalDB extends Dexie { + public files: LobeDBTable<'files'>; + public sessions: LobeDBTable<'sessions'>; + public messages: LobeDBTable<'messages'>; + public topics: LobeDBTable<'topics'>; + public plugins: LobeDBTable<'plugins'>; + public sessionGroups: LobeDBTable<'sessionGroups'>; + + constructor() { + super(LOBE_CHAT_LOCAL_DB_NAME); + this.version(1).stores(dbSchemaV1); + this.version(2).stores(dbSchemaV2); + this.version(3).stores(dbSchemaV3); + this.version(4) + .stores(dbSchemaV4) ++ .upgrade((trans) => this.upgradeToV4(trans)); + + this.files = this.table('files'); + this.sessions = this.table('sessions'); + this.messages = this.table('messages'); + this.topics = this.table('topics'); + this.plugins = this.table('plugins'); + this.sessionGroups = this.table('sessionGroups'); + } + ++ /** ++ * 2024.01.22 ++ * ++ * DB V3 to V4 ++ * from `group = pinned` to `pinned:true` ++ */ ++ upgradeToV4 = async (trans: Transaction) => { ++ const sessions = trans.table('sessions'); ++ await sessions.toCollection().modify((session) => { ++ // translate boolean to number ++ session.pinned = session.group === 'pinned' ? 1 : 0; + session.group = 'default'; + }); ++ }; +} +```` + +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. + +## 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. + +The core implementation of data import and export is in the `ConfigService` in `src/service/config.ts`, with key methods as follows: + +| Method Name | Description | +| --------------------- | -------------------------- | +| `importConfigState` | Import configuration data | +| `exportAgents` | Export all agent data | +| `exportSessions` | Export all session data | +| `exportSingleSession` | Export single session data | +| `exportSingleAgent` | Export single agent data | +| `exportSettings` | Export settings data | +| `exportAll` | Export all data | + +### Data Export + +In LobeChat, when a user chooses to export data, the current session, topic, message, and settings data are packaged into a JSON file and provided for download. The standard structure of this JSON file is as follows: + +```json +{ + "exportType": "sessions", + "state": { + "sessions": [], + "topics": [], + "messages": [] + }, + "version": 3 +} +``` + +Where: + +- `exportType`: Identifies the type of data being exported, currently including `sessions`, `agent`, `settings`, and `all`. +- `state`: Stores the actual data, with different data types for different `exportType`. +- `version`: Indicates the data version. + +In the implementation of the Session Group feature, we need to add `sessionGroups` data to the `state` field. This way, when users export data, their Session Group data will also be included. + +For example, when exporting sessions, the relevant implementation code modification is as follows: + +```diff +class ConfigService { + // ... Other code omitted + + exportSessions = async () => { + const sessions = await sessionService.getAllSessions(); ++ const sessionGroups = await sessionService.getSessionGroups(); + const messages = await messageService.getAllMessages(); + const topics = await topicService.getAllTopics(); + +- const config = createConfigFile('sessions', { messages, sessions, topics }); ++ const config = createConfigFile('sessions', { messages, sessionGroups, sessions, topics }); + + exportConfigFile(config, 'sessions'); + }; +} +``` + +### Data Import + +The data import functionality is implemented through `ConfigService.importConfigState`. When users choose to import data, they need to provide a JSON file that conforms to the above structure specification. The `importConfigState` method accepts the data of the configuration file and imports it into the application. + +In the implementation of the Session Group feature, we need to handle the `sessionGroups` data during the data import process. This way, when users import data, their Session Group data will also be imported correctly. + +The following is the modified code for the import implementation in `importConfigState`: + +```diff +class ConfigService { + // ... Other code omitted + ++ importSessionGroups = async (sessionGroups: SessionGroupItem[]) => { ++ return sessionService.batchCreateSessionGroups(sessionGroups); ++ }; + + importConfigState = async (config: ConfigFile): Promise => { + switch (config.exportType) { + case 'settings': { + await this.importSettings(config.state.settings); + + break; + } + + case 'agents': { ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const data = await this.importSessions(config.state.sessions); + return { ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(data), + }; + } + + case 'all': { + await this.importSettings(config.state.settings); + ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const [sessions, messages, topics] = await Promise.all([ + this.importSessions(config.state.sessions), + this.importMessages(config.state.messages), + this.importTopics(config.state.topics), + ]); + + return { + messages: this.mapImportResult(messages), ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(sessions), + topics: this.mapImportResult(topics), + }; + } + + case 'sessions': { ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const [sessions, messages, topics] = await Promise.all([ + this.importSessions(config.state.sessions), + this.importMessages(config.state.messages), + this.importTopics(config.state.topics), + ]); + + return { + messages: this.mapImportResult(messages), ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(sessions), + topics: this.mapImportResult(topics), + }; + } + } + }; +} +``` + +One key point of the above modification is to import sessionGroup first, because if sessions are imported first and the corresponding SessionGroup Id is not found in the current database, the group of this session will default to be modified to the default value. This will prevent the correct association of the sessionGroup's ID with the session. + +This is the implementation of the LobeChat Session Group feature in the data import and export process. This approach ensures that users' Session Group data is correctly handled during the import and export process. + +## Summary + +The above is the complete implementation process of the LobeChat Session Group feature. Developers can refer to this document for the development and testing of related functionalities. diff --git a/DigitalHumanWeb/contributing/Basic/Feature-Development.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Feature-Development.zh-CN.md new file mode 100644 index 0000000..643eda5 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Feature-Development.zh-CN.md @@ -0,0 +1,707 @@ +# LobeChat 功能开发完全指南 + +本文档旨在指导开发者了解如何在 LobeChat 中开发一块完整的功能需求。 + +我们将以 sessionGroup 的实现为示例:[✨ feat: add session group manager](https://github.com/lobehub/lobe-chat/pull/1055) , 通过以下六个主要部分来阐述完整的实现流程: + +1. [数据模型 / 数据库定义](#一数据模型--数据库定义) +2. [Service 实现 / Model 实现](#二service-实现--model-实现) +3. [前端数据流 Store 实现](#三前端数据流-store-实现) +4. [UI 实现与 action 绑定](#四ui-实现与-action-绑定) +5. [数据迁移](#五数据迁移) +6. [数据导入导出](#六数据导入导出) + +## 一、数据模型 / 数据库定义 + +为了实现 Session Group 功能,首先需要在数据库层面定义相关的数据模型和索引。 + +定义一个新的 sessionGroup 表,分 3 步: + +### 1. 建立数据模型 schema + +在 `src/database/schema/sessionGroup.ts` 中定义 `DB_SessionGroup` 的数据模型: + +```typescript +import { z } from 'zod'; + +export const DB_SessionGroupSchema = z.object({ + name: z.string(), + sort: z.number().optional(), +}); + +export type DB_SessionGroup = z.infer; +``` + +### 2. 创建数据库索引 + +由于要新增一个表,所以需要在在数据库 Schema 中,为 `sessionGroup` 表添加索引。 + +在 `src/database/core/schema.ts` 中添加 `dbSchemaV4`: + +```diff +// ... 前面的一些实现 + +// ************************************** // +// ******* Version 3 - 2023-12-06 ******* // +// ************************************** // +// - Added `plugin` table + +export const dbSchemaV3 = { + ...dbSchemaV2, + plugins: + '&identifier, type, manifest.type, manifest.meta.title, manifest.meta.description, manifest.meta.author, createdAt, updatedAt', +}; + ++ // ************************************** // ++ // ******* Version 4 - 2024-01-21 ******* // ++ // ************************************** // ++ // - Added `sessionGroup` table + ++ export const dbSchemaV4 = { ++ ...dbSchemaV3, ++ sessionGroups: '&id, name, sort, createdAt, updatedAt', ++ sessions: '&id, type, group, pinned, meta.title, meta.description, meta.tags, createdAt, updatedAt', +}; +``` + +> \[!Note] +> +> 除了 `sessionGroups` 外,此处也修改了 `sessions` 的定义,原因是存在数据迁移的情况。但由于本节只关注 schema 定义,不展开数据迁移部分实现,详情可见第五节。 + +> \[!Important] +> +> 如果你不了解为何此处需要创建索引,以及不了解此处的 schema 的定义语法。你可能需要提前了解下 Dexie.js 相关的基础知识,可以查阅 [📘 本地数据库](./Local-Database.zh-CN) 部分了解相关内容。 + +### 3. 在本地 DB 中加入 sessionGroups 表 + +扩展本地数据库类以包含新的 `sessionGroups` 表: + +```diff + +import { dbSchemaV1, dbSchemaV2, dbSchemaV3, dbSchemaV4 } from './schemas'; + +interface LobeDBSchemaMap { + files: DB_File; + messages: DB_Message; + plugins: DB_Plugin; ++ sessionGroups: DB_SessionGroup; + sessions: DB_Session; + topics: DB_Topic; +} + +// Define a local DB +export class LocalDB extends Dexie { + public files: LobeDBTable<'files'>; + public sessions: LobeDBTable<'sessions'>; + public messages: LobeDBTable<'messages'>; + public topics: LobeDBTable<'topics'>; + public plugins: LobeDBTable<'plugins'>; ++ public sessionGroups: LobeDBTable<'sessionGroups'>; + + constructor() { + super(LOBE_CHAT_LOCAL_DB_NAME); + this.version(1).stores(dbSchemaV1); + this.version(2).stores(dbSchemaV2); + this.version(3).stores(dbSchemaV3); ++ this.version(4).stores(dbSchemaV4); + + this.files = this.table('files'); + this.sessions = this.table('sessions'); + this.messages = this.table('messages'); + this.topics = this.table('topics'); + this.plugins = this.table('plugins'); ++ this.sessionGroups = this.table('sessionGroups'); + } +} +``` + +如此一来,你就可以通过在 `Application` -> `Storage` -> `IndexedDB` 中查看到 `LOBE_CHAT_DB` 里的 `sessionGroups` 表了。 + +![](https://github.com/lobehub/lobe-chat/assets/28616219/aea50f66-4060-4a32-88c8-b3c672d05be8) + +## 二、Service 实现 / Model 实现 + +### 定义 Model + +在构建 LobeChat 应用时,Model 负责与数据库的交互,它定义了如何读取、插入、更新和删除数据库的数据,定义具体的业务逻辑。 + +在 `src/database/model/sessionGroup.ts` 中定义 `SessionGroupModel`: + +```typescript +import { BaseModel } from '@/database/client/core'; +import { DB_SessionGroup, DB_SessionGroupSchema } from '@/database/client/schemas/sessionGroup'; +import { nanoid } from '@/utils/uuid'; + +class _SessionGroupModel extends BaseModel { + constructor() { + super('sessions', DB_SessionGroupSchema); + } + + async create(name: string, sort?: number, id = nanoid()) { + return this._add({ name, sort }, id); + } + + // ... 其他 CRUD 方法的实现 +} + +export const SessionGroupModel = new _SessionGroupModel(); +``` + +### Service 实现 + +在 LobeChat 中,Service 层主要负责与后端服务进行通信,封装业务逻辑,并提供数据给前端的其他层使用。`SessionService` 是一个专门处理与会话(Session)相关业务逻辑的服务类,它封装了创建会话、查询会话、更新会话等操作。 + +为了保持代码的可维护性和可扩展性,我们将会话分组相关的服务逻辑放在 `SessionService` 中,这样可以使会话领域的业务逻辑保持内聚。当业务需求增加或变化时,我们可以更容易地在这个领域内进行修改和扩展。 + +`SessionService` 通过调用 `SessionGroupModel` 的方法来实现对会话分组的管理。 在 `sessionService` 中实现 Session Group 相关的请求逻辑: + +```typescript +class SessionService { + // ... 省略 session 业务逻辑 + + // ************************************** // + // *********** SessionGroup *********** // + // ************************************** // + + async createSessionGroup(name: string, sort?: number) { + const item = await SessionGroupModel.create(name, sort); + if (!item) { + throw new Error('session group create Error'); + } + + return item.id; + } + + // ... 其他 SessionGroup 相关的实现 +} +``` + +## 三、前端数据流 Store 实现 + +在 LobeChat 应用中,Store 是用于管理应用前端状态的模块。其中的 Action 是触发状态更新的函数,通常会调用服务层的方法来执行实际的数据处理操作,然后更新 Store 中的状态。我们采用了 `zustand` 作为 Store 模块的底层依赖,对于状态管理的详细实践介绍,可以查阅 [📘 状态管理最佳实践](../State-Management/State-Management-Intro.zh-CN.md) + +### sessionGroup CRUD + +会话组的 CRUD 操作是管理会话组数据的核心行为。在 `src/store/session/slice/sessionGroup` 中,我们将实现与会话组相关的状态逻辑,包括添加、删除、更新会话组及其排序。 + +以下是 `action.ts` 文件中需要实现的 `SessionGroupAction` 接口方法: + +```ts +export interface SessionGroupAction { + // 增加会话组 + addSessionGroup: (name: string) => Promise; + // 删除会话组 + removeSessionGroup: (id: string) => Promise; + // 更新会话的会话组 ID + updateSessionGroupId: (sessionId: string, groupId: string) => Promise; + // 更新会话组名称 + updateSessionGroupName: (id: string, name: string) => Promise; + // 更新会话组排序 + updateSessionGroupSort: (items: SessionGroupItem[]) => Promise; +} +``` + +以 `addSessionGroup` 方法为例,我们首先调用 `sessionService` 的 `createSessionGroup` 方法来创建新的会话组,然后使用 `refreshSessions` 方法来刷新 sessions 状态: + +```ts +export const createSessionGroupSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionGroupAction +> = (set, get) => ({ + // 实现添加会话组的逻辑 + addSessionGroup: async (name) => { + // 调用服务层的 createSessionGroup 方法并传入会话组名称 + const id = await sessionService.createSessionGroup(name); + // 调用 get 方法获取当前的 Store 状态并执行 refreshSessions 方法刷新会话数据 + await get().refreshSessions(); + // 返回新创建的会话组 ID + return id; + }, + // ... 其他 action 实现 +}); +``` + +通过以上的实现,我们可以确保在添加新的会话组后,应用的状态会及时更新,且相关的组件会收到最新的状态并重新渲染。这种方式提高了数据流的可预测性和可维护性,同时也简化了组件之间的通信。 + +### Sessions 分组逻辑改造 + +本次需求改造需要对 Sessions 进行升级,从原来的单一列表变成了三个不同的分组:`pinnedSessions`(置顶列表)、`customSessionGroups`(自定义分组)和 `defaultSessions`(默认列表)。 + +为了处理这些分组,我们需要改造 `useFetchSessions` 的实现逻辑。以下是关键的改动点: + +1. 使用 `sessionService.getGroupedSessions` 方法负责调用后端接口来获取分组后的会话数据; +2. 将获取后的数据保存为三到不同的状态字段中:`pinnedSessions`、`customSessionGroups` 和 `defaultSessions`; + +#### `useFetchSessions` 方法 + +该方法在 `createSessionSlice` 中定义,如下所示: + +```typescript +export const createSessionSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionAction +> = (set, get) => ({ + // ... 其他方法 + useFetchSessions: () => + useSWR(FETCH_SESSIONS_KEY, sessionService.getGroupedSessions, { + onSuccess: (data) => { + set( + { + customSessionGroups: data.customGroup, + defaultSessions: data.default, + isSessionsFirstFetchFinished: true, + pinnedSessions: data.pinned, + sessions: data.all, + }, + false, + n('useFetchSessions/onSuccess', data), + ); + }, + }), +}); +``` + +在成功获取数据后,我们使用 `set` 方法来更新 `customSessionGroups`、`defaultSessions`、`pinnedSessions` 和 `sessions` 状态。这将保证状态与最新的会话数据同步。 + +#### getGroupedSessions + +使用 `sessionService.getGroupedSessions` 方法负责调用后端接口 `SessionModel.queryWithGroups()` + +```typescript +class SessionService { + // ... 其他 SessionGroup 相关的实现 + + async getGroupedSessions(): Promise { + return SessionModel.queryWithGroups(); + } +} +``` + +#### `SessionModel.queryWithGroups` 方法 + +此方法是 `sessionService.getGroupedSessions` 调用的核心方法,它负责查询和组织会话数据,代码如下: + +```typescript +class _SessionModel extends BaseModel { + // ... 其他方法 + + /** + * 查询会话数据,并根据会话组将会话分类。 + * @returns {Promise} 返回一个对象,其中包含所有会话以及分为不同组的会话列表。 + */ + async queryWithGroups(): Promise { + // 查询会话组数据 + const groups = await SessionGroupModel.query(); + // 根据会话组ID查询自定义会话组 + const customGroups = await this.queryByGroupIds(groups.map((item) => item.id)); + // 查询默认会话列表 + const defaultItems = await this.querySessionsByGroupId(SessionDefaultGroup.Default); + // 查询置顶的会话 + const pinnedItems = await this.getPinnedSessions(); + + // 查询所有会话 + const all = await this.query(); + // 组合并返回所有会话及其分组信息 + return { + all, // 包含所有会话的数组 + customGroup: groups.map((group) => ({ ...group, children: customGroups[group.id] })), // 自定义分组 + default: defaultItems, // 默认会话列表 + pinned: pinnedItems, // 置顶会话列表 + }; + } +} +``` + +方法 `queryWithGroups` 首先查询所有会话组,然后基于这些组的 ID 查询自定义会话组,同时查询默认和固定的会话。最后,它返回一个包含所有会话和按组分类的会话列表对象。 + +### sessions selectors 调整 + +由于 sessions 中关于分组的逻辑发生了变化,因此我们需要调整 `sessions` 的 selectors 逻辑,以确保它们能够正确地处理新的数据结构。 + +原有的 selectors: + +```ts +// 默认分组 +const defaultSessions = (s: SessionStore): LobeSessions => s.sessions; + +// 置顶分组 +const pinnedSessionList = (s: SessionStore) => + defaultSessions(s).filter((s) => s.group === SessionGroupDefaultKeys.Pinned); + +// 未置顶分组 +const unpinnedSessionList = (s: SessionStore) => + defaultSessions(s).filter((s) => s.group === SessionGroupDefaultKeys.Default); +``` + +修改后: + +```ts +const defaultSessions = (s: SessionStore): LobeSessions => s.defaultSessions; +const pinnedSessions = (s: SessionStore): LobeSessions => s.pinnedSessions; +const customSessionGroups = (s: SessionStore): CustomSessionGroup[] => s.customSessionGroups; +``` + +由于在 UI 中的取数全部是通过 `useSessionStore(sessionSelectors.defaultSessions)` 这样的写法实现的,因此我们只需要修改 `defaultSessions` 的选择器实现,即可完成数据结构的变更。 UI 层的取数代码完全不用变更,可以大大降低重构的成本和风险。 + +> !\[Important] +> +> 如果你对 Selectors 的概念和功能不太了解,可以查阅 [📘 数据存储取数模块](../State-Management/State-Management-Selectors.zh-CN.md) 部分了解相关内容。 + +## 四、UI 实现与 action 绑定 + +在 UI 组件中绑定 Store Action 实现交互逻辑,例如 `CreateGroupModal`: + +```tsx +const CreateGroupModal = () => { + // ... 其他逻辑 + + const [updateSessionGroup, addCustomGroup] = useSessionStore((s) => [ + s.updateSessionGroupId, + s.addSessionGroup, + ]); + + return ( + { + // ... 其他逻辑 + const groupId = await addCustomGroup(name); + await updateSessionGroup(sessionId, groupId); + }} + > + {/* ... */} + + ); +}; +``` + +## 五、数据迁移 + +在软件开发过程中,数据迁移是一个不可避免的问题,尤其是当现有的数据结构无法满足新的业务需求时。对于本次 SessionGroup 的迭代,我们需要处理 `session` 的 `group` 字段的迁移,这是一个典型的数据迁移案例。 + +### 旧数据结构的问题 + +在旧的数据结构中,`group` 字段被用来标记会话是否为 `pinned`(置顶)或属于某个 `default`(默认)分组。但是当需要支持多个会话分组时,原有的数据结构就显得不够灵活了。 + +例如: + +``` +before pin: group = abc +after pin: group = pinned +after unpin: group = default +``` + +从上述示例中可以看出,一旦会话从置顶状态(`pinned`)取消置顶(`unpin`),`group` 字段将无法恢复为原来的 `abc` 值。这是因为我们没有一个独立的字段来维护置顶状态。因此,我们引入了一个新的字段 `pinned` 来表示会话是否被置顶,而 `group` 字段将仅用于标识会话分组。 + +### 迁移策略 + +本次迁移的核心逻辑只有一条: + +- 当用户的 `group` 字段为 `pinned` 时,将其 `pinned` 字段置为 `true`,同时将 group 设为 `default`; + +但 LobeChat 中的数据迁移通常涉及到 **配置文件迁移** 和 **数据库迁移** 两个部分。所以上述逻辑会需要分别在两块实现迁移。 + +#### 配置文件迁移 + +对于配置文件迁移,我们建议先于数据库迁移进行,因为配置文件迁移通常更容易进行测试和验证。LobeChat 的文件迁移配置位于 `src/migrations/index.ts` 文件中,其中定义了配置文件迁移的各个版本及对应的迁移脚本。 + +```diff +// 当前最新的版本号 +- export const CURRENT_CONFIG_VERSION = 2; ++ export const CURRENT_CONFIG_VERSION = 3; + +// 历史记录版本升级模块 +const ConfigMigrations = [ ++ /** ++ * 2024.01.22 ++ * from `group = pinned` to `pinned:true` ++ */ ++ MigrationV2ToV3, + /** + * 2023.11.27 + * 从单 key 数据库转换为基于 dexie 的关系型结构 + */ + MigrationV1ToV2, + /** + * 2023.07.11 + * just the first version, Nothing to do + */ + MigrationV0ToV1, +]; +``` + +本次的配置文件迁移逻辑定义在 `src/migrations/FromV2ToV3/index.ts` 中,简化如下: + +```ts +export class MigrationV2ToV3 implements Migration { + // 指定从该版本开始向上升级 + version = 2; + + migrate(data: MigrationData): MigrationData { + const { sessions } = data.state; + + return { + ...data, + state: { + ...data.state, + sessions: sessions.map((s) => this.migrateSession(s)), + }, + }; + } + + migrateSession = (session: V2Session): V3Session => { + return { + ...session, + group: 'default', + pinned: session.group === 'pinned', + }; + }; +} +``` + +可以看到迁移的实现非常简单。但重要的是,我们需要保证迁移的正确性,因此需要编写对应的测试用例 `src/migrations/FromV2ToV3/migrations.test.ts`: + +```ts +import { MigrationData, VersionController } from '@/migrations/VersionController'; + +import { MigrationV1ToV2 } from '../FromV1ToV2'; +import inputV1Data from '../FromV1ToV2/fixtures/input-v1-session.json'; +import inputV2Data from './fixtures/input-v2-session.json'; +import outputV3DataFromV1 from './fixtures/output-v3-from-v1.json'; +import outputV3Data from './fixtures/output-v3.json'; +import { MigrationV2ToV3 } from './index'; + +describe('MigrationV2ToV3', () => { + let migrations; + let versionController: VersionController; + + beforeEach(() => { + migrations = [MigrationV2ToV3]; + versionController = new VersionController(migrations, 3); + }); + + it('should migrate data correctly through multiple versions', () => { + const data: MigrationData = inputV2Data; + + const migratedData = versionController.migrate(data); + + expect(migratedData.version).toEqual(outputV3Data.version); + expect(migratedData.state.sessions).toEqual(outputV3Data.state.sessions); + expect(migratedData.state.topics).toEqual(outputV3Data.state.topics); + expect(migratedData.state.messages).toEqual(outputV3Data.state.messages); + }); + + it('should work correct from v1 to v3', () => { + const data: MigrationData = inputV1Data; + + versionController = new VersionController([MigrationV2ToV3, MigrationV1ToV2], 3); + + const migratedData = versionController.migrate(data); + + expect(migratedData.version).toEqual(outputV3DataFromV1.version); + expect(migratedData.state.sessions).toEqual(outputV3DataFromV1.state.sessions); + expect(migratedData.state.topics).toEqual(outputV3DataFromV1.state.topics); + expect(migratedData.state.messages).toEqual(outputV3DataFromV1.state.messages); + }); +}); +``` + +单测需要使用 `fixtures` 来固定测试数据,测试用例包含了两个部分的验证逻辑: 1) 单次迁移(v2 -> v3)和 2) 完整迁移(v1 -> v3)的正确性。 + +> \[!Important] +> +> 配置文件的版本号可能与数据库版本号不一致,因为数据库版本的更新不总是伴随数据结构的变化(如新增表或字段),而配置文件的版本更新则通常涉及到数据迁移。 + +#### 数据库迁移 + +数据库迁移则需要在 `LocalDB` 类中实施,该类定义在 `src/database/core/db.ts` 文件中。迁移过程涉及到为 `sessions` 表的每条记录添加新的 `pinned` 字段,并重置 `group` 字段: + +```diff +export class LocalDB extends Dexie { + public files: LobeDBTable<'files'>; + public sessions: LobeDBTable<'sessions'>; + public messages: LobeDBTable<'messages'>; + public topics: LobeDBTable<'topics'>; + public plugins: LobeDBTable<'plugins'>; + public sessionGroups: LobeDBTable<'sessionGroups'>; + + constructor() { + super(LOBE_CHAT_LOCAL_DB_NAME); + this.version(1).stores(dbSchemaV1); + this.version(2).stores(dbSchemaV2); + this.version(3).stores(dbSchemaV3); + this.version(4) + .stores(dbSchemaV4) ++ .upgrade((trans) => this.upgradeToV4(trans)); + + this.files = this.table('files'); + this.sessions = this.table('sessions'); + this.messages = this.table('messages'); + this.topics = this.table('topics'); + this.plugins = this.table('plugins'); + this.sessionGroups = this.table('sessionGroups'); + } + ++ /** ++ * 2024.01.22 ++ * ++ * DB V3 to V4 ++ * from `group = pinned` to `pinned:true` ++ */ ++ upgradeToV4 = async (trans: Transaction) => { ++ const sessions = trans.table('sessions'); ++ await sessions.toCollection().modify((session) => { ++ // translate boolean to number ++ session.pinned = session.group === 'pinned' ? 1 : 0; ++ session.group = 'default'; ++ }); ++ }; +} +``` + +以上就是我们的数据迁移策略。在进行迁移时,务必确保迁移脚本的正确性,并通过充分的测试验证迁移结果。 + +## 六、数据导入导出 + +在 LobeChat 中,数据导入导出功能是为了确保用户可以在不同设备之间迁移他们的数据。这包括会话、话题、消息和设置等数据。在本次的 Session Group 功能实现中,我们也需要对数据导入导出进行处理,以确保当完整导出的数据在其他设备上可以一模一样恢复。 + +数据导入导出的核心实现在 `src/service/config.ts` 的 `ConfigService` 中,其中的关键方法如下: + +| 方法名称 | 描述 | +| --------------------- | ---------------- | +| `importConfigState` | 导入配置数据 | +| `exportAgents` | 导出所有助理数据 | +| `exportSessions` | 导出所有会话数据 | +| `exportSingleSession` | 导出单个会话数据 | +| `exportSingleAgent` | 导出单个助理数据 | +| `exportSettings` | 导出设置数据 | +| `exportAll` | 导出所有数据 | + +### 数据导出 + +在 LobeChat 中,当用户选择导出数据时,会将当前的会话、话题、消息和设置等数据打包成一个 JSON 文件并提供给用户下载。这个 JSON 文件的标准结构如下: + +```json +{ + "exportType": "sessions", + "state": { + "sessions": [], + "topics": [], + "messages": [] + }, + "version": 3 +} +``` + +其中: + +- `exportType`: 标识导出数据的类型,目前有 `sessions`、 `agent` 、 `settings` 和 `all` 四种; +- `state`: 存储实际的数据,不同 `exportType` 的数据类型也不同; +- `version`: 标识数据的版本。 + +在 Session Group 功能实现中,我们需要在 `state` 字段中添加 `sessionGroups` 数据。这样,当用户导出数据时,他们的 Session Group 数据也会被包含在内。 + +以导出 sessions 为例,导出数据的相关实现代码修改如下: + +```diff +class ConfigService { + // ... 省略其他 + + exportSessions = async () => { + const sessions = await sessionService.getAllSessions(); ++ const sessionGroups = await sessionService.getSessionGroups(); + const messages = await messageService.getAllMessages(); + const topics = await topicService.getAllTopics(); + +- const config = createConfigFile('sessions', { messages, sessions, topics }); ++ const config = createConfigFile('sessions', { messages, sessionGroups, sessions, topics }); + + exportConfigFile(config, 'sessions'); + }; +} +``` + +### 数据导入 + +数据导入的功能是通过 `ConfigService.importConfigState` 来实现的。当用户选择导入数据时,他们需要提供一个由 符合上述结构规范的 JSON 文件。`importConfigState` 方法接受配置文件的数据,并将其导入到应用中。 + +在 Session Group 功能实现中,我们需要在导入数据的过程中处理 `sessionGroups` 数据。这样,当用户导入数据时,他们的 Session Group 数据也会被正确地导入。 + +以下是 `importConfigState` 中导入实现的变更代码: + +```diff +class ConfigService { + // ... 省略其他代码 + ++ importSessionGroups = async (sessionGroups: SessionGroupItem[]) => { ++ return sessionService.batchCreateSessionGroups(sessionGroups); ++ }; + + importConfigState = async (config: ConfigFile): Promise => { + switch (config.exportType) { + case 'settings': { + await this.importSettings(config.state.settings); + + break; + } + + case 'agents': { ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const data = await this.importSessions(config.state.sessions); + return { ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(data), + }; + } + + case 'all': { + await this.importSettings(config.state.settings); + ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const [sessions, messages, topics] = await Promise.all([ + this.importSessions(config.state.sessions), + this.importMessages(config.state.messages), + this.importTopics(config.state.topics), + ]); + + return { + messages: this.mapImportResult(messages), ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(sessions), + topics: this.mapImportResult(topics), + }; + } + + case 'sessions': { ++ const sessionGroups = await this.importSessionGroups(config.state.sessionGroups); + + const [sessions, messages, topics] = await Promise.all([ + this.importSessions(config.state.sessions), + this.importMessages(config.state.messages), + this.importTopics(config.state.topics), + ]); + + return { + messages: this.mapImportResult(messages), ++ sessionGroups: this.mapImportResult(sessionGroups), + sessions: this.mapImportResult(sessions), + topics: this.mapImportResult(topics), + }; + } + } + }; +} +``` + +上述修改的一个要点是先进行 sessionGroup 的导入,因为如果先导入 session 时,如果没有在当前数据库中查到相应的 SessionGroup Id,那么这个 session 的 group 会兜底修改为默认值。这样就无法正确地将 sessionGroup 的 ID 与 session 进行关联。 + +以上就是 LobeChat Session Group 功能在数据导入导出部分的实现。通过这种方式,我们可以确保用户的 Session Group 数据在导入导出过程中能够被正确地处理。 + +## 总结 + +以上就是 LobeChat Session Group 功能的完整实现流程。开发者可以参考本文档进行相关功能的开发和测试。 diff --git a/DigitalHumanWeb/contributing/Basic/Folder-Structure.md b/DigitalHumanWeb/contributing/Basic/Folder-Structure.md new file mode 100644 index 0000000..f74fe63 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Folder-Structure.md @@ -0,0 +1,40 @@ +# Directory Structure + +The directory structure of LobeChat is as follows: + +```bash +src +├── app # Main logic and state management related code for the application +├── components # Reusable UI components +├── config # Application configuration files, including client-side and server-side environment variables +├── const # Used to define constants, such as action types, route names, etc. +├── features # Function modules related to business functions, such as agent settings, plugin development pop-ups, etc. +├── hooks # Custom utility hooks reused throughout the application +├── layout # Application layout components, such as navigation bars, sidebars, etc. +├── locales # Internationalization language files +├── services # Encapsulated backend service interfaces, such as HTTP requests +├── store # Zustand store for state management +├── types # TypeScript type definition files +└── utils # Common utility functions +``` + +## app + +In the `app` folder, we organize each route page according to the app router's [Route Groups](https://nextjs.org/docs/app/building-your-application/routing/route-groups) to separately handle the implementation of desktop and mobile code. Taking the file structure of the `welcome` page as an example: + +```bash +welcome +├── (desktop) # Desktop implementation +│ ├── features # Desktop-specific features +│ ├── index.tsx # Main entry file for desktop +│ └── layout.desktop.tsx # Desktop layout component +├── (mobile) # Mobile implementation +│ ├── features # Mobile-specific features +│ ├── index.tsx # Main entry file for mobile +│ └── layout.mobile.tsx # Mobile layout component +├── features # This folder contains features code shared by both desktop and mobile, such as the Banner component +│ └── Banner +└── page.tsx # This is the main entry file for the page, used to load desktop or mobile code based on the device type +``` + +In this way, we can clearly distinguish and manage desktop and mobile code, while also easily reusing code required on both devices, thereby improving development efficiency and maintaining code cleanliness and maintainability. diff --git a/DigitalHumanWeb/contributing/Basic/Folder-Structure.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Folder-Structure.zh-CN.md new file mode 100644 index 0000000..0368a94 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Folder-Structure.zh-CN.md @@ -0,0 +1,40 @@ +# 目录架构 + +LobeChat 的文件夹目录架构如下: + +```bash +src +├── app # 应用主要逻辑和状态管理相关的代码 +├── components # 可复用的 UI 组件 +├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量 +├── const # 用于定义常量,如 action 类型、路由名等 +├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等 +├── hooks # 全应用复用自定义的工具 Hooks +├── layout # 应用的布局组件,如导航栏、侧边栏等 +├── locales # 国际化的语言文件 +├── services # 封装的后端服务接口,如 HTTP 请求 +├── store # 用于状态管理的 zustand store +├── types # TypeScript 的类型定义文件 +└── utils # 通用的工具函数 +``` + +## app + +在 `app` 文件夹中,我们将每个路由页面按照 app router 的 [Route Groups](https://nextjs.org/docs/app/building-your-application/routing/route-groups) 进行组织,以此来分别处理桌面端和移动端的代码实现。以 `welcome` 页面的文件结构为例: + +```bash +welcome +├── (desktop) # 桌面端实现 +│ ├── features # 桌面端特有的功能 +│ ├── index.tsx # 桌面端的主入口文件 +│ └── layout.desktop.tsx # 桌面端的布局组件 +├── (mobile) # 移动端实现 +│ ├── features # 移动端特有的功能 +│ ├── index.tsx # 移动端的主入口文件 +│ └── layout.mobile.tsx # 移动端的布局组件 +├── features # 此文件夹包含双端共享的特性代码,如 Banner 组件 +│ └── Banner +└── page.tsx # 此为页面的主入口文件,用于根据设备类型选择加载桌面端或移动端的代码 +``` + +通过这种方式,我们可以清晰地区分和管理桌面端和移动端的代码,同时也能方便地复用在两种设备上都需要的代码,从而提高开发效率并保持代码的整洁和可维护性。 diff --git a/DigitalHumanWeb/contributing/Basic/Intro.md b/DigitalHumanWeb/contributing/Basic/Intro.md new file mode 100644 index 0000000..7ac6ea9 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Intro.md @@ -0,0 +1,111 @@ +# 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, 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 is as follows: + +- **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/). +- **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. + +## Folder Directory Structure + +The folder directory structure of LobeChat is as follows: + +```bash +src +├── app # Code related to the main logic and state management of the application +├── components # Reusable UI components +├── config # Application configuration files, including client and server environment variables +├── const # Used to define constants, such as action types, route names, etc. +├── 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 # General utility functions +``` + +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/DigitalHumanWeb/contributing/Basic/Intro.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Intro.zh-CN.md new file mode 100644 index 0000000..5030401 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Intro.zh-CN.md @@ -0,0 +1,111 @@ +# 技术开发上手指南 + +欢迎来到 LobeChat 技术开发上手指南。LobeChat 是一款基于 Next.js 框架构建的 AI 会话应用,它汇集了一系列的技术栈,以实现多样化的功能和特性。本指南将详细介绍 LobeChat 的主要技术组成,以及如何在你的开发环境中配置和使用这些技术。 + +#### TOC + +- [基础技术栈](#基础技术栈) +- [文件夹目录架构](#文件夹目录架构) +- [本地开发环境设置](#本地开发环境设置) +- [代码风格与贡献指南](#代码风格与贡献指南) +- [国际化实现指南](#国际化实现指南) +- [附录:资源与参考](#附录资源与参考) + +## 基础技术栈 + +LobeChat 的核心技术栈如下: + +- **框架**:我们选择了 [Next.js](https://nextjs.org/),这是一款强大的 React 框架,为我们的项目提供了服务端渲染、路由框架、Router Handler 等关键功能。 +- **组件库**:我们使用了 [Ant Design (antd)](https://ant.design/) 作为基础组件库,同时引入了 [lobe-ui](https://github.com/lobehub/lobe-ui) 作为我们的业务组件库。 +- **状态管理**:我们选用了 [zustand](https://github.com/pmndrs/zustand),一款轻量级且易于使用的状态管理库。 +- **网络请求**:我们采用 [swr](https://swr.vercel.app/),这是一款用于数据获取的 React Hooks 库。 +- **路由**:路由管理我们直接使用 [Next.js](https://nextjs.org/) 自身提供的解决方案。 +- **国际化**:我们使用 [i18next](https://www.i18next.com/) 来实现应用的多语言支持。 +- **样式**:我们使用 [antd-style](https://github.com/ant-design/antd-style),这是一款与 Ant Design 配套的 CSS-in-JS 库。 +- **单元测试**:我们使用 [vitest](https://github.com/vitest-dev/vitest) 进行单元测试。 + +## 文件夹目录架构 + +LobeChat 的文件夹目录架构如下: + +```bash +src +├── app # 应用主要逻辑和状态管理相关的代码 +├── components # 可复用的 UI 组件 +├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量 +├── const # 用于定义常量,如 action 类型、路由名等 +├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等 +├── hooks # 全应用复用自定义的工具 Hooks +├── layout # 应用的布局组件,如导航栏、侧边栏等 +├── locales # 国际化的语言文件 +├── services # 封装的后端服务接口,如 HTTP 请求 +├── store # 用于状态管理的 zustand store +├── types # TypeScript 的类型定义文件 +└── utils # 通用的工具函数 +``` + +有关目录架构的详细介绍,详见: [文件夹目录架构](Folder-Structure.zh-CN.md) + +## 本地开发环境设置 + +本节将概述搭建开发环境并进行本地开发。 在开始之前,请确保你的本地环境中已安装 Node.js、Git 以及你选择的包管理器(Bun 或 PNPM)。 + +我们推荐使用 WebStorm 作为你的集成开发环境(IDE)。 + +1. **获取代码**:克隆 LobeChat 的代码库到本地: + +```bash +git clone https://github.com/lobehub/lobe-chat.git +``` + +2. **安装依赖**:进入项目目录,并安装所需依赖: + +```bash +cd lobe-chat +# 如果你使用 Bun +bun install +# 如果你使用 PNPM +pnpm install +``` + +3. **运行与调试**:启动本地开发服务器,开始你的开发之旅: + +```bash +# 使用 Bun 启动开发服务器 +bun run dev +# 访问 http://localhost:3010 查看应用 +``` + +> \[!IMPORTANT]\ +> 如果使用`npm`安装依赖出现`Could not find "stylelint-config-recommended"`错误,请使用 `pnpm` 或者 `bun` 重新安装依赖。 + +现在,你应该可以在浏览器中看到 LobeChat 的欢迎页面。详细的环境配置指南,请参考 [开发环境设置指南](Setup-Development.zh-CN.md)。 + +## 代码风格与贡献指南 + +在 LobeChat 项目中,我们十分重视代码的质量和一致性。为此,我们制定了一系列的代码风格规范和贡献流程,以确保每位开发者都能顺利地参与到项目中。以下是你作为开发者需要遵守的代码风格和贡献准则。 + +- **代码风格**:我们使用 `@lobehub/lint` 统一代码风格,包括 ESLint、Prettier、remarklint 和 stylelint 配置。请遵守我们的代码规范,以保持代码的一致性和可读性。 +- **贡献流程**:我们采用 gitmoji 和 semantic release 作为代码提交和发布流程。请使用 gitmoji 标注您的提交信息,并确保遵循 semantic release 的规范,以便我们的自动化系统能够正确处理版本控制和发布。 + +所有的贡献都将经过代码审查。维护者可能会提出修改建议或要求。请积极响应审查意见,并及时做出调整,我们期待你的参与和贡献。 + +详细的代码风格和贡献指南,请参考 [代码风格与贡献指南](Contributing-Guidelines.zh-CN.md)。 + +## 国际化实现指南 + +LobeChat 采用 `i18next` 和 `lobe-i18n` 实现多语言支持,确保用户全球化体验。 + +国际化文件位于 `src/locales`,包含默认语言(中文)。 我们会通过 `lobe-i18n` 自动生成其他的语言 JSON 文件。 + +如果要添加新语种,需遵循特定步骤,详见 [新语种添加指南](../Internationalization/Add-New-Locale.zh-CN.md)。 我们鼓励你参与我们的国际化努力,共同为全球用户提供更好的服务。 + +详细的国际化实现指南指南,请参考 [国际化实现指南](../Internationalization/Internationalization-Implementation.zh-CN.md)。 + +## 附录:资源与参考 + +为了支持开发者更好地理解和使用 LobeChat 的技术栈,我们提供了一份详尽的资源与参考列表 —— [LobeChat 资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN) - 访问我们维护的资源列表,包括教程、文章和其他有用的链接。 + +我们鼓励开发者利用这些资源深入学习和提升技能,通过 [LobeChat GitHub Discussions](https://github.com/lobehub/lobe-chat/discussions) 或者 [Discord](https://discord.com/invite/AYFPHvv2jT) 加入社区讨论,提出问题或分享你的经验。 + +如果你有任何疑问,或者需要进一步的帮助,请不要犹豫,请通过上述渠道与我们联系。 diff --git a/DigitalHumanWeb/contributing/Basic/Resources.md b/DigitalHumanWeb/contributing/Basic/Resources.md new file mode 100644 index 0000000..65fbd9a --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Resources.md @@ -0,0 +1,19 @@ +# Resources and References + +The design and development of LobeChat would not have been possible without the excellent projects in the community and ecosystem. We have used or referred to some outstanding resources and guides in the design and development process. Here are some key reference resources for developers to refer to during the development and learning process: + +1. **OpenAI API Guide**: We use OpenAI's API to access and process AI conversation data. You can check out the [OpenAI API Guide](https://platform.openai.com/docs/api-reference/introduction) for more details. + +2. **OpenAI SDK**: We use OpenAI's Node.js SDK to interact with OpenAI's API. You can view the source code and documentation on the [OpenAI SDK](https://github.com/openai/openai-node) GitHub repository. + +3. **AI SDK**: We use Vercel's AI SDK to access and process AI conversation data. You can refer to the documentation of [AI SDK](https://sdk.vercel.ai/docs) for more details. + +4. **LangChain**: Our early conversation feature was implemented based on LangChain. You can visit [LangChain](https://langchain.com) to learn more about it. + +5. **Chat-Next-Web**: Chat Next Web is an excellent project, and some of LobeChat's features and workflows are referenced from its implementation. You can view the source code and documentation on the [Chat-Next-Web](https://github.com/Yidadaa/ChatGPT-Next-Web) GitHub repository. + +6. **Next.js Documentation**: Our project is built on Next.js, and you can refer to the [Next.js Documentation](https://nextjs.org/docs) for more information about Next.js. + +7. **FlowGPT**: FlowGPT is currently the world's largest Prompt community, and some of the agents in LobeChat come from active authors in FlowGPT. You can visit [FlowGPT](https://flowgpt.com/) to learn more about it. + +We will continue to update and supplement this list to provide developers with more reference resources. diff --git a/DigitalHumanWeb/contributing/Basic/Resources.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Resources.zh-CN.md new file mode 100644 index 0000000..305ca12 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Resources.zh-CN.md @@ -0,0 +1,19 @@ +# 资源与参考 + +LobeChat 的设计和开发离不开社区和生态中的优秀项目。我们在设计和开发过程中使用或参考了一些优秀的资源和指南。以下是一些主要的参考资源,供开发者在开发和学习过程中参考: + +1. **OpenAI API 指南**:我们使用 OpenAI 的 API 来获取和处理 AI 的会话数据。你可以查看 [OpenAI API 指南](https://platform.openai.com/docs/api-reference/introduction) 了解更多详情。 + +2. **OpenAI SDK**:我们使用 OpenAI 的 Node.js SDK 来与 OpenAI 的 API 交互。你可以在 [OpenAI SDK](https://github.com/openai/openai-node) 的 GitHub 仓库中查看源码和文档。 + +3. **AI SDK**:我们使用 Vercel 的 AI SDK 来获取和处理 AI 的会话数据。你可以查看 [AI SDK](https://sdk.vercel.ai/docs) 的文档来了解更多详情。 + +4. **LangChain**:我们早期的会话功能是基于 LangChain 实现的。你可以访问 [LangChain](https://langchain.com) 来了解更多关于它的信息。 + +5. **Chat-Next-Web**:Chat Next Web 是一个优秀的项目,LobeChat 的部分功能、Workflow 等参考了它的实现。你可以在 [Chat-Next-Web](https://github.com/Yidadaa/ChatGPT-Next-Web) 的 GitHub 仓库中查看源码和文档。 + +6. **Next.js 文档**:我们的项目是基于 Next.js 构建的,你可以查看 [Next.js 文档](https://nextjs.org/docs) 来了解更多关于 Next.js 的信息。 + +7. **FlowGPT**:FlowGPT 是目前全球最大的 Prompt 社区,LobeChat 中的一些 Agent 来自 FlowGPT 的活跃作者。你可以访问 [FlowGPT](https://flowgpt.com/) 来了解更多关于它的信息。 + +我们会持续更新和补充这个列表,为开发者提供更多的参考资源。 diff --git a/DigitalHumanWeb/contributing/Basic/Setup-Development.md b/DigitalHumanWeb/contributing/Basic/Setup-Development.md new file mode 100644 index 0000000..ca7263a --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Setup-Development.md @@ -0,0 +1,69 @@ +# Environment Setup Guide + +Welcome to the LobeChat development environment setup guide. + +#### TOC + +- [Online Development](#online-development) +- [Local Development](#local-development) + - [Development Environment Requirements](#development-environment-requirements) + - [Project Setup](#project-setup) + +## Online Development + +If you have access to GitHub Codespaces, you can click the button below to enter the online development environment with just one click: + +[![][codespaces-shield]][codespaces-link] + +## Local Development + +Before starting development on LobeChat, you need to install and configure some necessary software and tools in your local environment. This document will guide you through these steps. + +### Development Environment Requirements + +First, you need to install the following software: + +- Node.js: LobeChat is built on Node.js, so you need to install Node.js. We recommend installing the latest stable version. +- Yarn: We use Yarn as the preferred package manager. You can download and install it from the Yarn official website. +- PNPM: We use PNPM as an auxiliary package manager. You can download and install it from the PNPM official website. +- Git: We use Git for version control. You can download and install it from the Git official website. +- IDE: You can choose your preferred integrated development environment (IDE). We recommend using WebStorm, a powerful IDE particularly suitable for TypeScript development. + +### Project Setup + +After installing the above software, you can start setting up the LobeChat project. + +1. **Get the code**: First, you need to clone the LobeChat codebase from GitHub. Run the following command in the terminal: + +```bash +git clone https://github.com/lobehub/lobe-chat.git +``` + +2. **Install dependencies**: Then, navigate to the project directory and use Yarn to install the project's dependencies: + +```bash +cd lobe-chat +yarn install +``` + +If you are using PNPM, you can execute: + +```bash +cd lobe-chat +pnpm install +``` + +3. **Start the development server**: After installing the dependencies, you can start the development server: + +```bash +yarn run dev +``` + +Now, you can open `http://localhost:3010` in your browser, and you should see the welcome page of LobeChat. This indicates that you have successfully set up the development environment. + +![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/274655364-414bc31e-8511-47a3-af17-209b530effc7.png) + +During the development process, if you encounter any issues with environment setup or have any questions about LobeChat development, feel free to ask us at any time. We look forward to seeing your contributions! + +[codespaces-link]: https://codespaces.new/lobehub/lobe-chat +[codespaces-shield]: https://github.com/codespaces/badge.svg diff --git a/DigitalHumanWeb/contributing/Basic/Setup-Development.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Setup-Development.zh-CN.md new file mode 100644 index 0000000..80da7fd --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Setup-Development.zh-CN.md @@ -0,0 +1,69 @@ +# 环境设置指南 + +欢迎阅读 LobeChat 的开发环境设置指南。 + +#### TOC + +- [在线开发](#在线开发) +- [本地开发](#本地开发) + - [开发环境需求](#开发环境需求) + - [项目设置](#项目设置) + +## 在线开发 + +如果你有 GitHub Codespaces 的使用权限,可以点击下方按钮一键进入在线开发环境: + +[![][codespaces-shield]][codespaces-link] + +## 本地开发 + +在开始开发 LobeChat 之前,你需要在本地环境中安装和配置一些必要的软件和工具。本文档将指导你完成这些步骤。 + +### 开发环境需求 + +首先,你需要安装以下软件: + +- Node.js:LobeChat 是基于 Node.js 构建的,因此你需要安装 Node.js。我们建议安装最新的稳定版。 +- Bun:我们使用 Bun 作为首选包管理器。你可以从 Bun 的官方网站上下载并安装。 +- PNPM:我们使用 PNPM 作为辅助包管理器。你可以从 pnpm 的官方网站上下载并安装。 +- Git:我们使用 Git 进行版本控制。你可以从 Git 的官方网站上下载并安装。 +- IDE:你可以选择你喜欢的集成开发环境(IDE)。我们推荐使用 WebStorm,它是一款功能强大的 IDE,特别适合 TypeScript 开发。 + +### 项目设置 + +完成上述软件的安装后,你可以开始设置 LobeChat 项目了。 + +1. **获取代码**:首先,你需要从 GitHub 上克隆 LobeChat 的代码库。在终端中运行以下命令: + +```bash +git clone https://github.com/lobehub/lobe-chat.git +``` + +2. **安装依赖**:然后,进入项目目录,并使用 bun 安装项目的依赖包: + +```bash +cd lobe-chat +bun i +``` + +如果你使用 pnpm ,可以执行: + +```bash +cd lobe-chat +pnpm i +``` + +3. **启动开发服务器**:安装完依赖后,你可以启动开发服务器: + +```bash +bun run dev +``` + +现在,你可以在浏览器中打开 `http://localhost:3010`,你应该能看到 LobeChat 的欢迎页面。这表明你已经成功地设置了开发环境。 + +![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/274655364-414bc31e-8511-47a3-af17-209b530effc7.png) + +在开发过程中,如果你在环境设置上遇到任何问题,或者有任何关于 LobeChat 开发的问题,欢迎随时向我们提问。我们期待看到你的贡献! + +[codespaces-link]: https://codespaces.new/lobehub/lobe-chat +[codespaces-shield]: https://github.com/codespaces/badge.svg diff --git a/DigitalHumanWeb/contributing/Basic/Test.md b/DigitalHumanWeb/contributing/Basic/Test.md new file mode 100644 index 0000000..4a50d3e --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Test.md @@ -0,0 +1,87 @@ +# Testing Guide + +LobeChat's testing strategy includes unit testing and end-to-end (E2E) testing. Below are detailed explanations of each type of testing: + +#### TOC + +- [Unit Testing](#unit-testing) +- [🚧 End-to-End Testing](#-end-to-end-testing) +- [Development Testing](#development-testing) + - [1. Unit Testing](#1-unit-testing) +- [Testing Strategy](#testing-strategy) + +## Unit Testing + +Unit testing is used to test the functionality of independent units in the application, such as components, functions, utility functions, etc. We use [vitest][vitest-url] for unit testing. + +To run unit tests, you can use the following command: + +``` +npm run test +``` + +This will run all unit tests and generate a test report. + +We encourage developers to write corresponding unit tests while writing code to ensure the quality and stability of the code. + +## 🚧 End-to-End Testing + +End-to-end testing is used to test the functionality and performance of the application in a real environment. It simulates real user operations and verifies the application's performance in different scenarios. + +Currently, there is no integrated end-to-end testing in LobeChat. We will gradually introduce end-to-end testing in subsequent iterations. + +## Development Testing + +### 1. Unit Testing + +Unit testing is conducted on the smallest testable units in the application, usually functions, components, or modules. In LobeChat, we use [vitest][vitest-url] for unit testing. + +#### Writing Test Cases + +Before writing unit tests, you need to create a directory with the same name as the file to be tested and name the test file `.test.ts`. For example, if you want to test the `src/utils/formatDate.ts` file, the test file should be named `src/utils/formatDate.test.ts`. + +In the test file, you can use the `describe` and `it` functions to organize and write test cases. The `describe` function is used to create a test suite, and the `it` function is used to write specific test cases. + +```typescript +import { formatNumber } from './formatNumber'; + +describe('formatNumber', () => { + it('should format number with comma separator', () => { + const result = formatNumber(1000); + expect(result).toBe('1,000'); + }); + + it('should return the same number if it is less than 1000', () => { + const result = formatNumber(500); + expect(result).toBe('500'); + }); +}); +``` + +In test cases, you can use the `expect` function to assert whether the test results meet expectations. The `expect` function can be used with various matchers, such as `toBe`, `toEqual`, `toBeTruthy`, etc. + +#### Running Unit Tests + +Execute unit tests by running the following command: + +``` +npm run test +``` + +This will run all unit tests and output the test results. + +## Testing Strategy + +To write effective test cases, you can consider the following testing strategies: + +- **Boundary Testing**: Test the boundary conditions of inputs, such as minimum value, maximum value, empty value, etc. +- **Exception Testing**: Test the code handling exceptional cases, such as error handling, fallback in exceptional situations, etc. +- **Functional Testing**: Test whether various functional modules of the application work properly, including user interaction, data processing, etc. +- **Compatibility Testing**: Test the compatibility of the application on different browsers and devices. +- **Performance Testing**: Test the performance of the application under different loads, such as response time, resource utilization, etc. + +Also, ensure that your test cases have good coverage, covering critical code and functionality in the application. + +By properly writing and executing unit tests, integration tests, and end-to-end tests, you can improve the quality and stability of the application and promptly identify and fix potential issues. + +[vitest-url]: https://vitest.dev/ diff --git a/DigitalHumanWeb/contributing/Basic/Test.zh-CN.md b/DigitalHumanWeb/contributing/Basic/Test.zh-CN.md new file mode 100644 index 0000000..8b520d7 --- /dev/null +++ b/DigitalHumanWeb/contributing/Basic/Test.zh-CN.md @@ -0,0 +1,87 @@ +# 测试指南 + +LobeChat 的测试策略包括单元测试和端到端 (E2E) 测试。下面是每种测试的详细说明: + +#### TOC + +- [单元测试](#单元测试) +- [🚧 端到端测试](#-端到端测试) +- [开发测试](#开发测试) + - [1. 单元测试](#1-单元测试) +- [测试策略](#测试策略) + +## 单元测试 + +单元测试用于测试应用中的独立单元(如组件、函数、工具函数等)的功能。我们使用 [vitest][vitest-url] 进行单元测试。 + +要运行单元测试,可以使用以下命令: + +``` +npm run test +``` + +这将运行所有的单元测试,并生成测试报告。 + +我们鼓励开发者在编写代码时,同时编写对应的单元测试,以确保代码的质量和稳定性。 + +## 🚧 端到端测试 + +端到端测试用于测试应用在真实环境中的功能和性能。它模拟用户的真实操作,并验证应用在不同场景下的表现。 + +在 LobeChat 中,目前暂时没有集成端到端测试,我们会在后续迭代中逐步引入端到端测试。 + +## 开发测试 + +### 1. 单元测试 + +单元测试是针对应用中的最小可测试单元进行的测试,通常是针对函数、组件或模块进行的测试。在 LobeChat 中,我们使用 [vitest][vitest-url] 进行单元测试。 + +#### 编写测试用例 + +在编写单元测试之前,您需要创建一个与被测试文件相同的目录,并将测试文件命名为 `.test.ts`。例如,如果要测试 `src/utils/formatDate.ts` 文件,测试文件应命名为 `src/utils/formatDate.test.ts`。 + +在测试文件中,您可以使用 `describe` 和 `it` 函数来组织和编写测试用例。`describe` 函数用于创建测试套件,`it` 函数用于编写具体的测试用例。 + +```typescript +import { formatNumber } from './formatNumber'; + +describe('formatNumber', () => { + it('should format number with comma separator', () => { + const result = formatNumber(1000); + expect(result).toBe('1,000'); + }); + + it('should return the same number if it is less than 1000', () => { + const result = formatNumber(500); + expect(result).toBe('500'); + }); +}); +``` + +在测试用例中,您可以使用 `expect` 函数来断言测试结果是否符合预期。`expect` 函数可以与各种匹配器(matchers)一起使用,例如 `toBe`、`toEqual`、`toBeTruthy` 等。 + +#### 运行单元测试 + +通过运行以下命令来执行单元测试: + +``` +npm run test +``` + +这将运行所有的单元测试,并输出测试结果。 + +## 测试策略 + +为了编写有效的测试用例,您可以考虑以下测试策略: + +- **边界条件测试**:测试输入的边界条件,例如最小值、最大值、空值等。 +- **异常情况测试**:测试处理异常情况的代码,例如错误处理、异常情况下的回退等。 +- **功能测试**:测试应用的各个功能模块是否正常工作,包括用户交互、数据处理等。 +- **兼容性测试**:测试应用在不同浏览器和设备上的兼容性。 +- **性能测试**:测试应用在不同负载下的性能表现,例如响应时间、资源占用等。 + +同时,请确保您的测试用例具有良好的覆盖率,覆盖到应用中的关键代码和功能。 + +通过合理编写和执行单元测试、集成测试和端到端测试,您可以提高应用的质量和稳定性,并及时发现和修复潜在的问题。 + +[vitest-url]: https://vitest.dev/ diff --git a/DigitalHumanWeb/contributing/Home.md b/DigitalHumanWeb/contributing/Home.md new file mode 100644 index 0000000..45c7e1f --- /dev/null +++ b/DigitalHumanWeb/contributing/Home.md @@ -0,0 +1,87 @@ +
+ + + + + +

Lobe Chat Contributing Wiki

+ +LobeChat is an open-source, extensible ([Function Calling][fc-url]), high-performance chatbot framework.
It supports one-click free deployment of your private ChatGPT/LLM web application. + +[Usage Documents](https://lobehub.com/docs) | [使用指南](https://lobehub.com/docs) + +
+ +![](https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/rainbow.png) + + + +### 🤯 Basic + +- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN) +- [Code Style and Contribution Guidelines](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines) | [代码风格与贡献指南](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines.zh-CN) +- [Complete Guide to LobeChat Feature Development](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [LobeChat 功能开发完全指南](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN) +- [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN) +- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN) +- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN) +- [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [如何开发一个新功能:前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN) +- [New Authentication Provider Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers) | [新身份验证方式开发指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers.zh-CN) +- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN) +- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN) +- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN) + +
+ +### 🌎 Internationalization + +- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN) +- [New Locale Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale) | [新语种添加指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale.zh-CN) + +
+ +### ⌨️ State Management + +- [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN) +- [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN) + +
+ +### 🤖 Agents + +- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md) + +
+ +### 🧩 Plugins + +- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md) +- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com) + +
+ +### 📊 Others + +- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN) + +
+ + + +--- + +

📝 License

+ +[![][fossa-license-shield]][fossa-license-url] + +
+ +Copyright © 2023 [LobeHub][profile-url].
+This project is [MIT][license-url] licensed. + + + +[fc-url]: https://sspai.com/post/81986 +[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large +[fossa-license-url]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat +[license-url]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE +[profile-url]: https://github.com/lobehub diff --git a/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.md b/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.md new file mode 100644 index 0000000..ba2c4e9 --- /dev/null +++ b/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.md @@ -0,0 +1,62 @@ +# New Locale Guide + +LobeChat uses [lobe-i18n](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) as the i18n solution, which allows for quick addition of new language support in the application. + +## TOC + +- [Adding New Language Support](#adding-new-language-support) + - [Step 1: Update the Internationalization Configuration File](#step-1-update-the-internationalization-configuration-file) + - [Step 2: Automatically Translate Language Files](#step-2-automatically-translate-language-files) + - [Step 3: Submit and Review Your Changes](#step-3-submit-and-review-your-changes) + - [Additional Information](#additional-information) + +## Adding New Language Support + +To add new language internationalization support in LobeChat (for example, adding Vietnamese `vi-VN`), please follow the steps below: + +### Step 1: Update the Internationalization Configuration File + +1. Open the `.i18nrc.js` file. You can find this file in the project's root directory. +2. Add the new language code to the configuration file. For example, to add Vietnamese, you need to add `'vi-VN'` to the configuration file. + +```js +module.exports = { + // ... Other configurations + + outputLocales: [ + 'zh-TW', + 'en-US', + 'ru-RU', + 'ja-JP', + // ...Other languages + + 'vi-VN', // Add 'vi-VN' to the array + ], +}; +``` + +### Step 2: Automatically Translate Language Files + +LobeChat uses the `lobe-i18n` tool to automatically translate language files, so manual updating of i18n files is not required. + +Run the following command to automatically translate and generate the Vietnamese language files: + +```bash +npm run i18n +``` + +This will utilize the `lobe-i18n` tool to process the language files. + +### Step 3: Submit and Review Your Changes + +Once you have completed the above steps, you need to submit your changes and create a Pull Request. + +Ensure that you follow LobeChat's contribution guidelines and provide a necessary description to explain your changes. For example, refer to a similar previous Pull Request [#759](https://github.com/lobehub/lobe-chat/pull/759). + +### Additional Information + +- After submitting your Pull Request, please patiently wait for the project maintainers to review it. +- If you encounter any issues, you can reach out to the LobeChat community for assistance. +- For more accurate results, ensure that your Pull Request is based on the latest main branch and stays in sync with the main branch. + +By following the above steps, you can successfully add new language support to LobeChat and ensure that the application provides a localized experience for more users. diff --git a/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.zh-CN.md b/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.zh-CN.md new file mode 100644 index 0000000..6072e16 --- /dev/null +++ b/DigitalHumanWeb/contributing/Internationalization/Add-New-Locale.zh-CN.md @@ -0,0 +1,62 @@ +# 新语种添加指南 + +LobeChat 使用 [lobe-i18n](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) 作为 i18n 解决方案,可以在应用中快速添加新的语言支持。 + +## TOC + +- [添加新的语言支持](#添加新的语言支持) + - [步骤 1: 更新国际化配置文件](#步骤-1-更新国际化配置文件) + - [步骤 2: 自动翻译语言文件](#步骤-2-自动翻译语言文件) + - [步骤 3: 提交和审查你的更改](#步骤-3-提交和审查你的更改) + - [附加信息](#附加信息) + +## 添加新的语言支持 + +为了在 LobeChat 中添加新的语言国际化支持,(例如添加越南语 `vi-VN`),请按照以下步骤操作: + +### 步骤 1: 更新国际化配置文件 + +1. 打开 `.i18nrc.js` 文件。你可以在项目的根目录中找到此文件。 +2. 将新的语言代码添加到配置文件中。例如,为了添加越南语,你需要在配置文件中添加 `'vi-VN'`。 + +```js +module.exports = { + // ... 其他配置 + + outputLocales: [ + 'zh-TW', + 'en-US', + 'ru-RU', + 'ja-JP', + // ...其他语言 + + 'vi-VN', // 在数组中添加 'vi-VN' + ], +}; +``` + +### 步骤 2: 自动翻译语言文件 + +LobeChat 使用 `lobe-i18n` 工具来自动翻译语言文件,因此不需要手动更新 i18n 文件。 + +运行以下命令来自动翻译并生成越南语的语言文件: + +```bash +npm run i18n +``` + +这将会利用 `lobe-i18n` 工具来处理语言文件。 + +### 步骤 3: 提交和审查你的更改 + +一旦你完成了上述步骤,你需要提交你的更改并创建一个 Pull Request。 + +请确保你遵循了 LobeChat 的贡献指南,并提供必要的描述来说明你的更改。例如,参考之前的类似 Pull Request [#759](https://github.com/lobehub/lobe-chat/pull/759)。 + +### 附加信息 + +- 提交你的 Pull Request 后,请耐心等待项目维护人员的审查。 +- 如果遇到任何问题,可以联系 LobeChat 社区寻求帮助。 +- 为了更精确的结果,确保你的 Pull Request 是基于最新的主分支,并且与主分支保持同步。 + +通过遵循上述步骤,你可以成功为 LobeChat 添加新的语言支持,并且确保应用能够为更多用户提供本地化的体验。 diff --git a/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.md b/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.md new file mode 100644 index 0000000..c5b3f8d --- /dev/null +++ b/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.md @@ -0,0 +1,125 @@ +# Internationalization Implementation Guide + +Welcome to the LobeChat Internationalization Implementation Guide. This document will guide you through understanding the internationalization mechanism of LobeChat, including file structure and how to add new languages. LobeChat uses `i18next` and `lobe-i18n` as the internationalization solution, aiming to provide users with seamless multilingual support. + +## TOC + +- [Internationalization Overview](#internationalization-overview) +- [File Structure](#file-structure) +- [Core Implementation Logic](#core-implementation-logic) +- [Adding Support for New Languages](#adding-support-for-new-languages) +- [Resources and Further Reading](#resources-and-further-reading) + +## Internationalization Overview + +Internationalization (i18n for short) is the process of enabling an application to adapt to different languages and regions. In LobeChat, we support multiple languages and achieve dynamic language switching and content localization through the `i18next` library. Our goal is to provide a localized experience for global users. + +## File Structure + +In the LobeChat project, internationalization-related files are organized as follows: + +- `src/locales/default`: Contains translation files for the default development language (Chinese), which we use as Chinese. +- `locales`: Contains folders for all supported languages, with each language folder containing the respective translation files generated by lobe-i18n. + +In the directory structure of `src/locales`, the `default` folder contains the original translation files (Chinese), while each other language folder contains JSON translation files for the respective language. The files in each language folder correspond to the TypeScript files in the `default` folder, ensuring consistency in the structure of translation files across languages. + +``` +src/locales +├── create.ts +├── default +│ ├── chat.ts +│ ├── common.ts +│ ├── error.ts +│ ├── index.ts +│ ├── market.ts +│ ├── migration.ts +│ ├── plugin.ts +│ ├── setting.ts +│ ├── tool.ts +│ └── welcome.ts +└── resources.ts +``` + +The file structure generated by lobe-i18n is as follows: + +``` +locales +├── ar +│ ├── chat.json +│ ├── common.json +│ ├── error.json +│ └── ... (other translation files) +├── de-DE +│ ├── chat.json +│ ├── common.json +│ ├── error.json +│ └── ... (other translation files) +├── en-US +├── ... (other language directories) +├── zh-CN +└── zh-TW +``` + +## Core Implementation Logic + +The internationalization core implementation logic of LobeChat is as follows: + +- Initialize and configure using the `i18next` library. +- Automatically detect the user's language preference using `i18next-browser-languagedetector`. +- Dynamically load translation resources using `i18next-resources-to-backend`. +- Set the direction of the HTML document (LTR or RTL) based on the user's language preference. + +Here is a simplified pseudo code example to illustrate the core implementation logic of internationalization in LobeChat: + +```ts +import i18n from 'i18next'; +import LanguageDetector from 'i18next-browser-languagedetector'; +import resourcesToBackend from 'i18next-resources-to-backend'; +import { isRtlLang } from 'rtl-detect'; + +// Create i18n instance and configure +const createI18nInstance = (lang) => { + const i18nInstance = i18n + .use(LanguageDetector) // Use language detection + .use( + resourcesToBackend((language, namespace) => { + // Dynamically load translation resources for the corresponding language + return import(`path/to/locales/${language}/${namespace}.json`); + }), + ); + + // Listen for language change events and dynamically set document direction + i18nInstance.on('languageChanged', (language) => { + const direction = isRtlLang(language) ? 'rtl' : 'ltr'; + document.documentElement.dir = direction; // Set HTML document direction + }); + + // Initialize i18n instance + i18nInstance.init({ + // Relevant configurations + }); + + return i18nInstance; +}; +``` + +In this example, we demonstrate how to use `i18next` and related plugins to initialize internationalization settings. We dynamically import translation resources and respond to language change events to adjust the text direction of the page. This process provides LobeChat with flexible multilingual support capabilities. + +## Adding Support for New Languages + +We have already supported a variety of languages globally through the following efforts: + +- [✨ feat: adding Arabic Language Support #1049](https://github.com/lobehub/lobe-chat/pull/1049) +- [🌐 style: Add Vietnamese files and add the vi-VN option in the General Settings #860](https://github.com/lobehub/lobe-chat/pull/860) +- [🌐 style: support it-IT nl-NL and pl-PL locales #759](https://github.com/lobehub/lobe-chat/pull/759) +- [🌐 feat(locale): Add fr-FR (#637) #645](https://github.com/lobehub/lobe-chat/pull/645) +- [🌐 Add russian localy #137](https://github.com/lobehub/lobe-chat/pull/137) + +To add support for new languages, please refer to the detailed steps in the [New Locale Addition Guide](Add-New-Locale.en-US). + +## Resources and Further Reading + +- [i18next Official Documentation](https://www.i18next.com/) +- [lobe-i18n Tool Description](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) + +By following this guide, you can better understand and participate in the internationalization work of LobeChat, providing a seamless multilingual experience for global users. diff --git a/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.zh-CN.md b/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.zh-CN.md new file mode 100644 index 0000000..9d501fa --- /dev/null +++ b/DigitalHumanWeb/contributing/Internationalization/Internationalization-Implementation.zh-CN.md @@ -0,0 +1,125 @@ +# 国际化实现指南 + +欢迎阅读 LobeChat 国际化实现指南。本文档将指导你了解 LobeChat 的国际化机制,包括文件结构、如何添加新语种。LobeChat 采用 `i18next` 和 `lobe-i18n` 作为国际化解决方案,旨在为用户提供流畅的多语言支持。 + +## TOC + +- [国际化概述](#国际化概述) +- [文件结构](#文件结构) +- [核心实现逻辑](#核心实现逻辑) +- [添加新的语言支持](#添加新的语言支持) +- [资源和进一步阅读](#资源和进一步阅读) + +## 国际化概述 + +国际化(Internationalization,简称为 i18n)是一个让应用能够适应不同语言和地区的过程。在 LobeChat 中,我们支持多种语言,并通过 `i18next` 库来实现语言的动态切换和内容的本地化。我们的目标是让 LobeChat 能够为全球用户提供本地化的体验。 + +## 文件结构 + +在 LobeChat 的项目中,国际化相关的文件被组织如下: + +- `src/locales/default`: 包含默认开发语言(中文)的翻译文件,我们作为中文。 +- `locales`: 包含所有支持的语言文件夹,每个语言文件夹中包含相应语言的翻译文件,这些翻译文件通过 lobe-i18n 自动生成。 + +在 `src/locales` 这个目录结构中,`default` 文件夹包含了原始的翻译文件(中文),其他每个语言文件夹则包含了相应语言的 JSON 翻译文件。每个语言文件夹中的文件对应 `default` 文件夹中的 TypeScript 文件,确保了各语种之间的翻译文件结构一致性。 + +``` +src/locales +├── create.ts +├── default +│ ├── chat.ts +│ ├── common.ts +│ ├── error.ts +│ ├── index.ts +│ ├── market.ts +│ ├── migration.ts +│ ├── plugin.ts +│ ├── setting.ts +│ ├── tool.ts +│ └── welcome.ts +└── resources.ts +``` + +通过 lobe-i18n 自动生成的文件结构如下: + +``` +locales +├── ar +│ ├── chat.json +│ ├── common.json +│ ├── error.json +│ └── ... (其他翻译文件) +├── de-DE +│ ├── chat.json +│ ├── common.json +│ ├── error.json +│ └── ... (其他翻译文件) +├── en-US +├── ... (其他语种目录) +├── zh-CN +└── zh-TW +``` + +## 核心实现逻辑 + +LobeChat 的国际化核心实现逻辑如下: + +- 使用 `i18next` 库进行初始化和配置。 +- 使用 `i18next-browser-languagedetector` 自动检测用户的语言偏好。 +- 使用 `i18next-resources-to-backend` 动态加载翻译资源。 +- 根据用户的语言偏好,设置 HTML 文档的方向(LTR 或 RTL)。 + +以下是一个简化的伪代码示例,用以说明 LobeChat 国际化的核心实现逻辑: + +```ts +import i18n from 'i18next'; +import LanguageDetector from 'i18next-browser-languagedetector'; +import resourcesToBackend from 'i18next-resources-to-backend'; +import { isRtlLang } from 'rtl-detect'; + +// 创建 i18n 实例并配置 +const createI18nInstance = (lang) => { + const i18nInstance = i18n + .use(LanguageDetector) // 使用语言检测 + .use( + resourcesToBackend((language, namespace) => { + // 动态加载对应语言的翻译资源 + return import(`path/to/locales/${language}/${namespace}.json`); + }), + ); + + // 监听语言变化事件,动态设置文档方向 + i18nInstance.on('languageChanged', (language) => { + const direction = isRtlLang(language) ? 'rtl' : 'ltr'; + document.documentElement.dir = direction; // 设置 HTML 文档方向 + }); + + // 初始化 i18n 实例 + i18nInstance.init({ + // 相关配置 + }); + + return i18nInstance; +}; +``` + +在这个示例中,我们展示了如何使用 `i18next` 和相关插件来初始化国际化设置。我们动态导入了翻译资源,并响应语言变化事件来调整页面的文本方向。这个过程为 LobeChat 提供了灵活的多语言支持能力。 + +## 添加新的语言支持 + +我们通过以下工作,已经支持了全球多种语言: + +- [✨ feat: adding Arabic Language Support #1049](https://github.com/lobehub/lobe-chat/pull/1049) +- [🌐 style: Add Vietnamese files and add the vi-VN option in the General Settings #860](https://github.com/lobehub/lobe-chat/pull/860) +- [🌐 style: support it-IT nl-NL and pl-PL locales #759](https://github.com/lobehub/lobe-chat/pull/759) +- [🌐 feat(locale): Add fr-FR (#637) #645](https://github.com/lobehub/lobe-chat/pull/645) +- [🌐 Add russian localy #137](https://github.com/lobehub/lobe-chat/pull/137) + +要添加新的语种支持, 详细步骤请参考:[新语种添加指南](Add-New-Locale.zh-CN.md)。 + +## 资源和进一步阅读 + +- [i18next 官方文档](https://www.i18next.com/) +- [lobe-i18n 工具说明](https://github.com/lobehub/lobe-cli-toolbox/tree/master/packages/lobe-i18n) + +通过遵循本指南,你可以更好地理解和参与到 LobeChat 的国际化工作中,为全球用户提供无缝的多语言体验。 diff --git a/DigitalHumanWeb/contributing/Others/Lighthouse.md b/DigitalHumanWeb/contributing/Others/Lighthouse.md new file mode 100644 index 0000000..8cd92f7 --- /dev/null +++ b/DigitalHumanWeb/contributing/Others/Lighthouse.md @@ -0,0 +1,65 @@ +# Lighthouse Reports + +#### TOC + +- [Welcome Page](#welcome-page) +- [Chat Page](#chat-page) +- [Market Page](#market-page) +- [Settings Page](#settings-page) + +## Welcome Page + +> **Info**\ +> + +| Desktop | Mobile | +| :---------------------------------------------: | :--------------------------------------------: | +| ![][welcome-desktop] | ![][welcome-mobile] | +| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] | + +## Chat Page + +> **Info**\ +> + +| Desktop | Mobile | +| :------------------------------------------: | :-----------------------------------------: | +| ![][chat-desktop] | ![][chat-mobile] | +| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] | + +## Market Page + +> **Info**\ +> + +| Desktop | Mobile | +| :--------------------------------------------: | :-------------------------------------------: | +| ![][market-desktop] | ![][market-mobile] | +| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] | + +## Settings Page + +> **Info**\ +> + +| Desktop | Mobile | +| :----------------------------------------------: | :---------------------------------------------: | +| ![][settings-desktop] | ![][settings-mobile] | +| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] | + +[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 +[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html +[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg +[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html +[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg +[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html +[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg +[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html +[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg +[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html +[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg +[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html +[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg +[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html diff --git a/DigitalHumanWeb/contributing/Others/Lighthouse.zh-CN.md b/DigitalHumanWeb/contributing/Others/Lighthouse.zh-CN.md new file mode 100644 index 0000000..95d6741 --- /dev/null +++ b/DigitalHumanWeb/contributing/Others/Lighthouse.zh-CN.md @@ -0,0 +1,65 @@ +# Lighthouse 测试报告 + +#### TOC + +- [Welcome 欢迎页面](#welcome-欢迎页面) +- [Chat 聊天页面](#chat-聊天页面) +- [Market 市场页面](#market-市场页面) +- [Settings 设置页面](#settings-设置页面) + +## Welcome 欢迎页面 + +> **Info**\ +> + +| Desktop | Mobile | +| :---------------------------------------------: | :--------------------------------------------: | +| ![][welcome-desktop] | ![][welcome-mobile] | +| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] | + +## Chat 聊天页面 + +> **Info**\ +> + +| Desktop | Mobile | +| :------------------------------------------: | :-----------------------------------------: | +| ![][chat-desktop] | ![][chat-mobile] | +| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] | + +## Market 市场页面 + +> **Info**\ +> + +| Desktop | Mobile | +| :--------------------------------------------: | :-------------------------------------------: | +| ![][market-desktop] | ![][market-mobile] | +| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] | + +## Settings 设置页面 + +> **Info**\ +> + +| Desktop | Mobile | +| :----------------------------------------------: | :---------------------------------------------: | +| ![][settings-desktop] | ![][settings-mobile] | +| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] | + +[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 +[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html +[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg +[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html +[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg +[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html +[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg +[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html +[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg +[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html +[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg +[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html +[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg +[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html diff --git a/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.md b/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.md new file mode 100644 index 0000000..9529413 --- /dev/null +++ b/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.md @@ -0,0 +1,224 @@ +# Best Practices for State Management + +LobeChat differs from traditional CRUD web applications in that it involves a large amount of rich interactive capabilities. Therefore, it is crucial to design a data flow architecture that is easy to develop and maintain. This document will introduce the best practices for data flow management in LobeChat. + +## TOC + +- [Key Concepts](#key-concepts) +- [Hierarchical Structure](#hierarchical-structure) + - [Best Practices for LobeChat SessionStore Directory Structure](#best-practices-for-lobechat-sessionstore-directory-structure) +- [Implementation of SessionStore](#implementation-of-sessionstore) + +## Key Concepts + +| Concept | Explanation | +| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| store | The store contains the application's state and actions. It allows access to and modification of the state during application rendering. | +| state | State refers to the data of the application, storing the current state of the application. Any change in the state will **trigger a re-rendering** to reflect the new state. | +| action | An action is an operation function that describes the interactive events occurring in the application. Actions are typically triggered by user interactions, network requests, or timers. Actions can be **synchronous** or **asynchronous**. | +| reducer | A reducer is a pure function that takes the current state and action as parameters and returns a new state. It is used to update the application's state based on the action type. A reducer is a pure function with no side effects, therefore it is always a **synchronous** function. | +| selector | A selector is a function used to retrieve specific data from the application's state. It takes the application's state as a parameter and returns computed or transformed data. Selectors can combine parts of the state or multiple states to generate derived data. Selectors are commonly used to map the application's state to a component's props for the component's use. | +| slice | A slice is a concept used to express a part of the data model state. It specifies a state slice and its related state, action, reducer, and selector. Using slices, a large store can be divided into smaller, maintainable subtypes. | + +## Hierarchical Structure + +The structure of the Store can vary greatly depending on the complexity: + +- **Low Complexity**: Generally includes 2 to 5 states and 3 to 4 actions. In this case, the structure usually consists of a `store.ts` and an `initialState.ts`. + +```bash +DataFill/store +├── index.ts +└── initialState.ts +``` + +- **Moderate Complexity**: Typically involves 5 to 15 states and 5 to 10 actions, with the possibility of selectors for derived states and reducers to simplify data changes. The structure usually includes a `store.ts`, an `initialState.ts`, and a `selectors.ts`/`reducer.ts`. + +```bash +IconPicker/store +├── index.ts +├── initialState.ts +├── selectors.ts +└── store.ts +``` + +```bash +SortableList/store +├── index.ts +├── initialState.ts +├── listDataReducer.ts +└── store.ts +``` + +- **Medium Complexity**: Involves 15 to 30 states and 10 to 20 actions, often requiring the use of multiple slices to manage different actions. The following code represents the internal data flow of the `SortableTree` component: + +```bash +SortableTree/store +├── index.ts +├── initialState.ts +├── selectors.ts +├── slices +│ ├── crudSlice.ts +│ ├── dndSlice.ts +│ └── selectionSlice.ts +├── store.ts +└── treeDataReducer.ts +``` + +- **High Complexity**: Involves over 30 states and 20 actions, requiring modular cohesion using slices. Each slice declares its own initState, actions, reducers, and selectors. + +The directory structure of the previous version of SessionStore for LobeChat, with high complexity, implements a large amount of business logic. However, with the modularization of slices and the fractal architecture, it is easy to find the corresponding modules, making it easy to maintain and iterate on new features. + +```bash +LobeChat SessionStore +├── index.ts +├── initialState.ts +├── selectors.ts +├── slices +│ ├── agentConfig +│ │ ├── action.ts +│ │ ├── index.ts +│ │ ├── initialState.ts +│ │ └── selectors.ts +│ ├── chat +│ │ ├── actions +│ │ │ ├── index.ts +│ │ │ ├── message.ts +│ │ │ └── topic.ts +│ │ ├── index.ts +│ │ ├── initialState.ts +│ │ ├── reducers +│ │ │ ├── message.ts +│ │ │ └── topic.ts +│ │ ├── selectors +│ │ │ ├── chat.ts +│ │ │ ├── index.ts +│ │ │ ├── token.ts +│ │ │ ├── topic.ts +│ │ │ └── utils.ts +│ │ └── utils.ts +│ └── session +│ ├── action.ts +│ ├── index.ts +│ ├── initialState.ts +│ ├── reducers +│ │ └── session.ts +│ └── selectors +│ ├── export.ts +│ ├── index.ts +│ └── list.ts +└── store.ts +``` + +Based on the provided directory structure of LobeChat SessionStore, we can update the previous document and convert the examples to the implementation of LobeChat's SessionStore. The following is a portion of the updated document: + +### Best Practices for LobeChat SessionStore Directory Structure + +In the LobeChat application, session management is a complex functional module, so we use the Slice pattern to organize the data flow. Below is the directory structure of LobeChat SessionStore, where each directory and file has its specific purpose: + +```bash +src/store/session +├── helpers.ts # Helper functions +├── hooks # Custom React hooks +│   ├── index.ts # Export file for hooks +│   ├── useEffectAfterHydrated.ts # Hook for effects after session hydration +│   ├── useOnFinishHydrationSession.ts # Hook for session hydration completion +│   ├── useSessionChatInit.ts # Hook for session chat initialization +│   └── useSessionHydrated.ts # Hook for session hydration status +├── index.ts # Aggregated export file for SessionStore +├── initialState.ts # Aggregated initialState for all slices +├── selectors.ts # Selectors exported from various slices +├── slices # Separated functional modules +│   ├── agent # State and operations related to agents +│   │   ├── action.ts # Action definitions related to agents +│   │   ├── index.ts # Entry file for agent slice +│   │   ├── selectors.test.ts # Tests for agent-related selectors +│   │   └── selectors.ts # Selector definitions related to agents +│   └── session # State and operations related to sessions +│   ├── action.test.ts # Tests for session-related actions +│   ├── action.ts # Action definitions related to sessions +│   ├── helpers.ts # Helper functions related to sessions +│   ├── initialState.ts # Initial state for session slice +│   └── selectors # Session-related selectors and their tests +│   ├── export.ts # Aggregated export for session selectors +│   ├── index.ts # Entry file for session selectors +│   ├── list.test.ts # Tests for list selectors +│   └── list.ts # Definitions for list-related selectors +└── store.ts # Creation and usage of SessionStore +``` + +## Implementation of SessionStore + +In LobeChat, the SessionStore is designed as the core module for managing session state and logic. It consists of multiple Slices, with each Slice managing a relevant portion of state and logic. Below is a simplified example of the SessionStore implementation: + +#### store.ts + +```ts +import { PersistOptions, devtools, persist, subscribeWithSelector } from 'zustand/middleware'; +import { shallow } from 'zustand/shallow'; +import { devtools } from 'zustand/middleware'; +import { createWithEqualityFn } from 'zustand/traditional'; + +import { SessionStoreState, initialState } from './initialState'; +import { AgentAction, createAgentSlice } from './slices/agent/action'; +import { SessionAction, createSessionSlice } from './slices/session/action'; + +// =============== Aggregate createStoreFn ============ // + +export type SessionStore = SessionAction & AgentAction & SessionStoreState; +const createStore: StateCreator = (...parameters) => ({ + ...initialState, + ...createAgentSlice(...parameters), + ...createSessionSlice(...parameters), +}); + + + +// =============== Implement useStore ============ // + +export const useSessionStore = createWithEqualityFn()( + persist( + subscribeWithSelector( + devtools(createStore, { + name: 'LobeChat_Session' + (isDev ? '_DEV' : ''), + }), + ), + persistOptions, + ), + shallow, +); + +``` + +In this `store.ts` file, we create a `useSessionStore` hook that uses the `zustand` library to create a global state manager. We merge the initialState and the state and actions of each Slice to create a complete SessionStore. + +#### slices/session/action.ts + +```ts +import { StateCreator } from 'zustand'; + +import { SessionStore } from '@/store/session'; + +export interface SessionActions { + /** + * A custom hook that uses SWR to fetch sessions data. + */ + useFetchSessions: () => SWRResponse; +} + +export const createSessionSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionAction +> = (set, get) => ({ + useFetchSessions: () => { + // ...logic for initializing sessions + }, + // ...implementation of other actions +}); +``` + +In the `action.ts` file, we define a `SessionActions` interface to describe session-related actions and implement a `useFetchSessions` function to create these actions. Then, we merge these actions with the initial state to form the session-related Slice. + +Through this layered and modular approach, we can ensure that LobeChat's SessionStore is clear, maintainable, and easy to extend and test. diff --git a/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.zh-CN.md b/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.zh-CN.md new file mode 100644 index 0000000..5310cb0 --- /dev/null +++ b/DigitalHumanWeb/contributing/State-Management/State-Management-Intro.zh-CN.md @@ -0,0 +1,216 @@ +# 状态管理最佳实践 + +LobeChat 不同于传统 CRUD 的网页,存在大量的富交互能力,如何设计一个易于开发与易于维护的数据流架构非常重要。本篇文档将介绍 LobeChat 中的数据流管理最佳实践。 + +## TOC + +- [概念要素](#概念要素) +- [结构分层](#结构分层) + - [LobeChat SessionStore 目录结构最佳实践](#lobechat-sessionstore-目录结构最佳实践) +- [SessionStore 的实现](#sessionstore-的实现) + +## 概念要素 + +| 概念名词 | 解释 | +| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| store | 状态库 (store),包含存储应用的状态、动作。允许在应用渲染中访问和修改状态。 | +| state | 状态 (state) 是指应用程序的数据,存储了应用程序的当前状态,状态的变化**一定会触发应用的重新渲染**,以反映新的状态。 | +| action | 动作 (action) 是一个操作函数,它描述了应用程序中发生的交互事件。动作通常是由用户交互、网络请求或定时器等触发。 action 可以是**同步**的,也可以是**异步**的。 | +| reducer | 归约器 (reducer) 是一个纯函数,它接收当前状态和动作作为参数,并返回一个新的状态。它用于根据动作类型来更新应用程序的状态。Reducer 是一个纯函数,不存在副作用,因此一定是 **同步** 函数。 | +| selector | 选择器 (selector) 是一个函数,用于从应用程序的状态中获取特定的数据。它接收应用程序的状态作为参数,并返回经过计算或转换后的数据。Selector 可以将状态的一部分或多个状态组合起来,以生成派生的数据。Selector 通常用于将应用程序的状态映射到组件的 props,以供组件使用。 | +| slice | 切片 (slice) 是一个概念,用于表达数据模型状态的一部分。它指定了一个状态切片(slice),以及与该切片相关的 state、action、reducer 和 selector。使用 Slice 可以将大型的 Store 拆分为更小的、可维护的子类型。 | + +## 结构分层 + +在不同的复杂度下,我们可以将 Store 的结构组织可以由很大的不同: + +- **较低复杂度**:一般包含 2\~5 个 state 、3 \~ 4 个 action。此时的结构一般直接一个 `store.ts` + 一个 `initialState.ts` 即可。 + +```bash +DataFill/store +├── index.ts +└── initialState.ts +``` + +- **一般复杂度** :一般复杂度存在 5 \~ 15 个 state、 5 \~ 10 个 action,可能会存在 selector 实现派生状态,也有可能存在 reducer 简化部分数据变更的复杂度。此时的结构一般为一个 `store.ts` + 一个 `initialState.ts` + 一个 `selectors.ts`/`reducer.ts`。 + +```bash +IconPicker/store +├── index.ts +├── initialState.ts +├── selectors.ts +└── store.ts +``` + +```bash +SortableList/store +├── index.ts +├── initialState.ts +├── listDataReducer.ts +└── store.ts +``` + +- **中等复杂度** : 中等复杂度存在 15 \~ 30 个 state、 10 \~ 20 个 action,大概率会存在 selector 来聚合派生状态,大概率存在 reducer 简化部分数据变更的复杂度。 + +此时结构,用单一的 action store 已经较难维护,往往会拆解出来多个 slice 用于管理不同的 action。 下方的代码代表了 `SortableTree` 组件的内部数据流: + +```bash +SortableTree/store +├── index.ts +├── initialState.ts +├── selectors.ts +├── slices +├── crudSlice.ts +├── dndSlice.ts +└── selectionSlice.ts +├── store.ts +└── treeDataReducer.ts +``` + +- 高等复杂度:高等复杂度存在 30 个以上的 state、 20 个以上的 action。必然需要 slice 做模块化内聚。在每个 slice 中都各自声明了各自的 initState、 action、reducer 与 selector。 + +下述这个数据流的目录结构是之前一版 SessionStore,具有很高的复杂度,实现了大量的业务逻辑。但借助于 slice 的模块化和分形架构的心智,我们可以很容易地找到对应的模块,新增功能与迭代都很易于维护。 + +```bash +LobeChat SessionStore +├── index.ts +├── initialState.ts +├── selectors.ts +├── slices +│ ├── agentConfig +│ │ ├── action.ts +│ │ ├── index.ts +│ │ ├── initialState.ts +│ │ └── selectors.ts +│ ├── chat +│ │ ├── actions +│ │ │ ├── index.ts +│ │ │ ├── message.ts +│ │ │ └── topic.ts +│ │ ├── index.ts +│ │ ├── initialState.ts +│ │ ├── reducers +│ │ │ ├── message.ts +│ │ │ └── topic.ts +│ │ ├── selectors +│ │ │ ├── chat.ts +│ │ │ ├── index.ts +│ │ │ ├── token.ts +│ │ │ ├── topic.ts +│ │ │ └── utils.ts +│ │ └── utils.ts +│ └── session +│ ├── action.ts +│ ├── index.ts +│ ├── initialState.ts +│ ├── reducers +│ │ └── session.ts +│ └── selectors +│ ├── export.ts +│ ├── index.ts +│ └── list.ts +└── store.ts +``` + +### LobeChat SessionStore 目录结构最佳实践 + +在 LobeChat 应用中,由于会话管理是一个复杂的功能模块,因此我们采用了 [slice 模式](https://github.com/pmndrs/zustand/blob/main/docs/guides/slices-pattern.md) 来组织数据流。下面是 LobeChat SessionStore 的目录结构,其中每个目录和文件都有其特定的用途: + +```fish +src/store/session +├── index.ts # SessionStore 的聚合导出文件 +├── initialState.ts # 聚合了所有 slice 的 initialState +├── selectors.ts # 从各个 slices 导出的 selector +├── store.ts # SessionStore 的创建和使用 +├── helpers.ts # 辅助函数 +└── slices # 各个独立的功能切片 +    ├── agent # 助理 Slice +    │   ├── action.ts +    │   ├── index.ts +    │   └── selectors.ts +    └── session # 会话 Slice +       ├── action.ts +       ├── helpers.ts +       ├── initialState.ts +       └── selectors +          ├── export.ts +          ├── list.ts +          └── index.ts + +``` + +## SessionStore 的实现 + +在 LobeChat 中,SessionStore 被设计为管理会话状态和逻辑的核心模块。它由多个 Slices 组成,每个 Slice 管理一部分相关的状态和逻辑。下面是一个简化的 SessionStore 的实现示例: + +#### store.ts + +```ts +import { PersistOptions, devtools, persist, subscribeWithSelector } from 'zustand/middleware'; +import { shallow } from 'zustand/shallow'; +import { devtools } from 'zustand/middleware'; +import { createWithEqualityFn } from 'zustand/traditional'; + +import { SessionStoreState, initialState } from './initialState'; +import { AgentAction, createAgentSlice } from './slices/agent/action'; +import { SessionAction, createSessionSlice } from './slices/session/action'; + +// =============== 聚合 createStoreFn ============ // + +export type SessionStore = SessionAction & AgentAction & SessionStoreState; +const createStore: StateCreator = (...parameters) => ({ + ...initialState, + ...createAgentSlice(...parameters), + ...createSessionSlice(...parameters), +}); + + + +// =============== 实装 useStore ============ // + +export const useSessionStore = createWithEqualityFn()( + persist( + subscribeWithSelector( + devtools(createStore, { + name: 'LobeChat_Session' + (isDev ? '_DEV' : ''), + }), + ), + persistOptions, + ), + shallow, +); + +``` + +在这个 `store.ts` 文件中,我们创建了一个 `useSessionStore` 钩子,它使用 `zustand` 库来创建一个全局状态管理器。我们将 initialState 和每个 Slice 的状态和动作合并,以创建完整的 SessionStore。 + +#### slices/session/action.ts + +```ts +import { StateCreator } from 'zustand'; + +import { SessionStore } from '@/store/session'; + +export interface SessionActions { + /** + * A custom hook that uses SWR to fetch sessions data. + */ + useFetchSessions: () => SWRResponse; +} + +export const createSessionSlice: StateCreator< + SessionStore, + [['zustand/devtools', never]], + [], + SessionAction +> = (set, get) => ({ + useFetchSessions: () => { + // ...初始化会话的逻辑 + }, + // ...其他动作的实现 +}); +``` + +在 `action.ts` 文件中,我们定义了一个 `SessionActions` 接口来描述会话相关的动作,并且实现了一个 `useFetchSessions` 函数来创建这些动作。然后,我们将这些动作与初始状态合并,以形成会话相关的 Slice。 + +通过这种结构分层和模块化的方法,我们可以确保 LobeChat 的 SessionStore 是清晰、可维护的,同时也便于扩展和测试。 diff --git a/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.md b/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.md new file mode 100644 index 0000000..4271a66 --- /dev/null +++ b/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.md @@ -0,0 +1,68 @@ +# Data Store Selector + +Selectors are data retrieval modules under the LobeChat data flow development framework. Their role is to extract data from the store using specific business logic for consumption by components. + +Taking `src/store/plugin/selectors.ts` as an example: + +This TypeScript code snippet defines an object named `pluginSelectors`, which contains a series of selector functions used to retrieve data from the plugin storage state. Selectors are functions that extract and derive data from a Redux store (or similar state management library). This specific example is for managing the state related to the frontend application's plugin system. + +Here are some key points to note: + +- `enabledSchema`: A function that returns an array of `ChatCompletionFunctions` filtered based on the enabled plugin list `enabledPlugins`. It appends the plugin identifier as a prefix to the API names to ensure uniqueness and uses the `uniqBy` function from the Lodash library to remove duplicates. +- `onlinePluginStore`: Returns the current online plugin list. +- `pluginList`: Returns the list of plugins, including custom plugins and standard plugins. +- `getPluginMetaById`: Returns the plugin metadata based on the plugin ID. +- `getDevPluginById`: Returns information about the custom plugins in development. +- `getPluginManifestById`: Returns the plugin manifest based on the plugin ID. +- `getPluginSettingsById`: Returns the plugin settings based on the plugin ID. +- `getPluginManifestLoadingStatus`: Returns the loading status of the plugin manifest (loading, success, or error) based on the plugin ID. +- `isCustomPlugin`: Checks if the plugin with the given ID is a custom plugin. +- `displayPluginList`: Returns a processed plugin list, including author, avatar, creation time, description, homepage URL, identifier, and title. +- `hasPluginUI`: Determines if the plugin has UI components based on the plugin ID. + +Selectors are highly modular and maintainable. By encapsulating complex state selection logic in separate functions, they make the code more concise and intuitive when accessing state data in other parts of the application. Additionally, by using TypeScript, each function can have clear input and output types, which helps improve code reliability and development efficiency. + +Taking the `displayPluginList` method as an example, its code is as follows: + +```ts +const pluginList = (s: PluginStoreState) => [...s.pluginList, ...s.customPluginList]; + +const displayPluginList = (s: PluginStoreState) => + pluginList(s).map((p) => ({ + author: p.author, + avatar: p.meta?.avatar, + createAt: p.createAt, + desc: pluginHelpers.getPluginDesc(p.meta), + homepage: p.homepage, + identifier: p.identifier, + title: pluginHelpers.getPluginTitle(p.meta), + })); +``` + +- `pluginList` method: Used to retrieve the list of all plugins from the plugin state storage `PluginStoreState`. It creates a new plugin list by combining two arrays: `pluginList` and `customPluginList`. +- `displayPluginList` method: Calls the `pluginList` method to retrieve the merged plugin list and transforms the `title` and `desc` into text displayed on the UI. + +In components, the final consumed data can be directly obtained by importing: + +```tsx | pure +import { usePluginStore } from '@/store/plugin'; +import { pluginSelectors } from '@/store/plugin/selectors'; + +const Render = ({ plugins }) => { + const list = usePluginStore(pluginSelectors.displayPluginList); + + return <> ... ; +}; +``` + +The benefits of implementing this approach are: + +1. **Decoupling and reusability**: By separating selectors from components, we can reuse these selectors across multiple components without rewriting data retrieval logic. This reduces duplicate code, improves development efficiency, and makes the codebase cleaner and easier to maintain. +2. **Performance optimization**: Selectors can be used to compute derived data, avoiding redundant calculations in each component. When the state changes, only the selectors dependent on that part of the state will recalculate, reducing unnecessary rendering and computation. +3. **Ease of testing**: Selectors are pure functions, relying only on the passed parameters. This means they can be tested in an isolated environment without the need to simulate the entire store or component tree. +4. **Type safety**: As LobeChat uses TypeScript, each selector has explicit input and output type definitions. This provides developers with the advantage of auto-completion and compile-time checks, reducing runtime errors. +5. **Maintainability**: Selectors centralize the logic for reading state, making it more intuitive to track state changes and management. If the state structure changes, only the relevant selectors need to be updated, rather than searching and replacing in multiple places throughout the codebase. +6. **Composability**: Selectors can be composed with other selectors to create more complex selection logic. This pattern allows developers to build a hierarchy of selectors, making state selection more flexible and powerful. +7. **Simplified component logic**: Components do not need to know the structure of the state or how to retrieve and compute the required data. Components only need to call selectors to obtain the data needed for rendering, simplifying and clarifying component logic. + +With this design, LobeChat developers can focus more on building the user interface and business logic without worrying about the details of data retrieval and processing. This pattern also provides better adaptability and scalability for potential future changes in state structure. diff --git a/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.zh-CN.md b/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.zh-CN.md new file mode 100644 index 0000000..7cf8031 --- /dev/null +++ b/DigitalHumanWeb/contributing/State-Management/State-Management-Selectors.zh-CN.md @@ -0,0 +1,49 @@ +# 数据存储取数模块 + +selectors 是 LobeChat 数据流研发框架下的取数模块,它的作用是从 store 中以特定特务逻辑取出数据,供组件消费使用。 + +以 `src/store/tool/slices/plugin/selectors.ts` 为例: + +这个 TypeScript 代码段定义了一个名为 `pluginSelectors` 的对象,该对象包含一系列用于从插件存储状态中检索数据的选择器函数。选择器是一种从 zustand 中提取和派生数据的函数。这个特定的例子是为了管理与前端应用程序的插件系统相关的状态。 + +下面是一些关键点的说明: + +- `getCustomPluginById`: 根据插件 ID 返回自定义插件信息。 +- `getInstalledPluginById`: 根据插件 ID 返回已安装插件的信息。 +- `getPluginManifestById`: 根据插件 ID 返回插件清单。 +- `getPluginMetaById`: 根据插件 ID 返回插件元数据。 +- `getPluginSettingsById`: 根据插件 ID 返回插件设置。 +- `installedCustomPluginMetaList`: 返回所有已安装的自定义插件的元数据列表。 +- `installedPluginManifestList`: 返回所有已安装插件的清单列表。 +- `installedPluginMetaList`: 返回所有已安装插件的元数据列表。 +- `installedPlugins`: 返回所有已安装插件的列表。 +- `isPluginHasUI`: 根据插件 ID 确定插件是否有 UI 组件。 +- `isPluginInstalled`: 根据插件 ID 检查插件是否已安装。 +- `storeAndInstallPluginsIdList`: 返回 store 中和已安装插件的所有 ID 列表。 + +选择器通过将复杂的状态选择逻辑封装在单独的函数中,使得在应用程序的其他部分调用状态数据时,代码更加简洁和直观。此外,由于使用了 TypeScript,每个函数都可以具有明确的输入和输出类型,这有助于提高代码的可靠性和开发效率。 + +在组件中,只需引入相应的选择器即可直接获取最终消费的数据: + +```tsx | pure +import { useToolStore } from '@/store/tool'; +import { pluginSelectors } from '@/store/tool/selectors'; + +const Render = () => { + const list = useToolStore(pluginSelectors.installedPluginMetaList); + + return <> ... ; +}; +``` + +这样实现的好处在于: + +1. **解耦和重用**:通过将选择器独立于组件,我们可以在多个组件之间复用这些选择器而不需要重写取数逻辑。这减少了重复代码,提高了开发效率,并且使得代码库更加干净和易于维护。 +2. **性能优化**:选择器可以用来计算派生数据,这样可以避免在每个组件中重复计算相同的数据。当状态发生变化时,只有依赖于这部分状态的选择器才会重新计算,从而减少不必要的渲染和计算。 +3. **易于测试**:选择器是纯函数,它们仅依赖于传入的参数。这意味着它们可以在隔离的环境中进行测试,无需模拟整个 store 或组件树。 +4. **类型安全**:由于 LobeChat 使用 TypeScript,每个选择器都有明确的输入和输出类型定义。这为开发者提供了自动完成和编译时检查的优势,减少了运行时错误。 +5. **可维护性**:选择器集中了状态的读取逻辑,使得跟踪状态的变化和管理更加直观。如果状态结构发生变化,我们只需要更新相应的选择器,而不是搜索和替换整个代码库中的多个位置。 +6. **可组合性**:选择器可以组合其他选择器,以创建更复杂的选择逻辑。这种模式允许开发者构建一个选择器层次结构,使得状态选择更加灵活和强大。 +7. **简化组件逻辑**:组件不需要知道状态的结构或如何获取和计算需要的数据。组件只需调用选择器即可获取渲染所需的数据,这使得组件逻辑变得更简单和清晰。 + +通过这样的设计,LobeChat 的开发者可以更专注于构建用户界面和业务逻辑,而不必担心数据的获取和处理细节。这种模式也为未来可能的状态结构变更提供了更好的适应性和扩展性。 diff --git a/DigitalHumanWeb/contributing/Upstream-Sync.md b/DigitalHumanWeb/contributing/Upstream-Sync.md new file mode 100644 index 0000000..7f63cb3 --- /dev/null +++ b/DigitalHumanWeb/contributing/Upstream-Sync.md @@ -0,0 +1,58 @@ +# Upstream Sync + +English | [简体中文](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync.zh-CN) + +## `A` Vercel / Zeabur Deployment + +If you have deployed your own project following the one-click deployment steps in the README, you might encounter constant prompts indicating "updates available". This is because Vercel defaults to creating a new project instead of forking this one, resulting in an inability to accurately detect updates. We suggest you redeploy using the following steps: + +- Remove the original repository; +- Use the Fork button at the top right corner of the page to fork this project; +- Re-select and deploy on `Vercel`. + +## Enabling Automatic Updates + +> \[!NOTE] +> +> If you encounter an error executing Upstream Sync, manually Sync Fork once + +Once you have forked the project, due to Github restrictions, you will need to manually enable Workflows on the Actions page of your forked project and activate the Upstream Sync Action. Once enabled, you can set up hourly automatic updates. + +![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png) +![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png) + +## `B` Docker Deployment + +Upgrading the Docker deployment version is very simple, just redeploy the latest image of LobeChat. Here are the instructions to perform these steps: + +1. Stop and delete the currently running LobeChat container (assuming the name of the LobeChat container is `lobe-chat`): + +```fish +docker stop lobe-chat +docker rm lobe-chat +``` + +2. Pull the latest Docker image of LobeChat: + +```fish +docker pull lobehub/lobe-chat +``` + +3. Redeploy the LobeChat container using the newly pulled image: + +```fish +docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +Make sure you have sufficient permissions to stop and delete the container before executing these commands, and Docker has sufficient permissions to pull the new image. + +> \[!NOTE] +> +> If I redeploy, will my local chat history be lost? +> +> Don't worry, all of LobeChat's chat history is stored in your local browser. Therefore, when you redeploy LobeChat using Docker, your chat history will not be lost. diff --git a/DigitalHumanWeb/contributing/Upstream-Sync.zh-CN.md b/DigitalHumanWeb/contributing/Upstream-Sync.zh-CN.md new file mode 100644 index 0000000..8580d15 --- /dev/null +++ b/DigitalHumanWeb/contributing/Upstream-Sync.zh-CN.md @@ -0,0 +1,58 @@ +# 自部署保持更新 + +[English](https://github.com/lobehub/lobe-chat/wiki/Upstream-Sync) | 简体中文 + +## `A` Vercel / Zeabur 部署 + +如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照以下步骤重新部署: + +- 删除原有的仓库; +- 使用页面右上角的 Fork 按钮,Fork 本项目; +- 在 `Vercel` 上重新选择并部署。 + +### 启动自动更新 + +> \[!NOTE] +> +> 如果你在执行 `Upstream Sync` 时遇到错误,请手动执再行一次 + +当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。 + +![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png) +![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png) + +## `B` Docker 部署 + +Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最新镜像即可。 以下是执行这些步骤所需的指令: + +1. 停止并删除当前运行的 LobeChat 容器(假设 LobeChat 容器的名称是 `lobe-chat`): + +```fish +docker stop lobe-chat +docker rm lobe-chat +``` + +2. 拉取 LobeChat 的最新 Docker 镜像: + +```fish +docker pull lobehub/lobe-chat +``` + +3. 使用新拉取的镜像重新部署 LobeChat 容器: + +```fish +docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。 + +> \[!NOTE] +> +> 重新部署的话,我本地的聊天记录会丢失吗? +> +> 放心,LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。 diff --git a/DigitalHumanWeb/contributing/_Footer.md b/DigitalHumanWeb/contributing/_Footer.md new file mode 100644 index 0000000..8711bff --- /dev/null +++ b/DigitalHumanWeb/contributing/_Footer.md @@ -0,0 +1 @@ +This is the **🤯 / 🤖 Lobe Chat** wiki. [Wiki Home](https://github.com/lobehub/lobe-chat/wiki) diff --git a/DigitalHumanWeb/contributing/_Sidebar.md b/DigitalHumanWeb/contributing/_Sidebar.md new file mode 100644 index 0000000..435de07 --- /dev/null +++ b/DigitalHumanWeb/contributing/_Sidebar.md @@ -0,0 +1,48 @@ +## Lobe Chat Contributing Wiki + +#### 🏠 Home + +- [TOC](Home.md) | [目录](Home.md) + + + +#### 🤯 Basic + +- [Architecture Design](https://github.com/lobehub/lobe-chat/wiki/Architecture) | [架构设计](https://github.com/lobehub/lobe-chat/wiki/Architecture.zh-CN) +- [Code Style and Contribution Guidelines](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines) | [代码风格与贡献指南](https://github.com/lobehub/lobe-chat/wiki/Contributing-Guidelines.zh-CN) +- [Complete Guide to LobeChat Feature Development](https://github.com/lobehub/lobe-chat/wiki/Feature-Development) | [LobeChat 功能开发完全指南](https://github.com/lobehub/lobe-chat/wiki/Feature-Development.zh-CN) +- [Conversation API Implementation Logic](https://github.com/lobehub/lobe-chat/wiki/Chat-API) | [会话 API 实现逻辑](https://github.com/lobehub/lobe-chat/wiki/Chat-API.zh-CN) +- [Directory Structure](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure) | [目录架构](https://github.com/lobehub/lobe-chat/wiki/Folder-Structure.zh-CN) +- [Environment Setup Guide](https://github.com/lobehub/lobe-chat/wiki/Setup-Development) | [环境设置指南](https://github.com/lobehub/lobe-chat/wiki/Setup-Development.zh-CN) +- [How to Develop a New Feature](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend) | [如何开发一个新功能:前端实现](https://github.com/lobehub/lobe-chat/wiki/Feature-Development-Frontend.zh-CN) +- [New Authentication Provider Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers) | [新身份验证方式开发指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Authentication-Providers.zh-CN) +- [Resources and References](https://github.com/lobehub/lobe-chat/wiki/Resources) | [资源与参考](https://github.com/lobehub/lobe-chat/wiki/Resources.zh-CN) +- [Technical Development Getting Started Guide](https://github.com/lobehub/lobe-chat/wiki/Intro) | [技术开发上手指南](https://github.com/lobehub/lobe-chat/wiki/Intro.zh-CN) +- [Testing Guide](https://github.com/lobehub/lobe-chat/wiki/Test) | [测试指南](https://github.com/lobehub/lobe-chat/wiki/Test.zh-CN) + +#### 🌎 Internationalization + +- [Internationalization Implementation Guide](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation) | [国际化实现指南](https://github.com/lobehub/lobe-chat/wiki/Internationalization-Implementation.zh-CN) +- [New Locale Guide](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale) | [新语种添加指南](https://github.com/lobehub/lobe-chat/wiki/Add-New-Locale.zh-CN) + +#### ⌨️ State Management + +- [Best Practices for State Management](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro) | [状态管理最佳实践](https://github.com/lobehub/lobe-chat/wiki/State-Management-Intro.zh-CN) +- [Data Store Selector](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors) | [数据存储取数模块](https://github.com/lobehub/lobe-chat/wiki/State-Management-Selectors.zh-CN) + +#### 🤖 Agents + +- [Agent Index and Submit](https://github.com/lobehub/lobe-chat-agents) | [助手索引与提交](https://github.com/lobehub/lobe-chat-agents/blob/main/README.zh-CN.md) + +#### 🧩 Plugins + +- [Plugin Index and Submit](https://github.com/lobehub/lobe-chat-plugins) | [插件索引与提交](https://github.com/lobehub/lobe-chat-plugins/blob/main/README.zh-CN.md) +- [Plugin SDK Docs](https://chat-plugin-sdk.lobehub.com) | [插件 SDK 文档](https://chat-plugin-sdk.lobehub.com) + +#### 📊 Others + +- [Lighthouse Reports](https://github.com/lobehub/lobe-chat/wiki/Lighthouse) | [Lighthouse 测试报告](https://github.com/lobehub/lobe-chat/wiki/Lighthouse.zh-CN) + + + + diff --git a/DigitalHumanWeb/docker-compose/local-logto/.env.example b/DigitalHumanWeb/docker-compose/local-logto/.env.example new file mode 100644 index 0000000..5fa0bb7 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local-logto/.env.example @@ -0,0 +1,33 @@ +# Logto secret +LOGTO_CLIENT_ID= +LOGTO_CLIENT_SECRET= + +# MinIO S3 configuration +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# Configure the bucket information of MinIO +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID= +S3_SECRET_ACCESS_KEY= + +# Proxy, if you need it +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + + +# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE. +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + + +# ----- Other config ----- +# if no special requirements, no need to change +LOBE_PORT=3210 +LOGTO_PORT=3001 +MINIO_PORT=9000 + +# Postgres related, which are the necessary environment variables for DB +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC diff --git a/DigitalHumanWeb/docker-compose/local-logto/.env.zh-CN.example b/DigitalHumanWeb/docker-compose/local-logto/.env.zh-CN.example new file mode 100644 index 0000000..4557b2d --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local-logto/.env.zh-CN.example @@ -0,0 +1,33 @@ +# Logto secret +LOGTO_CLIENT_ID= +LOGTO_CLIENT_SECRET= + +# MinIO S3 配置 +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# 在下方配置 minio 中添加的桶 +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID= +S3_SECRET_ACCESS_KEY= + + +# Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + + +# ----- 相关配置 start ----- +# 如没有特殊需要不用更改 +LOBE_PORT=3210 +LOGTO_PORT=3001 +MINIO_PORT=9000 + +# Postgres 相关,也即 DB 必须的环境变量 +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC diff --git a/DigitalHumanWeb/docker-compose/local-logto/docker-compose.yml b/DigitalHumanWeb/docker-compose/local-logto/docker-compose.yml new file mode 100644 index 0000000..cc59b6a --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local-logto/docker-compose.yml @@ -0,0 +1,102 @@ +services: + network-service: + image: alpine + container_name: lobe-network + ports: + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console + - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto + - '3002:3002' # Logto Admin + - '${LOBE_PORT}:3210' # LobeChat + command: tail -f /dev/null + networks: + - lobe-network + + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - "5432:5432" + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=${LOBE_DB_NAME}' + - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + networks: + - lobe-network + + minio: + image: minio/minio + container_name: lobe-minio + network_mode: 'service:network-service' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}' + - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}' + - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}' + restart: always + command: > + server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + + logto: + image: svhd/logto + container_name: lobe-logto + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'PORT=${LOGTO_PORT}' + - 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto' + - 'ENDPOINT=http://localhost:${LOGTO_PORT}' + - 'ADMIN_ENDPOINT=http://localhost:3002' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + network-service: + condition: service_started + minio: + condition: service_started + logto: + condition: service_started + + environment: + - 'APP_URL=http://localhost:3210' + - 'NEXT_AUTH_SSO_PROVIDERS=logto' + - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=' + - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg' + - 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth' + - 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc' + - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}' + - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}' + - 'S3_BUCKET=${MINIO_LOBE_BUCKET}' + - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}' + - 'S3_ENABLE_PATH_STYLE=1' + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +networks: + lobe-network: + driver: bridge diff --git a/DigitalHumanWeb/docker-compose/local/.env.example b/DigitalHumanWeb/docker-compose/local/.env.example new file mode 100644 index 0000000..40ccc8e --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local/.env.example @@ -0,0 +1,35 @@ +# Proxy, if you need it +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + + +# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE. +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + + +# =========================== +# ====== Preset config ====== +# =========================== +# if no special requirements, no need to change +LOBE_PORT=3210 +CASDOOR_PORT=8000 +MINIO_PORT=9000 + +# Postgres related, which are the necessary environment variables for DB +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC + +# Casdoor secret +AUTH_CASDOOR_ID=a387a4892ee19b1a2249 +AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354 + +# MinIO S3 configuration +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# Configure the bucket information of MinIO +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng +S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO \ No newline at end of file diff --git a/DigitalHumanWeb/docker-compose/local/.env.zh-CN.example b/DigitalHumanWeb/docker-compose/local/.env.zh-CN.example new file mode 100644 index 0000000..f2e174e --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local/.env.zh-CN.example @@ -0,0 +1,36 @@ +# Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + + +# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + + +# =================== +# ===== 预设配置 ===== +# =================== +# 如没有特殊需要不用更改 +LOBE_PORT=3210 +CASDOOR_PORT=8000 +MINIO_PORT=9000 + +# Postgres 相关,也即 DB 必须的环境变量 +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC + +# Casdoor secret +AUTH_CASDOOR_ID=a387a4892ee19b1a2249 +AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354 + +# MinIO S3 配置 +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# 在下方配置 minio 中添加的桶 +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng +S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO + diff --git a/DigitalHumanWeb/docker-compose/local/docker-compose.yml b/DigitalHumanWeb/docker-compose/local/docker-compose.yml new file mode 100644 index 0000000..6d0a782 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local/docker-compose.yml @@ -0,0 +1,103 @@ +services: + network-service: + image: alpine + container_name: lobe-network + ports: + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console + - '${CASDOOR_PORT}:${CASDOOR_PORT}' # Casdoor + - '${LOBE_PORT}:3210' # LobeChat + command: tail -f /dev/null + networks: + - lobe-network + + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - "5432:5432" + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=${LOBE_DB_NAME}' + - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + networks: + - lobe-network + + minio: + image: minio/minio + container_name: lobe-minio + network_mode: 'service:network-service' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}' + - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}' + - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}' + restart: always + command: > + server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + + casdoor: + image: casbin/casdoor + container_name: lobe-casdoor + entrypoint: /bin/sh -c './server --createDatabase=true' + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + environment: + RUNNING_IN_DOCKER: "true" + driverName: "postgres" + dataSourceName: "user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor" + origin: "http://localhost:${CASDOOR_PORT}" + runmode: "dev" + volumes: + - ./init_data.json:/init_data.json + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + network-service: + condition: service_started + minio: + condition: service_started + casdoor: + condition: service_started + + environment: + - 'APP_URL=http://localhost:3210' + - 'NEXT_AUTH_SSO_PROVIDERS=casdoor' + - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=' + - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg' + - 'AUTH_URL=http://localhost:${LOBE_PORT}/api/auth' + - 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}' + - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}' + - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}' + - 'S3_BUCKET=${MINIO_LOBE_BUCKET}' + - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}' + - 'S3_ENABLE_PATH_STYLE=1' + - 'LLM_VISION_IMAGE_USE_BASE64=1' + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +networks: + lobe-network: + driver: bridge diff --git a/DigitalHumanWeb/docker-compose/local/init_data.json.tar.gz b/DigitalHumanWeb/docker-compose/local/init_data.json.tar.gz new file mode 100644 index 0000000..bb14d45 Binary files /dev/null and b/DigitalHumanWeb/docker-compose/local/init_data.json.tar.gz differ diff --git a/DigitalHumanWeb/docker-compose/local/s3_data.tar.gz b/DigitalHumanWeb/docker-compose/local/s3_data.tar.gz new file mode 100644 index 0000000..7174fb5 Binary files /dev/null and b/DigitalHumanWeb/docker-compose/local/s3_data.tar.gz differ diff --git a/DigitalHumanWeb/docker-compose/local/setup.sh b/DigitalHumanWeb/docker-compose/local/setup.sh new file mode 100644 index 0000000..c4bef99 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/local/setup.sh @@ -0,0 +1,242 @@ +#!/bin/bash + +# ================== +# == Env settings == +# ================== + +# ====================== +# == Process the args == +# ====================== + +# 1. Default values of arguments +# Arg: -f +# Determine force download asserts, default is not +FORCE_DOWNLOAD=false + +# Arg: -l or --lang +# Determine the language to show, default is en +LANGUAGE="en_US" + +# Arg: --url +# Determine the source URL to download files +SOURCE_URL="https://raw.githubusercontent.com/lobehub/lobe-chat/main" + +# 2. Parse script arguments +while getopts "fl:-:" opt; do + case $opt in + f) + FORCE_DOWNLOAD=true + ;; + l) + LANGUAGE=$OPTARG + ;; + -) + case "${OPTARG}" in + lang) + LANGUAGE="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) + ;; + url) + SOURCE_URL="${!OPTIND}"; OPTIND=$(( $OPTIND + 1 )) + ;; + *) + echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2 + exit 1 + ;; + esac + ;; + *) + echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2 + exit 1 + ;; + esac +done + + +# =============== +# == Variables == +# =============== +# File list +SUB_DIR="docker-compose/local" +FILES=( + "$SUB_DIR/docker-compose.yml" + "$SUB_DIR/.env.example" + "$SUB_DIR/init_data.json.tar.gz" + "$SUB_DIR/s3_data.tar.gz" +) + +# Supported languages and messages +# Arg: -l --lang +# If the language is not supported, default to English +# Function to show messages +show_message() { + local key="$1" + case $key in + downloading) + case $LANGUAGE in + zh_CN) + echo "正在下载文件..." + ;; + *) + echo "Downloading files..." + ;; + esac + ;; + downloaded) + case $LANGUAGE in + zh_CN) + echo " 已经存在,跳过下载。" + ;; + *) + echo " already exists, skipping download." + ;; + esac + ;; + extracted_success) + case $LANGUAGE in + zh_CN) + echo " 解压成功到目录:" + ;; + *) + echo " extracted successfully to directory: " + ;; + esac + ;; + extracted_failed) + case $LANGUAGE in + zh_CN) + echo " 解压失败。" + ;; + *) + echo " extraction failed." + ;; + esac + ;; + file_not_exists) + case $LANGUAGE in + zh_CN) + echo " 不存在。" + ;; + *) + echo " does not exist." + ;; + esac + ;; + tips_run_command) + case $LANGUAGE in + zh_CN) + echo "您已经完成了所有配置文件的下载。请运行以下命令启动LobeChat:" + ;; + *) + echo "You have completed downloading all configuration files. Please run this command to start LobeChat:" + ;; + esac + ;; + tips_show_documentation) + case $LANGUAGE in + zh_CN) + echo "完整的环境变量在'.env'中可以在文档中找到:" + ;; + *) + echo "Full environment variables in the '.env' can be found at the documentation on " + ;; + esac + ;; + tips_show_documentation_url) + case $LANGUAGE in + zh_CN) + echo "https://lobehub.com/zh/docs/self-hosting/environment-variables" + ;; + *) + echo "https://lobehub.com/docs/self-hosting/environment-variables" + ;; + esac + ;; + tips_warning) + case $LANGUAGE in + zh_CN) + echo "警告:不要在生产环境中使用此演示应用程序!!!" + ;; + *) + echo "Warning: do not use this demo application in production!!!" + ;; + esac + ;; + esac +} + +# Function to download files +download_file() { + local file_url="$1" + local local_file="$2" + + if [ "$FORCE_DOWNLOAD" = false ] && [ -e "$local_file" ]; then + echo "$local_file" $(show_message "downloaded") + return 0 + fi + + wget -q --show-progress "$file_url" -O "$local_file" +} + +extract_file() { + local file_name=$1 + local target_dir=$2 + + if [ -e "$file_name" ]; then + tar -zxvf "$file_name" -C "$target_dir" > /dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "$file_name" $(show_message "extracted_success") "$target_dir" + else + echo "$file_name" $(show_message "extracted_failed") + exit 1 + fi + else + echo "$file_name" $(show_message "file_not_exists") + exit 1 + fi +} + +# Define colors +declare -A colors +colors=( + [black]="\e[30m" + [red]="\e[31m" + [green]="\e[32m" + [yellow]="\e[33m" + [blue]="\e[34m" + [magenta]="\e[35m" + [cyan]="\e[36m" + [white]="\e[37m" + [reset]="\e[0m" +) + +print_centered() { + local text="$1" # Get input texts + local color="${2:-reset}" # Get color, default to reset + local term_width=$(tput cols) # Get terminal width + local text_length=${#text} # Get text length + local padding=$(( (term_width - text_length) / 2 )) # Get padding + # Check if the color is valid + if [[ -z "${colors[$color]}" ]]; then + echo "Invalid color specified. Available colors: ${!colors[@]}" + return 1 + fi + # Print the text with padding + printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text" +} + +# Download files asynchronously +download_file "$SOURCE_URL/${FILES[0]}" "docker-compose.yml" +download_file "$SOURCE_URL/${FILES[1]}" ".env" +download_file "$SOURCE_URL/${FILES[2]}" "init_data.json.tar.gz" +download_file "$SOURCE_URL/${FILES[3]}" "s3_data.tar.gz" + +# Extract .tar.gz file without output +extract_file "s3_data.tar.gz" "." +extract_file "init_data.json.tar.gz" "." + +# Display final message +printf "\n%s\n\n" "$(show_message "tips_run_command")" +print_centered "docker compose up -d" "green" +printf "\n%s" "$(show_message "tips_show_documentation")" +printf "%s\n" $(show_message "tips_show_documentation_url") +printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")" \ No newline at end of file diff --git a/DigitalHumanWeb/docker-compose/minio-bucket.config.json b/DigitalHumanWeb/docker-compose/minio-bucket.config.json new file mode 100644 index 0000000..b974b2c --- /dev/null +++ b/DigitalHumanWeb/docker-compose/minio-bucket.config.json @@ -0,0 +1,34 @@ +{ + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:GetBucketLocation"], + "Resource": ["arn:aws:s3:::lobe"] + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:ListBucket"], + "Resource": ["arn:aws:s3:::lobe"], + "Condition": { + "StringEquals": { + "s3:prefix": ["files/*"] + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"], + "Resource": ["arn:aws:s3:::lobe/files/**"] + } + ], + "Version": "2012-10-17" +} diff --git a/DigitalHumanWeb/docker-compose/production/.env.example b/DigitalHumanWeb/docker-compose/production/.env.example new file mode 100644 index 0000000..50f3450 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/production/.env.example @@ -0,0 +1,56 @@ +# Required: LobeChat domain for tRPC calls +# Ensure this domain is whitelisted in your NextAuth providers and S3 service CORS settings +APP_URL=https://lobe.example.com/ + +# Postgres related environment variables +# Required: Secret key for encrypting sensitive information. Generate with: openssl rand -base64 32 +KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ= +# Required: Postgres database connection string +# Format: postgresql://username:password@host:port/dbname +# If using Docker, you can use the container name as the host +DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe + +# NEXT_AUTH related environment variables +# Supports auth0, Azure AD, GitHub, Authentik, Zitadel, Logto, etc. +# For supported providers, see: https://lobehub.com/docs/self-hosting/advanced/auth#next-auth +# If you have ACCESS_CODE, please remove it. We use NEXT_AUTH as the sole authentication source +# Required: NextAuth secret key. Generate with: openssl rand -base64 32 +NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg +# Required: Specify the authentication provider (e.g., Logto) +NEXT_AUTH_SSO_PROVIDERS=logto +# Required: NextAuth URL for callbacks +NEXTAUTH_URL=https://lobe.example.com/api/auth + +# NextAuth providers configuration (example using Logto) +# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth +LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID +LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET +LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc + +# Proxy settings (if needed, e.g., when using GitHub as an auth provider) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# S3 related environment variables (example using MinIO) +# Required: S3 Access Key ID (for MinIO, invalid until manually created in MinIO UI) +S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_ID +# Required: S3 Secret Access Key (for MinIO, invalid until manually created in MinIO UI) +S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY +# Required: S3 Endpoint for server/client connections to S3 API +S3_ENDPOINT=https://lobe-s3-api.example.com +# Required: S3 Bucket (invalid until manually created in MinIO UI) +S3_BUCKET=lobe +# Required: S3 Public Domain for client access to unstructured data +S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com +# Optional: S3 Enable Path Style +# Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO +# See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style +S3_ENABLE_PATH_STYLE=1 + +# Other basic environment variables (as needed) +# See: https://lobehub.com/docs/self-hosting/environment-variables/basic +# Note: For server versions, the API must support embedding models (OpenAI text-embedding-3-small) for file processing +# You don't need to specify this model in OPENAI_MODEL_LIST +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... diff --git a/DigitalHumanWeb/docker-compose/production/.env.zh-CN.example b/DigitalHumanWeb/docker-compose/production/.env.zh-CN.example new file mode 100644 index 0000000..8da1915 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/production/.env.zh-CN.example @@ -0,0 +1,55 @@ +# 必填,LobeChat 域名,用于 tRPC 调用 +# 请保证此域名在你的 NextAuth 鉴权服务提供商、S3 服务商的 CORS 白名单中 +APP_URL=https://lobe.example.com/ + +# Postgres 相关,也即 DB 必需的环境变量 +# 必填,用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成 +KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ= +# 必填,Postgres 数据库连接字符串,用于连接到数据库 +# 格式:postgresql://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器且位于同一 docker-compose 文件中,亦可使用容器名作为 host +DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe + +# NEXT_AUTH 相关,也即鉴权服务必需的环境变量 +# 可以使用 auth0、Azure AD、GitHub、Authentik、Zitadel、Logto 等,如有其他接入诉求欢迎提 PR +# 目前支持的鉴权服务提供商请参考:https://lobehub.com/zh/docs/self-hosting/advanced/auth#next-auth +# 如果你有 ACCESS_CODE,请务必清空,我们以 NEXT_AUTH 作为唯一鉴权来源 +# 必填,用于 NextAuth 的密钥,可以使用 openssl rand -base64 32 生成 +NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg +# 必填,指定鉴权服务提供商,这里以 Logto 为例 +NEXT_AUTH_SSO_PROVIDERS=logto +# 必填,NextAuth 的 URL,用于 NextAuth 的回调 +NEXTAUTH_URL=https://lobe.example.com/api/auth + +# NextAuth 鉴权服务提供商部分,以 Logto 为例 +# 其他鉴权服务提供商所需的环境变量,请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth +LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID +LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET +LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc + +# 代理相关,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# S3 相关,也即非结构化数据(文件、图片等)存储必需的环境变量 +# 这里以 MinIO 为例 +# 必填,S3 的 Access Key ID,对于 MinIO 来说,直到在 MinIO UI 中手动创建之前都是无效的 +S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_ID +# 必填,S3 的 Secret Access Key,对于 MinIO 来说,直到在 MinIO UI 中手动创建之前都是无效的 +S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY +# 必填,S3 的 Endpoint,用于服务端/客户端连接到 S3 API +S3_ENDPOINT=https://lobe-s3-api.example.com +# 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的 +S3_BUCKET=lobe +# 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据 +S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com +# 选填,S3 的 Enable Path Style +# 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1 +# 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style +S3_ENABLE_PATH_STYLE=1 + +# 其他基础环境变量,视需求而定。注意不要有 ACCESS_CODE +# 请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/basic +# 请注意,对于服务端版本,其 API 必须支持嵌入(即 OpenAI text-embedding-3-small)模型,否则无法对上传文件进行处理,但你无需在 OPENAI_MODEL_LIST 中指定此模型 +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... diff --git a/DigitalHumanWeb/docker-compose/production/docker-compose.yml b/DigitalHumanWeb/docker-compose/production/docker-compose.yml new file mode 100644 index 0000000..76014a4 --- /dev/null +++ b/DigitalHumanWeb/docker-compose/production/docker-compose.yml @@ -0,0 +1,70 @@ +services: + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - '5432:5432' + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=lobe' + - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + + minio: + image: minio/minio + container_name: lobe-minio + ports: + - '9000:9000' + - '9001:9001' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=YOUR_MINIO_USER' + - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD' + - 'MINIO_DOMAIN=lobe-s3-api.example.com' + - 'MINIO_API_CORS_ALLOW_ORIGIN=https://lobe.example.com' # Your LobeChat's domain name. + restart: always + command: > + server /etc/minio/data --address ":9000" --console-address ":9001" + + + logto: + image: svhd/logto + container_name: lobe-logto + ports: + - '3001:3001' + - '3002:3002' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto' + - 'ENDPOINT=https://lobe-auth-api.example.com' + - 'ADMIN_ENDPOINT=https://lobe-auth-ui.example.com' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + ports: + - '3210:3210' + depends_on: + - postgresql + - minio + - logto + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/analytics.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/analytics.mdx new file mode 100644 index 0000000..0ccd0e8 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/analytics.mdx @@ -0,0 +1,31 @@ +--- +title: Integrating Data Analytics Services in LobeChat for User Usage Analysis +description: >- + Learn how to integrate free/open-source data analytics services in LobeChat to + collect user usage data efficiently. +tags: + - LobeChat + - data analytics + - user usage analysis + - Vercel Analytics + - web analytics +--- + +# Data Analysis + +To better help analyze the usage of LobeChat users, we have integrated several free/open-source data analytics services in LobeChat for collecting user usage data, which you can enable as needed. + + + Currently, the integrated data analytics platforms only support deployment and usage on + Vercel/Zeit platforms and do not support Docker/Docker Compose deployment. + + +## Vercel Analytics + +[Vercel Analytics](https://vercel.com/analytics) is a data analytics service launched by Vercel, which can help you collect website visit data, including traffic, sources, and devices used for access. + +We have integrated Vercel Analytics into the code, and you can enable it by setting the environment variable `ENABLE_VERCEL_ANALYTICS=1`, and then open the Analytics tab in your Vercel deployment project to view your app's visit data. + +Vercel Analytics provides 2500 free Web Analytics Events per month (which can be understood as page views), which is generally sufficient for personal deployment and self-use products. + +If you need to learn more about using Vercel Analytics, please refer to the [Vercel Web Analytics Quick Start](https://vercel.com/docs/analytics/quickstart). diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/analytics.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/analytics.zh-CN.mdx new file mode 100644 index 0000000..cf23d41 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/analytics.zh-CN.mdx @@ -0,0 +1,28 @@ +--- +title: LobeChat 数据分析集成服务介绍 +description: 了解如何在 LobeChat 中集成免费/开源的数据统计服务,帮助分析用户使用情况。包括 Vercel Analytics 的设置和使用教程。 +tags: + - LobeChat + - 数据分析 + - Vercel Analytics + - 数据统计服务 + - 用户使用情况 +--- + +# 数据分析 + +为更好地帮助分析 LobeChat 的用户使用情况,我们在 LobeChat 中集成了若干免费 / 开源的数据统计服务,用于收集用户的使用情况,你可以按需开启。 + + + 目前集成的数据分析平台,均只支持 Vercel / Zeabur 平台部署使用,不支持 Docker/Docker Compose 部署 + + +## Vercel Analytics + +[Vercel Analytics](https://vercel.com/analytics) 是 Vercel 推出的一款数据分析服务,它可以帮助你收集网站的访问情况,包括访问量、访问来源、访问设备等等。 + +我们在代码中集成了 Vercel Analytics,你可以通过设置环境变量 `ENABLE_VERCEL_ANALYTICS=1` 来开启它,并打开 Vercel 部署项目中 Analytics tab 查看你的应用访问情况。 + +Vercel Analytics 提供了 2500 次 / 月的免费 Web Analytics Events (可以理解为 PV),对于个人部署自用的产品来说基本够用。 + +如果你需要了解 Vercel Analytics 的详细使用教程,请查阅 [Vercel Web Analytics 快速开始](https://vercel.com/docs/analytics/quickstart) diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth.mdx new file mode 100644 index 0000000..fd6cdb1 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth.mdx @@ -0,0 +1,73 @@ +--- +title: LobeChat Authentication Service Configuration +description: >- + Learn how to configure external authentication services using Clerk or Next + Auth for centralized user authorization management. Supported authentication + services include Auth0, Azure ID, etc. +tags: + - Authentication Service + - Next Auth + - SSO + - Clerk +--- + +# Authentication Service + +LobeChat supports the configuration of external authentication services using Clerk or Next Auth for internal use within enterprises/organizations to centrally manage user authorization. + +## Clerk + +Clerk is a comprehensive identity verification solution that has recently gained popularity. It provides a simple yet powerful API and services to handle user authentication and session management. Clerk's design philosophy is to offer a concise and modern authentication solution that enables developers to easily integrate and use it. + +LobeChat has deeply integrated with Clerk to provide users with a more secure and convenient login and registration experience. It also relieves developers from the burden of managing authentication logic. Clerk's concise and modern design philosophy aligns perfectly with LobeChat's goals, making user management on the entire platform more efficient and reliable. + +By setting the environment variables `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` in LobeChat's environment, you can enable and use 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. | +| `NEXTAUTH_URL` | Required | 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: + + + + + + + + + + + + +Click on the links to view the corresponding platform's configuration documentation. + +## Advanced Configuration + +To simultaneously enable multiple identity verification sources, please set the `NEXT_AUTH_SSO_PROVIDERS` environment variable, separating them with commas, for example, `auth0,azure-ad,authentik`. + +The order corresponds to the display order of the SSO providers. + +| SSO Provider | Value | +| ------------------ | ----------- | +| Auth0 | `auth0` | +| Microsoft Entra ID | `azure-ad` | +| Authentik | `authentik` | +| Github | `github` | +| ZITADEL | `zitadel` | + +## Other SSO Providers + +Please refer to the [NextAuth.js](https://next-auth.js.org/providers) documentation and feel free to submit a Pull Request. diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth.zh-CN.mdx new file mode 100644 index 0000000..ebebacb --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth.zh-CN.mdx @@ -0,0 +1,70 @@ +--- +title: LobeChat 身份验证服务配置 +description: 了解如何使用 Clerk 或 Next Auth 配置外部身份验证服务,以统一管理用户授权。支持的身份验证服务包括 Auth0、 Azure ID 等。 +tags: + - 身份验证服务 + - LobeChat + - SSO + - Clerk +--- + +# 身份验证服务 + +LobeChat 支持使用 Clerk 或者 Next Auth 配置外部身份验证服务,供企业 / 组织内部使用,统一管理用户授权。 + +## Clerk + +Clerk 是一个近期流行起来的全面的身份验证解决方案,它提供了简单而强大的 API 和服务来处理用户认证和会话管理。Clerk 的设计哲学是提供一套简洁、现代的认证解决方案,使得开发者可以轻松集成和使用。 + +LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全、便捷的登录和注册体验,同时也为开发者减轻了管理身份验证逻辑的负担。Clerk 的简洁和现代的设计理念与 LobeChat 的目标非常契合,使得整个平台的用户管理更加高效和可靠。 + +在 LobeChat 的环境变量中设置 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY`,即可开启和使用 Clerk。 + +## Next Auth + +在使用 NextAuth 之前,请先在 LobeChat 的环境变量中设置以下变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | +| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,azure-ad,authentik`。 | + +目前支持的身份验证服务有: + + + + + + + + + + + + +点击即可查看对应平台的配置文档。 + +## 进阶配置 + +同时启用多个身份验证源请设置 `NEXT_AUTH_SSO_PROVIDERS` 环境变量,以逗号 `,` 分割,例如 `auth0,azure-ad,authentik`。 + +顺序为 SSO 提供商的显示顺序。 + +| SSO 提供商 | 值 | +| ------------------ | ----------- | +| Auth0 | `auth0` | +| Microsoft Entra ID | `azure-ad` | +| Authentik | `authentik` | +| Github | `github` | +| ZITADEL | `zitadel` | + +## 其他 SSO 提供商 + +请参考 [NextAuth.js](https://next-auth.js.org/providers) 文档,欢迎提交 Pull Request。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.mdx new file mode 100644 index 0000000..96c83a3 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.mdx @@ -0,0 +1,81 @@ +--- +title: Configure Clerk Authentication Service - Step-by-Step Guide +description: >- + Learn how to set up Clerk authentication with environment variables and + webhooks. +tags: + - Clerk Authentication + - Environment Variables + - Webhook Configuration +--- +# Configure Clerk 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. + +## Get Environment Variables + + + +### Add Public and Private Key Environment Variables + +Add `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CLERK_SECRET_KEY` environment variables. You can click on the "API Keys" in the menu and copy the corresponding values to get these environment variables. + + + +> + + +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 +``` + +### Create and Configure Webhook in Clerk + +Since we let Clerk fully handle user authentication and management, we need Clerk to notify our application and store the changes in the user lifecycle (create, update, delete). We achieve this by 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 information changes. + + + +> + + +Fill in your project URL in the endpoint, such as `https://your-project.com/api/webhooks/clerk`. Then, subscribe to events by checking the three user events (`user.created`, `user.deleted`, `user.updated`), and click create. + +The `https://` in the URL is essential to maintain the integrity of the URL. + + + +> + + +### Add Webhook Secret to Environment Variables + +After creating, you can find the secret of this Webhook in the bottom right corner: + + + +> + + +The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + + + +By following these steps, you have successfully configured the Clerk authentication service. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx new file mode 100644 index 0000000..6c11348 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/clerk.zh-CN.mdx @@ -0,0 +1,71 @@ +--- +title: 配置 Clerk 身份验证服务 - 完整指南 +description: 学习如何配置 Clerk 身份验证服务,获取公私钥和设置 Webhook。 +tags: + - Clerk + - 身份验证 + - Webhook + - 环境变量 +--- +# 配置 Clerk 身份验证服务 + +前往 [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。 + +## 获取环境变量 + + + +### 添加公、私钥环境变量 + +添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值获取该环境变量。 + +{'在 + +此步骤所需的环境变量如下: + +```shell +NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx +CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx +``` + +### 在 Clerk 中创建并配置 Webhook + +由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。 + +我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。 + +{'Clerk + +在 endppint 中填写你的项目 URL,如 `https://your-project.com/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。 + +URL的`https://`不可缺失,须保持URL的完整性 + +{'添加 + +### 将 Webhook 秘钥添加到环境变量 + +创建完毕后,可以在右下角找到该 Webhook 的秘钥: + +{'查看 + +这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + + + +这样,你已经成功配置了 Clerk 身份验证服务。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.mdx new file mode 100644 index 0000000..c35ef56 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.mdx @@ -0,0 +1,132 @@ +--- +title: Configure Auth0 Identity Verification Service for LobeChat +description: >- + Learn how to configure Auth0 Identity Verification Service for LobeChat for + your organization, including creating applications, adding users, and + configuring environment variables. +tags: + - Auth0 + - Identity Verification + - Single Sign-On + - Environment Variables + - User Management + - SSO Integrations + - Social Login +--- + +# Configure Auth0 Identity Verification Service + + + ### Create Auth0 Application + +Register and log in to [Auth0][auth0-client-page], click on the "Applications" in the left navigation bar to switch to the application management interface, and click "Create Application" in the upper right corner to create an application. + +Create Auth0 Application S1 + +Fill in the application name you want to display to the organization users, choose any application type, and click "Create". + +Create Auth0 Application S2 + +After successful creation, click on the corresponding application to enter the application details page, switch to the "Settings" tab, and you can see the corresponding configuration information. + +Create Auth0 Application S3 + +In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in: + +```bash +http(s)://your-domain/api/auth/callback/auth0 +``` + +Create Auth0 Application S4 + + + You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is + consistent with the deployed URL. + + +### Add Users + +Click on the "Users Management" in the left navigation bar to enter the user management interface, where you can create users for your organization to log in to LobeChat. + +Add Users + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `auth0` for Auth0. | +| `AUTH_AUTH0_ID` | Required | Client ID of the Auth0 application | +| `AUTH_AUTH0_SECRET` | Required | Client Secret of the Auth0 application | +| `AUTH_AUTH0_ISSUER` | Required | Domain of the Auth0 application, `https://example.auth0.com` | +| `NEXTAUTH_URL` | Required | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` | + + + You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variable#auth0). + + + + + + After successful deployment, users will be able to authenticate and use LobeChat using the users + configured in Auth0. + + +## Advanced Configuration + +### Connecting to an Existing Single Sign-On Service + +If your enterprise or organization already has a unified identity authentication infrastructure, you can connect to an existing single sign-on service in Applications -> SSO Integrations. + +Auth0 supports single sign-on services such as Azure Active Directory, Slack, Google Workspace, Office 365, Zoom, and more. For a detailed list of supported services, please refer to [this link][auth0-sso-integrations]. + +Connecting to an Existing Single Sign-On Service + +### Configuring Social Login + +If your enterprise or organization needs to support external user logins, you can configure social login services in Authentication -> Social. + +Configuring Social Login + + + Configuring social login services by default allows anyone to authenticate, which may lead to + LobeChat being abused by external users. + + + + If you need to restrict login users, be sure to configure a **blocking policy**: After enabling + the social login option, refer to [this article][auth0-login-actions-manual] to create an Action + to set up a blocking/allow list. + + +[auth0-client-page]: https://manage.auth0.com/dashboard +[auth0-login-actions-manual]: https://auth0.com/blog/permit-or-deny-login-requests-using-auth0-actions/ +[auth0-sso-integrations]: https://marketplace.auth0.com/features/sso-integrations diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx new file mode 100644 index 0000000..a8305a1 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/auth0.zh-CN.mdx @@ -0,0 +1,121 @@ +--- +title: 在 LobeChat 中配置 Auth0 身份验证服务 - 详细步骤和环境变量设置 +description: 学习如何在 LobeChat 中配置 Auth0 身份验证服务,包括创建应用、新增用户、配置环境变量等。了解如何连接现有的单点登录服务和配置社交登录。 +tags: + - Auth0 + - 身份验证 + - 单点登录 + - 社交登录 + - 环境变量 + - 用户管理 +--- + +# 配置 Auth0 身份验证服务 + + + ### 创建 Auth0 应用 + +注册并登录 [Auth0](https://manage.auth0.com/dashboard),点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。 + +创建 Auth0 应用 S1 + +填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。 + +创建 Auth0 应用 S2 + +创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息 + +创建 Auth0 应用 S3 + +在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写: + +```bash +http(s)://your-domain/api/auth/callback/auth0 +``` + +创建 Auth0 应用 S4 + + + 可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致 + + +### 新增用户 + +点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat + +新增用户 + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 | +| `AUTH_AUTH0_ID` | 必选 | Auth0 应用程序的 Client ID | +| `AUTH_AUTH0_SECRET` | 必选 | Auth0 应用程序的 Client Secret | +| `AUTH_AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#auth-0) 可查阅相关变量详情。 + + + + + + 部署成功后,用户将可以使用 Auth0 中配置的用户通过身份认证并使用 LobeChat。 + + +## 进阶配置 + +### 连接现有的单点登录服务 + +如果你的企业或组织已有现有的统一身份认证设施,可在 Applications -> SSO Integrations 中,连接现有的单点登录服务。 + +Auth0 支持 Azure Active Directory / Slack / Google Workspace / Office 365 / Zoom 等单点登录服务,详细支持列表可参考 [这里](https://marketplace.auth0.com/features/sso-integrations) + +Connecting to an Existing Single Sign-On Service + +### 配置社交登录 + +如果你的企业或组织需要支持外部人员登录,可以在 Authentication -> Social 中,配置社交登录服务。 + +Configuring Social Login + + + 配置社交登录服务默认会允许所有人通过认证,这可能会导致 LobeChat 被外部人员滥用。 + + + + 如果你需要限制登录人员,务必配置 **阻止策略**: 请在打开社交登录选项后,参考 + [这篇文章](https://auth0.com/blog/permit-or-deny-login-requests-using-auth0-actions/) 创建 Action + 来设置阻止 / 允许列表。 + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.mdx new file mode 100644 index 0000000..053806b --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.mdx @@ -0,0 +1,75 @@ +--- +title: Configuring Authelia Authentication Service for LobeChat +description: >- + Learn how to configure Authelia authentication service in LobeChat, including + creating a provider, configuring environment variables, and deploying + LobeChat. Detailed steps and necessary environment variable settings. +tags: + - Authelia Configuration + - Single Sign-On (SSO) + - LobeChat Authentication + - Environment Variables + - Deployment Instructions +--- + +## Configuring Authelia Authentication Service + +## Authelia Configuration Flow + + +### Create an Authelia Identity Provider + +We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at https://lobe.example.com/. +Note that currently only localhost supports HTTP access; other domains need to enable TLS, otherwise Authelia will actively interrupt authentication by default. + +Now, let's open and edit the configuration file of your Authelia instance: + +Add a new lobe-chat item under identity_providers -> oidc: + +```yaml +identity_providers: + oidc: + ... + ## The other portions of the mandatory OpenID Connect 1.0 configuration go here. + ## See: https://www.authelia.com/c/oidc + - id: lobe-chat + description: LobeChat + secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'. + public: false + authorization_policy: two_factor + redirect_uris: + - https://chat.example.com/api/auth/callback/authelia + scopes: + - openid + - profile + - email + userinfo_signing_algorithm: none +``` + +Make sure to replace secret and redirect_urls with your own values. +Note! The secret configured in Authelia is ciphertext, i.e., a salted hash value. Its corresponding plaintext needs to be filled in LobeChat later. + +Save the configuration file and restart the Authelia service. Now we have completed the Authelia configuration. + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik. | +| `AUTH_AUTHELIA_ID` | Required | The id just configured in Authelia, example value is lobe-chat | +| `AUTH_AUTHELIA_SECRET` | Required | The plaintext corresponding to the secret just configured in Authelia, example value is insecure_secret | +| `AUTH_AUTHELIA_ISSUER` | Required | Your Authelia URL, for example https://sso.example.com | +| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth verification. It only needs to be set when the default generated redirect address is incorrect. https://chat.example.com/api/auth | + + + Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authelia) for details about the variables. + + + + + After a successful deployment, users will be able to use LobeChat by authenticating with the users + configured in Authelia. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx new file mode 100644 index 0000000..dc66c9f --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authelia.zh-CN.mdx @@ -0,0 +1,73 @@ +--- +title: 在 LobeChat 中配置 Authelia 身份验证服务 +description: 学习如何在 LobeChat 中配置 Authelia 身份验证服务,包括创建提供程序、配置环境变量和部署 LobeChat。详细步骤和必要环境变量设置。 +tags: + - Authelia + - 身份验证 + - 单点登录 + - 环境变量 + - LobeChat +--- + +# 配置 Authelia 身份验证服务 + +## Authelia 配置流程 + + +### 创建 Authelia 提供应用 + +我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。 +注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。 + +现在,我们打开 Authelia 实例的配置文件进行编辑: + +在 `identity_providers`-> `oidc` 下新增一个 `lobe-chat` 的项目: + +```yaml +... +identity_providers: + oidc: + ... + ## The other portions of the mandatory OpenID Connect 1.0 configuration go here. + ## See: https://www.authelia.com/c/oidc + - id: lobe-chat + description: LobeChat + secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'. + public: false + authorization_policy: two_factor + redirect_uris: + - https://chat.example.com/api/auth/callback/authelia + scopes: + - openid + - profile + - email + userinfo_signing_algorithm: none +``` + +请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。 +注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。 + +保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。 + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。 | +| `AUTH_AUTHELIA_ID` | 必选 | 刚刚在 Authelia 配置的 `id`,示例值是 `lobe-chat` | +| `AUTH_AUTHELIA_SECRET` | 必选 | 刚刚在 Authelia 配置的 `secret` 对应的明文,示例值是 `insecure_secret` | +| `AUTH_AUTHELIA_ISSUER` | 必选 |您的 Authelia 的网址,例如 `https://sso.example.com` | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authelia) 可查阅相关变量详情。 + + + + + + 部署成功后,用户将可以使用 Authelia 中配置的用户通过身份认证并使用 LobeChat。 + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.mdx new file mode 100644 index 0000000..fdd6dde --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.mdx @@ -0,0 +1,73 @@ +--- +title: Configuring Authentik Authentication Service for LobeChat +description: >- + Learn how to configure Authentik for Single Sign-On (SSO) for LobeChat, + including creating an application provider, setting environment variables, and + deployment instructions. +tags: + - Authentik Configuration + - Single Sign-On (SSO) + - LobeChat Authentication + - Environment Variables + - Deployment Instructions +--- + +## Configuring Authentik Authentication Service + +## Authentik Configuration Flow + + + ### Create an Authentik Application Provider + +In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider. + +Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow. + +In the `Redirect URL/Origin (regex)` field, fill in: + +```bash +https://your-domain/api/auth/callback/authentik +``` + + + - You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in + URL matches the deployed URL. - Replace `your-domain` with your own domain name + + +Create Authentik Provider + +Click **Done** + +After the creation is successful, click **Applications** on the left -> **Create**, fill in the name and Slug, select the provider created in the previous step, and click **Create**. + +After the application provider is created, click the corresponding provider to enter the details page, click **Edit**, and save the `Client ID` and `Client Secret`. + +Copy the URL of `OpenID Configuration Issuer` and save it. + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `authentik` for Authentik. | +| `AUTH_AUTHENTIK_ID` | Required | The Client ID from the Authentik application provider details page | +| `AUTH_AUTHENTIK_SECRET` | Required | The Client Secret from the Authentik application provider details page | +| `AUTH_AUTHENTIK_ISSUER` | Required | The OpenID Configuration Issuer from the Authentik application provider details page | +| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It only needs to be set when the default generated redirect address is incorrect. `https://example.com/api/auth` | + + + Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authentik) for details about the variables. + + + + + + After a successful deployment, users will be able to use LobeChat by authenticating with the users + configured in Authentik. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx new file mode 100644 index 0000000..ca5f708 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/authentik.zh-CN.mdx @@ -0,0 +1,67 @@ +--- +title: 在 LobeChat 中配置 Authentik 身份验证服务 +description: 学习如何在 LobeChat 中配置 Authentik 身份验证服务,包括创建提供程序、配置环境变量和部署 LobeChat。详细步骤和必要环境变量设置。 +tags: + - Authentik + - 身份验证 + - 单点登录 + - 环境变量 + - LobeChat +--- + +# 配置 Authentik 身份验证服务 + +## Authentik 配置流程 + + + ### 创建 Authentik 提供应用 + +在你的 Authentik 实例中使用管理员账号进入 管理员界面 -> 应用程序 -> 提供程序 创建一个新的提供程序。 + +选择 OAuth2/OpenID Provider 作为提供程序类型。填写提供程序的名称,选择身份流程和授权流程。 + +在 `重定向 URL/Origin(正则)` 处填写: + +```bash +https://your-domain/api/auth/callback/authentik +``` + + + - 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。 - + your-domain 请替换为自己的域名 + + +创建 Authentik 提供程序 + +点击「完成」 + +创建成功后,点击左侧的「应用程序」-> 创建,填写名称和 Slug ,提供程序选择上一步创建的提供程序,点击「创建」。 + +提供程序创建成功后,点击相应的提供程序,进入详情页,点击「编辑」,将 `客户端 ID` 和 `客户端 Secret` 保存下来。复制 `OpenID 配置颁发者` 的 URL,保存下来。 + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authentik 请填写 `authentik`。 | +| `AUTH_AUTHENTIK_ID` | 必选 | Authentik 提供程序详情页的 客户端 ID | +| `AUTH_AUTHENTIK_SECRET` | 必选 | Authentik 提供程序详情页的 客户端 Secret | +| `AUTH_AUTHENTIK_ISSUER` | 必选 | Authentik 提供程序详情页的 OpenID 配置颁发者 | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authentik) 可查阅相关变量详情。 + + + + + + 部署成功后,用户将可以使用 Authentik 中配置的用户通过身份认证并使用 LobeChat。 + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx new file mode 100644 index 0000000..46cb1af --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.mdx @@ -0,0 +1,68 @@ +--- +title: Configuring Cloudflare Zero Trust Authentication Service for LobeChat +description: >- + Learn how to configure Cloudflare Zero Trust for Single Sign-On (SSO) for + LobeChat, including creating an application provider, setting environment + variables, and deployment instructions. +tags: + - Cloudflare Zero Trust + - Single Sign-On (SSO) + - LobeChat Authentication + - Environment Variables + - Deployment Instructions +--- + +# Configuring Cloudflare Zero Trust Authentication Service + +## Cloudflare Zero Trust Configuration Flow + + +### Creating an Application in Cloudflare Zero Trust + +We assume you are already familiar with using the Cloudflare Zero Trust platform and that your LobeChat instance is deployed at `https://chat.example.com`. + +First, we need to visit `https://one.dash.cloudflare.com/` and navigate to `Access - Applications`. + +![image](https://github.com/user-attachments/assets/4d671a7c-5d94-4c4b-b4fd-71a5a0e9d227) + +Now, on the current page, click `Add an application` and select `SaaS`. + +![image](https://github.com/user-attachments/assets/3da4c8c4-88c6-40a9-8005-6a0a44aa3b1f) + +In the `Application` text box, enter the application name, such as `LobeChat SSO`. Then click `Select OIDC`, followed by clicking `Add application`. + +![image](https://github.com/user-attachments/assets/16cd9aef-c87b-48a4-95c0-b666082e7515) + +At this point, you have successfully created a SaaS application named `LobeChat SSO` in Cloudflare Zero Trust. + +Next, we need to enter `https://chat.example.com/api/auth/callback/cloudflare-zero-trust` in the `Redirect URLs` field (note that `chat.example.com` should be replaced with your instance's address). + +![image](https://github.com/user-attachments/assets/433fdce4-0af5-417f-b80d-163c2d4f02f6) + +Finally, scroll down the page and record the following three values: `Client secret`, `Client ID`, and `Issuer`. You will need these for setting the environment variables when deploying LobeChat. + +![image](https://github.com/user-attachments/assets/2dd3cde5-fa0d-4f52-b82b-28d9e89379a0) + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | The secret used to encrypt Auth.js session tokens. You can generate a secret using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the SSO provider for LoboChat. Use `cloudflare-zero-trust` for Cloudflare Zero Trust. | +| `AUTH_CLOUDFLARE_ZERO_TRUST_ID` | Required | The Client ID from the Cloudflare Zero Trust application provider details page | +| `AUTH_CLOUDFLARE_ZERO_TRUST_SECRET` | Required | The Client Secret from the Cloudflare Zero Trust application provider details page | +| `AUTH_CLOUDFLARE_ZERO_TRUST_ISSUER` | Required | The OpenID Configuration Issuer from the Cloudflare Zero Trust application provider details page | +| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It only needs to be set when the default generated redirect address is incorrect. `https://example.com/api/auth` | + + + Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Cloudflare%20Zero%20Trust) for details about the variables. + + + + + + After a successful deployment, users will be able to use LobeChat by authenticating with the users + configured in Cloudflare Zero Trust. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx new file mode 100644 index 0000000..55bdf5a --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust.zh-CN.mdx @@ -0,0 +1,65 @@ +--- +title: 在 LobeChat 中配置 Cloudflare Zero Trust 身份验证服务 +description: >- + 学习如何在 LobeChat 中配置 Cloudflare Zero Trust 身份验证服务,包括创建提供程序、配置环境变量和部署 + LobeChat。详细步骤和必要环境变量设置。 +tags: + - Cloudflare Zero Trust + - 身份验证 + - 单点登录 + - 环境变量 + - LobeChat +--- + +# 配置 Cloudflare Zero Trust 身份验证服务 + +## Cloudflare Zero Trust 配置流程 + + +### 在 Cloudflare Zero Trust 中创建应用 + +我们现在默认您已经了解了如何使用 Cloudflare Zero Trust 平台且假设您的 LobeChat 实例部署在 `https://chat.example.com` 中。 + +首先我们需要访问 `https://one.dash.cloudflare.com/` 并前往 `Access - Applications` 中。 + +![image](https://github.com/user-attachments/assets/4d671a7c-5d94-4c4b-b4fd-71a5a0e9d227) + +现在,在所在页面点击 `Add an application` 并选择 `SaaS`。 + +![image](https://github.com/user-attachments/assets/3da4c8c4-88c6-40a9-8005-6a0a44aa3b1f) + +在 `Application` 文本框内填入应用名称,如:`LobeChat SSO`,然后点击 `Select OIDC` 后点击 `Add applicaiton` + +![image](https://github.com/user-attachments/assets/16cd9aef-c87b-48a4-95c0-b666082e7515) + +至此您已成功在 Clouflare Zero Trust 中创建了一个名为 `LobeChat SSO` 的 SaaS 应用。 + +接下来我们需要在 `Redirect URLs` 中填入 `https://chat.example.com/api/auth/callback/cloudflare-zero-trust`(注意此处的 `chat.example.com` 需要替换为您的实例地址) +![image](https://github.com/user-attachments/assets/433fdce4-0af5-417f-b80d-163c2d4f02f6) + +最后我们将页面往下滚动,您将需要记录以下三个值 `Client secret`, `Client ID` 及 `Issuer` 以备后续部署 LobeChat 环境变量使用。 + +![image](https://github.com/user-attachments/assets/2dd3cde5-fa0d-4f52-b82b-28d9e89379a0) + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Cloudflare Zero Trust 请填写 `cloudflare-zero-trust`。 | +| `CLOUDFLARE_ZERO_TRUST_CLIENT_ID` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client ID`,示例值是 `lobe-chat` | +| `CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client secret`,示例值是 `insecure_secret` | +| `CLOUDFLARE_ZERO_TRUST_ISSUER` | 必选 | 在 Cloudflare Zero Trust 生成的 `Issuer`,例如 `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/7db0f` | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Cloudflare%20Zero%20Trust) 可查阅相关变量详情。 + + + + + + 部署成功后,用户将可以使用 Cloudflare Zero Trust 中配置的用户通过身份认证并使用 LobeChat。 + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.mdx new file mode 100644 index 0000000..4fac648 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.mdx @@ -0,0 +1,101 @@ +--- +title: Configuring Github Authentication Service for LobeChat +description: >- + Learn how to configure Github authentication service for LobeChat, including + creating a Github provider, setting up environment variables, and deploying + LobeChat. +tags: + - Github authentication + - LobeChat + - Environment variables + - Single Sign-On + - OAuth authentication +--- + +# Configuring Github Authentication Service + +## Github Configuration Process + + + ### Create a Github Provider + +Click [here][github-create-app] to create a new Github App. + +Fill in the Github App name, Homepage URL, and Callback URL. + +Create a Github Provider + +Set the webhook callback URL according to your needs. + +Fill in other fields + +Set the permission to read email addresses. + +Set required permissions +Set permission to read email addresses + +Set whether it is accessible publicly or only accessible to yourself. + +Set whether it is accessible publicly or only accessible to yourself + +Click "Create Github App". + +After successful creation, click "Generate a new client secret" to create a client secret. + +Create a new client secret + +After successful creation, save the `Client ID` and `Client Secret`. + +Create a new client secret + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the Single Sign-On provider for LobeChat. Use `github` for Github. | +| `AUTH_GITHUB_ID` | Required | Client ID in the Github App details page. | +| `AUTH_GITHUB_SECRET` | Required | Client Secret in the Github App details page. | +| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. Only set it if the default generated redirect address is incorrect. `https://example.com/api/auth` | + + + Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed + information on these variables. + + + + + After successful deployment, users will be able to authenticate with Github and use LobeChat. + + +[github-create-app]: https://github.com/settings/apps/new diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx new file mode 100644 index 0000000..96996d7 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/github.zh-CN.mdx @@ -0,0 +1,93 @@ +--- +title: 在 LobeChat 中配置 Github 身份验证服务 +description: 学习如何在 LobeChat 中配置 Github 身份验证服务,包括创建新的 Github App、设置权限和环境变量。 +tags: + - Github 身份验证 + - Github App + - 环境变量配置 + - 单点登录 + - LobeChat +--- + +# 配置 Github 身份验证服务 + +## Github 配置流程 + + + ### 创建 Github 提供应用 + +点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。 + +填写 Github App name、Homepage URL、Callbak URL + +创建 Github 提供程序 +按照自己所需设置Webhook回调地址 + +填写其他字段 + +设置读取邮件地址权限 + +设置所需权限 +设置读取邮件地址权限 + +设置公开访问还是仅自己访问 + +设置公开访问还是仅自己访问 + +点击「Create Github App」 + +创建成功后,点击「Generate a new client secret」创建客户端Secret + +创建新的客户端密钥 + +创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。 + +创建新的客户端密钥 + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 | +| `AUTH_GITHUB_ID` | 必选 | Github App详情页的 客户端 ID | +| `AUTH_GITHUB_SECRET` | 必选 | Github App详情页的 客户端 Secret | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#github) 可查阅相关变量详情。 + + + + +部署成功后,用户将可以通过Github身份认证并使用 LobeChat。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.mdx new file mode 100644 index 0000000..7c63e43 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.mdx @@ -0,0 +1,74 @@ +--- +title: Configuring Logto Authentication Service in LobeChat +description: >- + Learn how to configure Logto authentication service in LobeChat, including + deployment, creation, setting permissions, and environment variables. +tags: + - Logto Authentication + - Environment Variable Configuration + - Single Sign-On + - LobeChat +--- + +# Configuring Logto Authentication Service + +[Logto](https://github.com/logto-io/logto) is an open-source authentication service with a simple and beautiful interface, rich in features and easy to use. You can choose to use the official Logto Cloud or opt for a private deployment of Logto. + + + +If you want to deploy Logto privately, we recommend using Docker Compose to deploy it together with the LobeChat database version. In this case, LobeChat can share the same Postgres instance with it. + + + +## Logto Configuration Process + +The following assumes your LobeChat database version domain is `https://lobe.example.com`. + +If you are using a privately deployed Logto, assume its endpoint domain is `https://lobe-auth-api.example.com`. + +If you are using Logto Cloud, assume its endpoint domain is `https://example.logto.app`. + + + ### Create Logto Application + + Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name. + + ### Configure Logto + + Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`. + + Set `CORS allowed origins` to `https://lobe.example.com`. + + Configure Logto + + After successful creation, save the `Client ID` and `Client Secret`. + + ### Configure Environment Variables + + Configure Environment Variables + + Set the obtained `Client ID` and `Client Secret` as `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET` in the LobeChat environment variables. + + Configure `LOGTO_ISSUER` in the LobeChat environment variables as follows: + + - `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto + - `https://example.logto.app/oidc` if you are using Logto Cloud + + When deploying LobeChat, you need to configure the following environment variables: + + | Environment Variable | Type | Description | + | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` | + | `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. | + | `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page | + | `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page | + | `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider | + | `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` | + + + Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#logto) for details on related variables. + + + + +After successful deployment, users will be able to authenticate via Logto and use LobeChat. diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx new file mode 100644 index 0000000..7aee105 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/logto.zh-CN.mdx @@ -0,0 +1,78 @@ +--- +title: 在 LobeChat 中配置 Logto 身份验证服务 +description: 学习如何在 LobeChat 中配置 Logto 身份验证服务,包括部署、创建、设置权限和环境变量。 +tags: + - Logto 身份验证 + - 环境变量配置 + - 单点登录 + - LobeChat +--- + +# 配置 Logto 身份验证服务 + +[Logto](https://github.com/logto-io/logto) 是一个开源的身份验证服务,界面简洁美观、功能配置丰富且易于上手,你即可以选择使用其官方提供的 Logto Cloud,也可以选择私有部署 Logto。 + + + 若你想要私有部署 Logto,我们建议你将之与 LobeChat 数据库版本一同使用 Docker Compose 部署,此时 LobeChat 可以与之共用同一个 Postgres 实例。 + + +## Logto 配置流程 + +下文假设你的 LobeChat 数据库版本域名为 `https://lobe.example.com`。 + +若你是私有部署的 Logto,假设其 endpoint 域名为 `https://lobe-auth-api.example.com`。 + +若你是使用的 Logto Cloud,假设其 endpoint 域名为 `https://example.logto.app`。 + + + ### 创建 Logto 应用 + +访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意 + +### 配置 Logto + +配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/` + +配置 `CORS allowed origins` 为 `https://lobe.example.com` + +配置 Logto + +创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。 + +### 配置环境变量 + +配置环境变量 + +将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `LOGTO_CLIENT_ID` 和 `LOGTO_CLIENT_SECRET`。 + +配置 LobeChat 环境变量中 `LOGTO_ISSUER` 为: + +- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto +- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 | +| `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID | +| `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret | +| `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#logto) 可查阅相关变量详情。 + + + + +部署成功后,用户将可以通过 Logto 身份认证并使用 LobeChat。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx new file mode 100644 index 0000000..70cf0b1 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.mdx @@ -0,0 +1,104 @@ +--- +title: Configuration of Microsoft Entra ID Authentication Service for LobeChat +description: >- + Learn how to configure Microsoft Entra ID Authentication Service for LobeChat, + create applications, add users, and set up environment variables for seamless + integration. +tags: + - Microsoft Entra ID + - Authentication Service + - Azure Portal + - SSO + - Environment Variables + - LobeChat +--- + +# Configuration of Microsoft Entra ID Authentication Service + + + ### Create a Microsoft Entra ID Application + +In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application. + +Fill in the desired application name to be displayed to organizational users, choose the account types you wish to support, and if only internal users are supported, select `Accounts in this organizational directory only (Default Directory only - Single tenant)`. + +In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter: + +```bash +https://your-domain/api/auth/callback/azure-ad +``` + + + - You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter + matches the deployed URL. - Please replace "your-domain" with your own domain. + + +App Register + +Click on "Register". + +After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information. + +App Overview + +Go to "Certificates & secrets", select the "Client secrets" tab, click on "New client secret", fill in the description, select the expiration time, and click on "Add" to create a new client secret. + +Create App Client Secret + + + Please make sure to save your client secret as this is your only chance to view it. + + +### Add Users + +Go back to the "Microsoft Entra ID" interface, enter "Users", click on "New user", fill in the user information, and click on "Create" to create a user for using LobeChat. + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate the key using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `azure-ad` for Microsoft Entra ID. | +| `AUTH_AZURE_AD_ID` | Required | Client ID of the Microsoft Entra ID application. | +| `AUTH_AZURE_AD_SECRET` | Required | Client Secret of the Microsoft Entra ID application. | +| `AUTH_AZURE_AD_TENANT_ID` | Required | Tenant ID of the Microsoft Entra ID application. | +| `NEXTAUTH_URL` | Required | This URL is used to specify the callback address for Auth.js when performing OAuth authentication. It is only necessary to set it when the default generated redirect address is incorrect. `https://example.com/api/auth` | + + + You can refer to [📘 environment + variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related + variables. + + + + + + After successful deployment, users will be able to authenticate and use LobeChat using the users + configured in Microsoft Entra ID. + + +## Advanced Configuration + +Please explore further in the [Microsoft Entra ID Learning Center][microsoft-learn-entra]. + +## Related Resources + +- [Quickstart: Register an app][microsoft-entra-register-app] + +[microsoft-azure-portal]: https://portal.azure.com/ +[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app +[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/ diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx new file mode 100644 index 0000000..e1fcc48 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id.zh-CN.mdx @@ -0,0 +1,98 @@ +--- +title: 在 LobeChat 中配置 Microsoft Entra ID 身份验证服务 +description: 学习如何在 LobeChat 中配置 Microsoft Entra ID 身份验证服务,包括创建应用、新增用户和配置环境变量。详细步骤和相关资料。 +tags: + - Microsoft Entra ID + - Microsoft Azure Portal + - 身份验证服务 + - 应用注册 + - 环境变量 + - 用户管理 +--- + +# 配置 Microsoft Entra ID 身份验证服务 + +## Microsoft Entra ID 配置流程 + + + ### 创建 Microsoft Entra ID 应用 + +在你的 [Microsoft Azure Portal][microsoft-azure-portal] 进入 Microsoft Entra ID -> App registrations -> New registration 创建一个新的应用。 + +填写你想向组织用户显示的应用名称,选择你期望支持的账户类型,如果只支持内部用户请选择 `Accounts in this organizational directory only (Default Directory only - Single tenant)`。 + +在 `Redirect URI (optional)` 中,应用类型选择 `Web`,Callback URL, 处填写: + +```bash +https://your-domain/api/auth/callback/azure-ad +``` + + + - 可以在 Register 后再填写或修改 Redirect URIs,但是务必保证填写的 URL 与部署的 URL 一致。 - + your-domain 请填写自己的域名 + + +App Register + +点击「Register」 + +创建成功后,点击相应的应用,进入应用详情页,切换到「Overview」标签页,就可以看到相应的配置信息。 + +App Overview + +进入「Certificates & secrets」,选择「Client secrets」标签,点击「New client secret」,填写描述,选择过期时间,点击「Add」,创建一个新的客户端密钥。 + +Create App Client Secret + +请务必保存好你的客户端密钥,因为这是你唯一的机会查看它。 + +### 新增用户 + +回到「Microsoft Entra ID」界面,进入「Users」,点击「New user」,填写用户信息,点击「Create」,创建用户以使用 LobeChat。 + +### 配置环境变量 + +在部署 LobeChat 时,你需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Microsoft Entra ID 请填写 `azure-ad`。 | +| `AUTH_AZURE_AD_ID` | 必选 | Microsoft Entra ID 应用程序的 Client ID | +| `AUTH_AZURE_AD_SECRET` | 必选 | Microsoft Entra ID 应用程序的 Client Secret | +| `AUTH_AZURE_AD_TENANT_ID` | 必选 | Microsoft Entra ID 应用程序的 Tenant ID | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` | + + + 前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#microsoft-entra-id) 可查阅相关变量详情。 + + + + + + 部署成功后,用户将可以使用 Microsoft Entra ID 中配置的用户通过身份认证并使用 LobeChat。 + + +## 进阶配置 + +请在 [Microsoft Entra ID 学习中心][microsoft-learn-entra],做进一步探索。 + +## 相关资料 + +- [快速注册应用指导][microsoft-entra-register-app] + +[microsoft-azure-portal]: https://portal.azure.com/ +[microsoft-entra-register-app]: https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app +[microsoft-learn-entra]: https://learn.microsoft.com/en-us/entra/identity/ diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx new file mode 100644 index 0000000..cb23956 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.mdx @@ -0,0 +1,118 @@ +--- +title: Configure ZITADEL Authentication Service for LobeChat +description: >- + Learn how to configure ZITADEL Authentication Service for LobeChat deployment, + including creating ZITADEL applications, setting up environment variables, and + enabling single sign-on (SSO). +tags: + - ZITADEL Authentication + - LobeChat Deployment + - Single Sign-On (SSO) + - Environment Variables + - ZITADEL Applications +--- + +# Configure ZITADEL Authentication Service + + + ### Create ZITADEL Application + +Log in to the console of your ZITADEL instance using an account with at least a [`Project Owner` role](https://zitadel.com/docs/guides/manage/console/managers#roles), navigate to (or [create](https://zitadel.com/docs/guides/manage/console/projects#create-a-project)) the project you'd like to host your application in, and click the **New** button to create an application. + +Create ZITADEL Application S1 + +Fill in the name, choose **Web** as the application type, and click **Continue**. + +Create ZITADEL Application S2 + +Choose **Code** as the authentication method. + +Create ZITADEL Application S3 + +In the **Redirect URIs** field, fill in: + +``` +http(s)://your-domain/api/auth/callback/zitadel +``` + +Create ZITADEL Application S4 + + + - 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. + + + +Confirm the configuration and click **Create**. + +Create ZITADEL Application S5 + +Save the **ClientId** and **ClientSecret** for later use. + +Create ZITADEL Application S6 + +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 + +Navigate to the **URLs** tab, and save the **issuer** URL. + +Create ZITADEL Application S8 + +### Configure Environment Variables + +When deploying LobeChat, you need to configure the following environment variables: + +| Environment Variable | Type | Description | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | Required | Key used to encrypt Auth.js session tokens. You can generate a key using the following command: `openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LoboChat. Use `zitadel` for ZITADEL. | +| `AUTH_ZITADEL_ID` | Required | Client ID (`ClientId` as shown in ZITADEL) of the ZITADEL application | +| `AUTH_ZITADEL_SECRET` | Required | Client Secret (`ClientSecret` as shown in ZITADEL) of the ZITADEL application | +| `AUTH_ZITADEL_ISSUER` | Required | Issuer URL of the ZITADEL application | +| `NEXTAUTH_URL` | Required | The URL is used to specify the callback address for the execution of OAuth authentication in Auth.js. It needs to be set only when the default address is incorrect. `https://example.com/api/auth` | + + + You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variables/auth#zitadel). + + + + + + After successful deployment, users will be able to authenticate and use LobeChat using existing + users configured in ZITADEL. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx new file mode 100644 index 0000000..5599247 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/auth/next-auth/zitadel.zh-CN.mdx @@ -0,0 +1,111 @@ +--- +title: 在 LobeChat 中配置 ZITADEL 身份验证服务 +description: 学习如何在 LobeChat 中配置 ZITADEL 身份验证服务,包括创建应用、配置环境变量等步骤。 +tags: + - ZITADEL + - 身份验证服务 + - 环境变量配置 + - 单点登录 + - LobeChat +--- + +# 配置 ZITADEL 身份验证服务 + + + ### 创建 ZITADEL 应用 + +使用具有 [`Project Owner` 角色](https://zitadel.com/docs/guides/manage/console/managers#roles)的账户登录到 ZITADEL 实例控制台,进入(或[创建](https://zitadel.com/docs/guides/manage/console/projects#create-a-project))该应用所属的项目,点击「创建」按钮创建应用。 + +创建 ZITADEL 应用 1 + +填写应用名称,应用类型选择「Web」,点击「继续」。 + +创建 ZITADEL 应用 2 + +选择「Code」作为身份验证方式。 + +创建 ZITADEL 应用 3 + +在「重定向 URLs」字段中填写: + +``` +http(s)://your-domain/api/auth/callback/zitadel +``` + +创建 ZITADEL 应用 4 + + + - 可以创建应用后再填写或修改重定向 URL,但请确保填写的 URL 与部署的 URL 一致。 + +- 请将 `http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。 + + + +确认配置并点击「创建」。 + +创建 ZITADEL 应用 5 + +记录下「ClientId」和「ClientSecret」备用。 + +创建 ZITADEL 应用 6 + +在应用设置页面中,切换到「令牌设置」选项卡,勾选「在 ID Token 中包含用户信息」选项,点击「保存」。 + +创建 ZITADEL 应用 7 + +切换到「URLs」选项卡,记录下「issuer」URL。 + +创建 ZITADEL 应用 8 + +### 配置环境变量 + +部署 LobeChat 时,您需要配置以下环境变量: + +| 环境变量 | 类型 | 描述 | +| --- | --- | --- | +| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成密钥:`openssl rand -base64 32` | +| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 为 LobeChat 选择单点登录提供程序。对于 ZITADEL,请填写 `zitadel`。 | +| `AUTH_ZITADEL_ID` | 必选 | ZITADEL 应用的 Client ID(`ClientId`)。 | +| `AUTH_ZITADEL_SECRET` | 必选 | ZITADEL 应用的 Client Secret(`ClientSecret`)。 | +| `AUTH_ZITADEL_ISSUER` | 必选 | ZITADEL 应用的 OpenID Connect 颁发者(issuer)URL。 | +| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 中执行 OAuth 认证的回调地址。仅当默认地址不正确时才需要设置。`https://example.com/api/auth` | + + + 您可以在 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#zitadel) 中查看相关变量的详细信息。 + + + + +部署成功后,用户将能够通过 ZITADEL 中配置的用户进行身份验证并使用 LobeChat。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.mdx new file mode 100644 index 0000000..3f7830a --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.mdx @@ -0,0 +1,50 @@ +--- +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 | +| `market` | Enables the assistant market functionality. | Enabled | +| `speech_to_text` | Enables speech-to-text functionality. | Enabled | +| `knowledge_base` | Enables the knowledge base functionality. | 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/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.zh-CN.mdx new file mode 100644 index 0000000..309a17c --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/feature-flags.zh-CN.mdx @@ -0,0 +1,46 @@ +--- +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` | 显示欢迎建议。 | 开启 | +| `market` | 启用助手市场功能。 | 开启 | +| `speech_to_text` | 启用语音转文本功能。 | 开启 | +| `knowledge_base` | 启用知识库功能。 | 开启 | + +你可以随时检查 [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.mdx new file mode 100644 index 0000000..219bf38 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.mdx @@ -0,0 +1,53 @@ +# Knowledge Base / File Upload + +LobeChat supports file upload and knowledge base management. This feature relies on the following core technical components. Understanding these components will help you successfully deploy and maintain the knowledge base system. + +## Core Components + +### 1. PostgreSQL and PGVector + +PostgreSQL is a powerful open-source relational database system, and PGVector is its extension for vector operations. + +- **Purpose**: Store structured data and vector indexes +- **Deployment Tip**: Use official Docker image for quick deployment + +Deployment script example: + +``` +docker run -p 5432:5432 -d --name pg -e POSTGRES_PASSWORD=mysecretpassword pgvector/pgvector:pg16 +``` + +- **Note**: Ensure sufficient resources for vector operations + +### 2. S3-compatible Object Storage + +S3 (or S3-compatible storage services) is used for storing uploaded files. + +- **Purpose**: Store raw files +- **Options**: AWS S3, MinIO, or other S3-compatible services +- **Note**: Configure appropriate access permissions and security policies + +### 3. OpenAI Embedding + +OpenAI's Embedding service is used to convert text into vector representations. + + + +LobeChat currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key has access to this model. + + + +- **Purpose**: Generate vector representations for semantic search +- **Notes**: + - Requires valid OpenAI API key + - Implement proper API call limits and error handling + +### 4. Unstructured.io (Optional) + +Unstructured.io is a powerful document processing tool. + +- **Purpose**: Process complex document formats, extract structured information +- **Use Case**: Handle non-plain text formats like PDF, Word +- **Note**: Evaluate processing needs based on document complexity + +By correctly configuring and integrating these core components, you can build a powerful and efficient knowledge base system for LobeChat. Each component plays a crucial role in the overall architecture, supporting advanced document management and intelligent retrieval functions. diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx new file mode 100644 index 0000000..075fa57 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/knowledge-base.zh-CN.mdx @@ -0,0 +1,53 @@ +# 知识库 / 文件上传 + +LobeChat 支持文件上传 / 知识库管理。该功能依赖于以下核心技术组件,了解这些组件将有助于你成功部署和维护知识库系统。 + +## 核心组件 + +### 1. PostgreSQL 与 PGVector + +PostgreSQL 是一个强大的开源关系型数据库系统,而 PGVector 是其扩展,为向量操作提供支持。 + +- **用途**:存储结构化数据和向量索引 +- **部署建议**:使用官方 Docker 镜像可以快速部署 PostgreSQL 和 PGVector + +示例部署脚本: + +``` +docker run -p 5432:5432 -d --name pg -e POSTGRES_PASSWORD=mysecretpassword pgvector/pgvector:pg16 +``` + +- **注意事项**:确保分配足够的资源以处理向量操作 + +### 2. S3 兼容的对象存储 + +S3(或兼容 S3 协议的存储服务)用于存储上传的文件。 + +- **用途**:存储原始文件 +- **选项**:可以使用 AWS S3、MinIO 或其他兼容 S3 协议的存储服务 +- **注意事项**:配置适当的访问权限和安全策略 + +### 3. OpenAI Embedding + +OpenAI 的嵌入(Embedding)服务用于将文本转化为向量表示。 + + + +LobeChat 当前默认使用 OpenAI `text-embedding-3-small` 模型,请确保你的 API Key 可以访问该模型。 + + + +- **用途**:生成文本的向量表示,用于语义搜索 +- **注意事项**: + - 需要有效的 OpenAI API 密钥 + - 实施适当的 API 调用限制和错误处理机制 + +### 4. Unstructured.io(可选) + +Unstructured.io 是一个强大的文档处理工具。 + +- **用途**:处理复杂的文档格式,提取结构化信息 +- **应用场景**:处理 PDF、Word 等非纯文本格式的文档 +- **注意事项**:评估处理需求,根据文档复杂度决定是否部署 + +通过正确配置和集成这些核心组件,您可以为 LobeChat 构建一个强大、高效的知识库系统。每个组件都在整体架构中扮演着关键角色,共同支持高级的文档管理和智能检索功能。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/model-list.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/model-list.mdx new file mode 100644 index 0000000..8018704 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/model-list.mdx @@ -0,0 +1,50 @@ +--- +title: Customizing Provider Model List in LobeChat for Deployment +description: >- + Learn how to customize the model list in LobeChat for deployment with the + syntax and extension capabilities +tags: + - LobeChat + - model customization + - deployment + - extension capabilities +--- + +# Model List + +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 +``` + +For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo` + +In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the model name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only enabling `gpt-3.5-turbo`. + +## Extension Capabilities + +Considering the diversity of model capabilities, we started to add extension configuration in version `0.147.8`, with the following rules: + +```shell +id=displayName +``` + +The first value in angle brackets is designated as the `maxToken` for this model. The second value and beyond are the model's extension capabilities, separated by colons `:`, and the order is not important. + +Examples are as follows: + +- `chatglm-6b=ChatGLM 6B<4096>`: ChatGLM 6B, maximum context of 4k, no advanced capabilities; +- `spark-v3.5=讯飞星火 v3.5<8192:fc>`: Xunfei Spark 3.5 model, maximum context of 8k, supports Function Call; +- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition; +- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`, hacked version of ChatGPT Plus web, context of 128k, supports image recognition, Function Call, file upload. + +Currently supported extension capabilities are: + +| --- | Description | +| -------- | -------------------------------------------------------- | +| `fc` | Function Calling | +| `vision` | Image Recognition | +| `file` | File Upload (a bit hacky, not recommended for daily use) | diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/model-list.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/model-list.zh-CN.mdx new file mode 100644 index 0000000..6ade0e7 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/model-list.zh-CN.mdx @@ -0,0 +1,49 @@ +--- +title: LobeChat 自定义模型服务商模型列表及扩展能力配置 +description: 了解如何在 LobeChat 中自定义模型列表以及扩展能力配置的基本语法和规则。 +tags: + - LobeChat + - 自定义模型列表 + - 扩展能力配置 + - 模型展示名 + - 模型能力 +--- + +# Model List + +LobeChat 支持在部署时自定义模型列表,详情请参考 [模型提供商](/zh/docs/self-hosting/environment-variables/model-provider) 。 + +你可以使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。通过 `<>` 来添加扩展配置。基本语法如下: + +```text +id=displayName,model2,model3 +``` + +例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo` + +上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。 + +## 扩展能力 + +考虑到模型的能力多样性,我们在 `0.147.8` 版本开始增加扩展性配置,它的规则如下: + +```shell +id=displayName +``` + +尖括号第一个值约定为这个模型的 `maxToken` 。第二个及以后作为模型的扩展能力,能力与能力之间用冒号 `:` 作为分隔符,顺序不重要。 + +举例如下: + +- `chatglm-6b=ChatGLM 6B<4096>`:ChatGLM 6B,最大上下文 4k,没有高阶能力; +- `spark-v3.5=讯飞星火 v3.5<8192:fc>`:讯飞星火 3.5 模型,最大上下文 8k,支持 Function Call; +- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别; +- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`,hack 的 ChatGPT Plus 网页版,上下 128k ,支持图像识别、Function Call、文件上传 + +目前支持的扩展能力有: + +| --- | 描述 | +| -------- | ------------------------------------ | +| `fc` | 函数调用(function calling) | +| `vision` | 视觉识别 | +| `file` | 文件上传(比较hack,不建议日常使用) | diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3.mdx new file mode 100644 index 0000000..841889e --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3.mdx @@ -0,0 +1,91 @@ +--- +title: Configuring S3 Storage Service for AI - LobeChat +description: Learn how to configure S3 storage for LobeChat's multimodal AI conversations. +tags: + - S3 Storage + - LobeChat + - AI Conversations + - Cloud Storage + - Image Upload +--- +# Configuring S3 Storage Service + +LobeChat has supported multimodal AI conversations since [a long time ago](https://x.com/lobehub/status/1724289575672291782), which involves the function of uploading images to AI. In the client-side database solution, image files are stored as binary data directly in the browser's IndexedDB database. However, this solution is not feasible in the server-side database. Storing file-like data directly in Postgres would greatly waste database storage space and slow down computational performance. + +The best practice in this area is to use a file storage service (S3) to store image files. S3 is also the storage solution on which the file upload/knowledge base function depends. + + +In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3 API for object storage systems. Common examples include Cloudflare R2, Alibaba Cloud OSS, and self-deployable Minio, all of which support the S3 compatible API. + + +## Core Environment Variables + + + ### `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY` + + These are the two keys required by all S3 compatible storage services to access the S3 storage service, not detailed here. + + ### `S3_ENDPOINT` + + The request endpoint of the storage bucket. Note that this link should not contain the name of the storage bucket. + + `S3_ENDPOINT` must remove the suffix path, otherwise the uploaded files will not be accessible + + For example, for Cloudflare: + + ```shell + S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com + ``` + + ### `S3_BUCKET` and `S3_REGION` + + The name and region of the storage bucket. `S3_BUCKET` is required to specify the name of the storage bucket. `S3_REGION` is optional and is used to specify the region of the storage bucket. Generally, it does not need to be added, but some service providers may require configuration. + + ### `S3_SET_ACL` + + Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it. + + ### `S3_PUBLIC_DOMAIN` + + The public access domain of the storage bucket, used to access files in the storage bucket. This address needs to be **publicly readable**. The reason is that when OpenAI's gpt-4o and other vision models recognize images, OpenAI will try to download this image link on their servers. Therefore, this link must be publicly accessible. If it is a private link, OpenAI will not be able to access the image and thus will not be able to recognize the image content properly. + + + Additionally, since this access domain is often a separate URL, it needs to be configured to allow cross-origin access to the site. Otherwise, cross-origin issues will occur in the browser. + + + + ### `S3_ENABLE_PATH_STYLE` + + Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it. + + + + `path-style` and `virtual-host` are different ways to access buckets and objects in S3, with different URL structures and domain name resolutions. + + Assuming the domain name of the S3 service provider is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are as follows: + - path-style: `s3.example.net/mybucket/config.env` + - virtual-host: `mybucket.s3.example.net/config.env` + + + + + + + Common S3 cloud service providers often default to the `virtual-host` mode, while self-deployed services like Minio default to using `path-style`. Therefore, if you use Minio as the S3 service, you need to set `S3_ENABLE_PATH_STYLE=1`. + + + + + + +## S3 Configuration Guide + +Currently, the S3 configuration tutorials included in the documentation are: + + + + + + +Click to view the tutorial for the corresponding platform. If the above tutorials do not include the S3 service provider you are using, feel free to submit a Pull Request to collectively improve the guide on S3 object storage. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3.zh-CN.mdx new file mode 100644 index 0000000..6ead6b0 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3.zh-CN.mdx @@ -0,0 +1,89 @@ +--- +title: 配置 S3 存储服务 - 多模态 AI 会话 +description: 了解如何配置 S3 存储服务以支持多模态 AI 会话和图片上传。 +tags: + - S3 存储 + - 多模态 AI + - 图片上传 + - 文件存储 +--- + +# 配置 S3 存储服务 + +LobeChat 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就支持了多模态的 AI 会话,其中涉及到图片上传给大模型的功能。在客户端数据库方案中,图片文件直接以二进制数据存储在浏览器 IndexedDB 数据库,但在服务端数据库中这个方案并不可行。因为在 Postgres 中直接存储文件类二进制数据会大大浪费宝贵的数据库存储空间,并拖慢计算性能。 + +这块最佳实践是使用文件存储服务(S3)来存储图片文件,同时 S3 也是文件上传/知识库功能所依赖的大容量静态文件存储方案。 + + + 在本文档库中,S3 所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如 + Cloudflare R2 、阿里云 OSS,可以自部署的 minio 等均支持 S3 兼容 API。 + + +## 核心环境变量 + + + ### `S3_ACCESS_KEY_ID` 与 `S3_SECRET_ACCESS_KEY` + +所有 S3 兼容存储服务都需要的两个密钥,用于访问 S3 存储服务,不详细展开。 + +### `S3_ENDPOINT` + +存储桶的请求端点, 注意此处链接不应该包含存储桶的名称。 + +`S3_ENDPOINT`必须删除后缀路径,否则会无法访问所上传文件 + +例如 Cloudflare 为: + +```shell +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +``` + +### `S3_BUCKET` 和 `S3_REGION` + +存储桶的名称和区域,`S3_BUCKET` 是必须的,用于指定存储桶的名称。 `S3_REGION` 是可选的,用于指定存储桶的区域,一般来说不需要添加,但某些服务商则需要配置。 + +### `S3_SET_ACL` + +是否在上传文件时设置 ACL 为 `public-read`。该选项默认启用。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误,将 `S3_SET_ACL` 设置为 `0` 即可关闭。 + +### `S3_PUBLIC_DOMAIN` + +存储桶对外的访问域名,用于访问存储桶中的文件,这个地址需要**允许互联网可读**。 原因是 OpenAI 的 gpt-4o 等视觉模型识别图片时,OpenAI 会尝试在他们的服务器中下载这个图片链接,因此这个链接必须是公开可访问的,如果是私有的链接,OpenAI 将无法访问到这个图片,进而无法正常识别到图片内容。 + + + 此外,由于该访问域名往往是一个独立的网址,因此需要配置允许站点的跨域访问,否则会在浏览器中出现跨域问题。 + + + +### `S3_ENABLE_PATH_STYLE` + +是否启用 S3 的 `path-style` 访问模式。此选项默认禁用。如果您的 S3 服务提供商使用 `path-style`,请将 `S3_ENABLE_PATH_STYLE` 设置为 `1` 以启用它。 + + + +`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样 + +假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下: +- path-style : `s3.example.net/mybucket/config.env` +- virtual-host : `mybucket.s3.example.net/config.env` + + + + + +常见的 S3 Cloud 服务商往往默认采用 `virtual-host` 模式,而自部署服务 minio 则默认使用的是 `path-style`。 因此如果你使用了 minio 作为 S3 服务,你需要设置 `S3_ENABLE_PATH_STYLE=1` 。 + + + + + +## S3 配置指南 + +目前文档中包含的 S3 配置指南如下: + + + + + + +点击即可查看对应 S3 服务的部署指南,如果上述指南中不包含你所使用的 S3 服务商,欢迎提交 PR ,将共同完善 S3 对象存储的指南。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.mdx new file mode 100644 index 0000000..aa7e2e7 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.mdx @@ -0,0 +1,146 @@ +--- +title: Configuring Cloudflare R2 Storage Service +description: Step-by-step guide to configure Cloudflare R2 for S3 storage. +tags: + - Cloudflare R2 + - S3 Storage + - Configuration Guide +--- +# Configuring Cloudflare R2 Storage Service + +We need to configure an S3 storage service in the server-side database to store files. + +## Configuration Steps + + + +### 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. The following is an example using Cloudflare R2 to guide you through the creation process. + +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 +# Request endpoint of the bucket (note that the path in this link includes the bucket name, which must be removed, or use the link provided on the page for applying S3 API token) +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# Access domain of the bucket +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + +`S3_ENDPOINT` must have its path removed, otherwise uploaded files cannot be accessed. + +### 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 and enter the create API Token page. + +{'Create + +Since our server-side database needs to read and write to the S3 storage service, the permission needs to be set to `Object Read and Write`, 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 +``` + +### 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: + +{'Cross-Origin + +Add a CORS rule to allow requests from your domain (in the previous section, it is `https://your-project.vercel.app`): + +{'Configure + +Example configuration is as follows: + +```json +[ + { + "AllowedOrigins": ["https://your-project.vercel.app"], + "AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"], + "AllowedHeaders": ["*"] + } +] +``` + +After configuration, click save. + + + +## Overview of Environment Variables + +The `https://` in the URL is essential and must be included to maintain the integrity of the URL. + +```shell +# 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 +S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com + +# Bucket Region, such as us-west-1. Generally not required, but some service providers may need it. +# S3_REGION=us-west-1 +``` + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx new file mode 100644 index 0000000..83819e7 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx @@ -0,0 +1,148 @@ +--- +title: 配置 Cloudflare R2 存储服务 +description: 详细步骤配置 Cloudflare R2 存储服务,确保文件存储顺利进行。 +tags: + - Cloudflare R2 + - S3 存储 + - 文件存储 + - 环境变量 +--- + +# 配置 Cloudflare R2 存储服务 + +在服务端数据库中我们需要配置 S3 存储服务来存储文件。 + +## 配置步骤 + + + +### 配置并获取 S3 存储桶 + +你需要前往你的 S3 服务提供商(如 AWS S3、Cloudflare R2 等)并创建一个新的存储桶(Bucket)。接下来以 Cloudflare R2 为例,介绍创建流程。 + +下图是 Cloudflare R2 的界面: + +{'Cloudflare + +创建存储桶时将指定其名称,然后点击创建。 + +{'R2 + +### 获取存储桶相关环境变量 + +在 R2 存储桶的设置中,可以看到桶配置的信息: + +{'查看存储桶的相关信息'} + +其对应的环境变量为: + +```shell +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点(注意此处链接的路径带存储桶名称,必须删除该路径,或使用申请 S3 API token 页面所提供的链接) +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + +`S3_ENDPOINT`必须删除其路径,否则会无法访问所上传文件 + +### 获取 S3 密钥环境变量 + +你需要获取 S3 的访问密钥,以便 LobeChat 的服务端有权限访问 S3 存储服务。在 R2 中,你可以在账户详情中配置访问密钥: + +{'查看存储桶的访问秘钥'} + +点击右上角按钮创建 API token,进入创建 API Token 页面 + +{'创建对应 + +鉴于我们的服务端数据库需要读写 S3 存储服务,因此权限需要选择`对象读与写`,然后点击创建。 + +{'配置 + +创建完成后,就可以看到对应的 S3 API token + +{'复制 + +其对应的环境变量为: + +```shell +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 +``` + +### 配置跨域 + +由于 S3 存储服务往往是一个独立的网址,因此需要配置跨域访问。 + +在 R2 中,你可以在存储桶的设置中找到跨域配置: + +{'Cloudflare + +添加跨域规则,允许你的域名(在上文是 `https://your-project.vercel.app`)来源的请求: + +{'配置允许你的站点域名'} + +示例配置如下: + +```json +[ + { + "AllowedOrigins": ["https://your-project.vercel.app"], + "AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"], + "AllowedHeaders": ["*"] + } +] +``` + +配置后点击保存即可。 + + + +## 环境变量一览 + +URL的`https://`不可缺失,须保持URL的完整性 + +```shell +# S3 秘钥 +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点 +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com + +# 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置 +# S3_REGION=us-west-1 +``` diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.mdx new file mode 100644 index 0000000..73f7f70 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.mdx @@ -0,0 +1,66 @@ +--- +title: Configuring Tencent Cloud COS Storage Service +description: >- + Detailed steps to configure Tencent Cloud COS storage service for smooth file + storage. +tags: + - Tencent Cloud COS + - S3 Storage + - File Storage + - Environment Variables +--- + +# Configuring Tencent Cloud COS Storage Service + +We need to configure S3 storage service for file storage in the server-side database. + +## Configuration Steps + + + ### Configure and Obtain S3 Bucket + + Create a new bucket on [Tencent Cloud COS](https://console.cloud.tencent.com/cos/bucket): + + {'Tencent + + Name the bucket (e.g., 'lobe'). Choose 'Public Read, Private Write', select any region, and keep other settings default. + + {'COS + + ### Get Bucket-related Environment Variables + + View bucket information in COS bucket overview: + + {'View + + Corresponding environment variables: + + ```shell + S3_BUCKET=lobe-130xxxxxx2 + S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com + S3_REGION=ap-chengdu + S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com + ``` + + + Note: `S3_ENDPOINT` should be `https://cos.ap-chengdu.myqcloud.com`, not `https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com` + + Include `https://` in the URL + + + + ### Configure CORS + + Add the following in 'Security Management - CORS Settings': + + {'Configure + + ### Get S3 Keys + + Create a new SecretId and SecretKey at [Tencent Cloud API Key Management](https://console.cloud.tencent.com/cam/capi). Use as `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`. + + +### Additional Notes + +- Consider setting up CDN acceleration for improved access speed and reduced costs. +- Use role management when creating API keys for enhanced security. diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx new file mode 100644 index 0000000..5292bb0 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx @@ -0,0 +1,82 @@ +--- +title: 配置腾讯云 COS 存储服务 +description: 详细步骤配置腾讯云 COS 存储服务,确保文件存储顺利进行。 +tags: + - 腾讯云 COS + - S3 存储 + - 文件存储 + - 环境变量 +--- + +# 配置腾讯云 COS 存储服务 + +在服务端数据库中我们需要配置 S3 存储服务来存储文件。 + +## 配置步骤 + + + +### 配置并获取 S3 存储桶 + +你需要首先前往 [腾讯云 COS](https://console.cloud.tencent.com/cos/bucket) 并创建一个新的存储桶(Bucket): + +{'腾讯云 + +创建存储桶时将指定其名称,下文以 `lobe` 为例。选择 `公有读私有写`,地域随意,其余配置一概默认即可,然后点击创建。 + +{'COS + +### 获取存储桶相关环境变量 + +在 COS 存储桶的概览设置中,可以看到桶配置的信息: + +{'查看存储桶的相关信息'} + +其对应的环境变量为: + +```shell +# 存储桶的名称 +S3_BUCKET=lobe-130xxxxxx2 +# 存储桶的请求端点,注意没有前面的桶名 +S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com +# 桶的区域 +S3_REGION=ap-chengdu +# 存储桶对外的访问域名 +S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com +``` + + +请注意,`S3_ENDPOINT` 的值为 `https://cos.ap-chengdu.myqcloud.com`,而不是 `https://lobe-130xxxxxx2.cos.ap-chengdu.myqcloud.com` + +且此处 URL 的 `https://` 不可缺失,须保持 URL 的完整性 + + + +### 配置跨域 + +在左侧 `安全管理 - 跨域访问 CORS 设置` 中,添加以下配置并保存: + +{'配置跨域'} + +### 获取 S3 秘钥 + +前往 [腾讯云 API 密钥管理](https://console.cloud.tencent.com/cam/capi) 创建一个新的 SecretId 和 SecretKey,填写为 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 即可。 + + + +### 附加说明 + +- 对于对象存储,你可以选择设置 CDN 加速,以提高不同区域的访问速度,提高并发的同时减少下行费用。 +- 创建 API 密钥时,推荐使用角色管理,以提高安全性。 diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.mdx new file mode 100644 index 0000000..c12a09a --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.mdx @@ -0,0 +1,147 @@ +--- +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 + +Use the following URL format to import settings parameters from an external URL: + +```plaintext +https://lobehub.com/?settings= +https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} +``` + +Example of settings in JSON format: + +```json +{ + "keyVaults": { + "openai": { + "apiKey": "user-key" + } + } +} +``` + +## Export settings to URL + +```ts +// Generate settings to export to URL +const settings = { + keyVaults: { + openai: { + 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={"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. + + +## Parameter schema + +### keyVaults + +- Property name and type + +| 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/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx new file mode 100644 index 0000000..14f47b5 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx @@ -0,0 +1,145 @@ +--- +title: URL 分享设置参数 - LobeChat 配置快速设置 +description: 了解如何从外部 URL 导入和导出 LobeChat 的设置参数,包括 keyVaults 和 languageModel,以及参数格式和类型。 +tags: + - URL 分享 + - 设置参数 + - LobeChat + - keyVaults + - languageModel + - JSON 格式 + - URL 导入 + - URL 导出 +--- + +# URL 分享设置参数 + +LobeChat 支持从外部 URL 导入设置参数,以便于快速设置 LobeChat 的配置。 + +目前支持的设置项有: + +- `keyVaults`: 模型供应商相关秘钥设置 +- `languageModel`:语言模型设置 + +## 从 URL 中导入 + +使用以下 URL 格式,可以从外部 URL 导入设置参数: + +```plaintext +https://lobehub.com/?settings= +https://lobehub.com/?settings={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} +``` + +JSON格式的设置示例: + +```json +{ + "keyVaults": { + "openai": { + "apiKey": "user-key" + } + } +} +``` + +## 将设置导出到 URL + +```ts +// 生成要导出到 URL 的设置 +const settings = { + keyVaults: { + openai: { + 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={"keyVaults":{"openai":{"apiKey":"user-key","baseURL":"https://your-proxy.com/v1"}}} +``` + + + LobeChat 不对 URL 中的设置参数进行正确性校验,也不提供 URL 的加密、解密方法,请谨慎使用。 + + +## 参数格式 + +### keyVaults + +- 参数及其类型 + +| 参数名称 | 类型 | +| ---------- | -------------------------- | +| 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 的访问密钥。 | + +### languageModel + +```ts +export type UserModelProviderConfig = Record; +``` + +| 参数名称 | 类型 | +| ---------- | ---------------- | +| 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/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.mdx new file mode 100644 index 0000000..4fb124d --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.mdx @@ -0,0 +1,173 @@ +--- +title: LobeChat Upstream Sync and Docker Deployment Guide +description: >- + Learn how to enable automatic updates for LobeChat Vercel deployments and + upgrade Docker deployment versions easily. Follow step-by-step instructions + for a seamless deployment process. +tags: + - Upstream Sync + - Vercel Deployment + - Docker Deployment + - Automatic Updates + - Redeploy Docker Container +--- + +# Upstream Sync + +## `A` Vercel / Zeabur Deployment + +If you deployed your project according to the one-click deployment steps in the README, you may have noticed that you are always prompted with "updates available." This is because Vercel defaults to creating a new project for you instead of forking the original project, which prevents accurate update detection. We recommend following these steps to redeploy: + +- Delete the original repository; +- Use the Fork button in the top right corner of the page to fork the original project; +- Redeploy on `Vercel`. + +### Enable Automatic Updates + + + If you encounter an error when executing `Upstream Sync`, please try executing it manually again + + +After forking the project, due to Github's limitations, you need to manually enable Workflows on the Actions page of your forked project and start the Upstream Sync Action. Once enabled, you can set up automatic updates to occur every hour. + +Enable Automatic Updates S1 + +Enable Automatic Updates S2 + +If you encounter a sync failure, you need to manually click "Update Branch" once. + +GitHub Action Sync Failure + +Manually Sync 'Update Branch' + +## `B` Docker Deployment + +Upgrading the Docker deployment version is very simple, you just need to redeploy the latest LobeChat image. Here are the commands required to perform these steps: + + + ### Stop and Remove the Current Running LobeChat Container + +Assuming the LobeChat container is named `lobe-chat`, use the following commands to stop and remove the currently running LobeChat container: + +```fish +docker stop lobe-chat +docker rm lobe-chat +``` + +### Pull the Latest LobeChat Image + +Use the following command to pull the latest Docker image for LobeChat: + +```fish +docker pull lobehub/lobe-chat +``` + +### Restart the Docker Container + +Redeploy the LobeChat container using the newly pulled image: + +```fish +docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + + + +Ensure that you have sufficient permissions to stop and remove the container before executing these commands, and that Docker has sufficient permissions to pull the new image. + + + **If I redeploy, will I lose my local chat records?** + +No need to worry, you won't. All of LobeChat's chat records are stored in your local browser. Therefore, when redeploying LobeChat using Docker, your chat records will not be lost. + + + +If you wish to automate the above steps, you can follow the method below and use Crontab scheduling to complete it. The specific steps are as follows. + + + +### Write automatic update scripts and configuration files + +First, create a `lobe.env` configuration file with various environment variables, for example: + +```env +OPENAI_API_KEY=sk-xxxx +OPENAI_PROXY_URL=https://api-proxy.com/v1 +ACCESS_CODE=arthals2333 +OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision +``` + +Then, you can use the following script to automate the update: + +```bash +#!/bin/bash +# auto-update-lobe-chat.sh + +# Set up proxy (optional) +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 + +# Pull the latest image and store the output in a variable +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# Check if the pull command was executed successfully +if [ $? -ne 0 ]; then + exit 1 +fi + +# Check if the output contains a specific string +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 +fi + +echo "Detected lobe-chat update" + +# Remove the old container +echo "Removed: $(docker rm -f 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)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# Clean up unused images +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + + + This script can be used in Crontab, but please ensure that your Crontab can find the correct + Docker command. It is recommended to use absolute paths. + + +Configure Crontab to execute the script every 5 minutes: + +### Configure Crontab to automatically execute scripts + +The following command configures Crontab to execute scripts every 5 minutes, or as often as you like: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx new file mode 100644 index 0000000..41396dd --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx @@ -0,0 +1,165 @@ +--- +title: LobeChat 启动自动更新 - Vercel / Zeabur 部署 +description: 按照指南重新部署项目以解决 LobeChat 在 Vercel 中默认创建新项目导致的“有可用更新”提示问题,并启用自动更新。 +tags: + - Vercel + - Zeabur + - 自动更新 + - Docker部署 + - Github Actions +--- + +# 启动自动更新 + +## `A` Vercel / Zeabur 部署 + +如果你根据 README 中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。我们建议按照以下步骤重新部署: + +- 删除原有的仓库; +- 使用页面右上角的 Fork 按钮,Fork 本项目; +- 在 `Vercel` 上重新选择并部署。 + +### 启动自动更新 + +如果你在执行 `Upstream Sync` 时遇到错误,请尝试手动执再行一次 + +当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。 + +启动自动更新 S1 + +启动自动更新 S2 + +如果你遇到了同步失败的情况,你需要手动重新点一次 「Update Branch」。 + +GitHub Action 同步失败 + +手动同步 「Update Branch」 + +## `B` Docker 部署 + +Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最新镜像即可。 以下是执行这些步骤所需的指令: + + + ### 停止并删除当前运行的 LobeChat 容器 + +假设 LobeChat 容器的名称是 `lobe-chat`,使用以下指令停止并删除当前运行的 LobeChat 容器: + +```fish +docker stop lobe-chat +docker rm lobe-chat +``` + +### 拉取最新的 LobeChat 镜像 + +使用以下命令拉取 LobeChat 的最新 Docker 镜像: + +```fish +docker pull lobehub/lobe-chat +``` + +### 重新启动 Docker 容器 + +使用新拉取的镜像重新部署 LobeChat 容器: + +```fish +docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + + + +确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。 + + + **重新部署的话,我本地的聊天记录会丢失吗?** + +放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。 + + + +如果你希望自动化执行以上步骤,你可以参照下面的方法,利用 Crontab 定时来完成。具体步骤如下。 + + + +### 撰写自动更新脚本、配置文件 + +首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如: + +```env +OPENAI_API_KEY=sk-xxxx +OPENAI_PROXY_URL=https://api-proxy.com/v1 +ACCESS_CODE=arthals2333 +OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision +``` + +然后,你可以使用以下脚本来自动更新: + +```bash +#!/bin/bash +# 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 + +# 拉取最新的镜像并将输出存储在变量中 +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# 检查拉取命令是否成功执行 +if [ $? -ne 0 ]; then + exit 1 +fi + +# 检查输出中是否包含特定的字符串 +echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest" + +# 如果镜像已经是最新的,则不执行任何操作 +if [ $? -eq 0 ]; then + exit 0 +fi + +echo "Detected lobe-chat update" + +# 删除旧的容器 +echo "Removed: $(docker rm -f 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)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# 清理不再使用的镜像 +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + + + 此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。 + + +### 配置 Crontab 自动执行脚本 + +以下命令可以配置 Crontab 每 5 分钟执行一次脚本,你也可以根据需要调整执行频率: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.mdx new file mode 100644 index 0000000..36294a3 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.mdx @@ -0,0 +1,92 @@ +--- +title: LobeChat WebRTC Sync - Real-Time Data Sharing +description: >- + Explore LobeChat's WebRTC sync for real-time data sharing and privacy without + servers. +tags: + - WebRTC + - LobeChat + - Data Synchronization + - Real-Time Communication + - Peer-to-Peer +--- +# LobeChat WebRTC Sync + +## Introduction to WebRTC + +WebRTC (Web Real-Time Communication) is a technology that enables peer-to-peer communication between browsers. In LobeChat, we experimentally implemented real-time data synchronization between devices based on WebRTC and YJS, without relying on traditional server databases. This solution offers high privacy, zero conflicts, and provides a real-time session synchronization experience. + +## Configuring WebRTC for Synchronization + +To use the WebRTC synchronization feature in LobeChat, you need to complete the following steps: + + + +### Deploy Signaling Server + +Deploy a WebRTC signaling server with one click using the Zeabur platform: + +[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx) + +Alternatively, you can view the [source code](https://github.com/lobehub/y-webrtc-signaling) and deploy it on your own. + +After deployment, you will receive a URL, for example: `https://my-signaling-server.zeabur.app`. + +### Enable WebRTC Sync in the Deployment Instance + +The WebRTC sync feature in LobeChat is hidden by default and needs to be enabled by adding the environment variable `FEATURE_FLAGS=+webrtc_sync`. + +### Configure WebRTC Sync Settings in LobeChat + +1. Open LobeChat settings -> Data Sync +2. Enter the signaling server address in the WebRTC sync section; +3. Set the sync channel name and password + +{'LobeChat + +### Repeat the Above Configuration on Devices that Need to Sync + +Ensure all devices use the same signaling server, channel name, and password. Once configured, the devices should automatically start syncing data. + + + +## Limitations and Known Issues + +Although WebRTC has the advantages of no database and flexibility, after extensive community testing, the following limitations and known issues have been identified: + +### Requirement for Devices to be Online Simultaneously + +WebRTC requires devices to be online simultaneously to synchronize, meaning changes cannot be made on one device while offline and then synced later on another device. + +This limitation is due to the communication nature of WebRTC. In a pure frontend, serverless scenario, data synchronization between two devices can only be achieved through peer-to-peer communication. When one device is online and the other is offline, it is impossible to determine where the data should come from. Only when both devices are online can data communication occur. This mode is more like an online chat room where everyone needs to be online to see each other's data and achieve synchronization. + +Therefore, in certain situations, WebRTC's pure peer-to-peer approach may not fully meet users' needs (e.g., one device is a work computer, and the other is a home computer), and there are also some issues with data synchronization. + +### Network Issues Leading to Sync Failures + +Due to the implementation mechanism of WebRTC, its peer-to-peer communication has strict network requirements. Many of our users have reported: + +- Syncing between PCs is possible, but syncing between a mobile device with a SIM card and a PC is not, although syncing is possible when using the same WIFI as the PC; +- Syncing fails when switching networks. + +### Stability and Performance Issues + +- Some users have reported ICE connection failures on the Firefox browser: [WebRTC Data Sync Feedback](https://github.com/lobehub/lobe-chat/issues/1683#issuecomment-2094745907) +- For extremely long text or large amounts of conversation records, the synchronization process may slow down or become unstable: [When the model outputs a very long conversation, the end of the conversation will contain synchronization-related content tags, leading to sync failures](https://github.com/lobehub/lobe-chat/issues/1962) + +## Our Recommendations + +Considering the above reasons, we recommend users treat the WebRTC sync feature as experimental and regularly back up important data. + +We have already released a more stable and user-friendly server database synchronization solution ([deployment guide](/docs/self-hosting/advanced/server-database)). We recommend users prioritize using the server database synchronization solution. + + + Please note that we have officially announced the archiving of this sync feature in [PR + 3182](https://github.com/lobehub/lobe-chat/pull/3182), and the above issues will no longer be + considered for fixes. + diff --git a/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.zh-CN.mdx new file mode 100644 index 0000000..a9fd2c3 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/advanced/webrtc.zh-CN.mdx @@ -0,0 +1,87 @@ +--- +title: LobeChat WebRTC 同步配置指南 +description: 在 LobeChat 中实现基于 WebRTC 和 YJS 的设备间实时数据同步。了解如何配置 WebRTC 并开启同步功能,以及使用局限性和已知问题。 +tags: + - YJS + - 信令服务器 +--- + +# LobeChat WebRTC 同步 + +## WebRTC 简介 + +WebRTC (Web Real-Time Communication) 是一项实现浏览器之间点对点通信的技术。在 LobeChat 中,我们实验性地基于 WebRTC 和 YJS 实现了设备间的实时数据同步,无需依赖传统的服务器数据库。这种方案具有高度隐私性、零冲突性,并能提供实时会话同步体验。 + +## 配置 WebRTC 并实现同步 + +要使用 LobeChat 的 WebRTC 同步功能,需要完成以下步骤: + + + +### 部署信令服务器 + +使用 Zeabur 平台一键部署 WebRTC 信令服务器: + +[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/MY0JZG?referralCode=arvinxx) + +或者查看 [源码](https://github.com/lobehub/y-webrtc-signaling) 自行部署。 + +部署完成后,可以得到一个 URL,例如:`https://my-signaling-server.zeabur.app`。 + +### 在部署实例中开启 WebRTC 同步 + +LobeChat 默认隐藏了 WebRTC 同步功能,需要通过添加环境变量 `FEATURE_FLAGS=+webrtc_sync` 来开启 WebRTC 同步特性。 + +### 配置 LobeChat 的 WebRTC 同步设置 + +1. 打开 LobeChat 设置 -> 数据同步 +2. 在 WebRTC 同步中填写信令服务器地址; +3. 设置同步频道名称和密码 + +{'LobeChat + +### 在需要同步的设备上重复以上配置 + +确保所有设备使用相同的信令服务器、频道名称和密码,完成配置后,设备间应该可以开始自动同步数据。 + + + +## 使用局限性和已知问题 + +虽然 WebRTC 具有无数据库、比较灵活的特性,但目前该功能经过大范围社区测试,存在以下局限性和已知问题: + +### 设备同时在线要求 + +WebRTC 要求设备同时在线才能进行同步,这意味着无法在一台设备离线时在另一台设备上进行更改并稍后同步。 + +这是 WebRTC 本身的通信特性有关系,由于在纯前端、无服务端的情况下,两个设备的数据同步只能通过点对点通信的形式达成。当一个设备在线,一个设备离线的情况下,我们无从感知数据到底应该从哪来,只有当两台设备都在线的时候,双发数据才能通信。其实这种模式更像是一个在线聊天室,大家都在线时才能看到对方的数据,然后达成同步。 + +因此 WebRTC 这种纯点对点的方式在某些情况下并无法完全满足用户的诉求(例如一个是公司电脑,一个是家里电脑),同时也存在一些数据同步层面的问题。 + +### 网络问题可能导致同步失败 + +由于 WebRTC 的实现机制,其点对点通信对于网络要求非常苛刻,我们的很多用户反馈: + +- 在 PC 上可以互相同步、 手机 sim 卡无法和 PC 同步、但是换成和PC一样的WIFI可以和 PC 同步; +- 任何切换网络都无法同步; + +### 稳定性与性能问题 + +- 部分用户报告在 Firefox 浏览器上遇到 ICE 连接失败的问题:[WebRTC Data Sync Feedback](https://github.com/lobehub/lobe-chat/issues/1683#issuecomment-2094745907) +- 对于超长文本或大量对话记录,同步过程可能变慢或不稳定:[当模型输出超长对话时,对话末尾会出现同步相关的内容标签,导致同步失败](https://github.com/lobehub/lobe-chat/issues/1962) + +## 我们的建议 + +鉴于以上原因,我们建议用户将 WebRTC 同步功能视为实验性功能,并定期备份重要数据。 + +目前我们已经发布了更稳定、更用户友好的服务端数据库同步方案([部署指南](/zh/docs/self-hosting/advanced/server-database)),我们建议用户优先考虑使用服务端数据库同步方案。 + + + 请注意,我们已经在 [PR 3182](https://github.com/lobehub/lobe-chat/pull/3182) + 中正式宣布归档该同步特性,上述问题将不再考虑进行修复。 + diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables.mdx new file mode 100644 index 0000000..50e1cc2 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables.mdx @@ -0,0 +1,23 @@ +--- +title: LobeChat Environment Variables - Customizing Guide +description: >- + Learn how to customize LobeChat configuration using environment variables for + additional features and options. +tags: + - LobeChat + - Environment Variables + - Configuration + - Customization +--- + +# Environment Variables + +LobeChat provides some additional configuration options when deployed, which can be customized using environment variables. + + + + + + + + diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables.zh-CN.mdx new file mode 100644 index 0000000..b492e15 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables.zh-CN.mdx @@ -0,0 +1,21 @@ +--- +title: LobeChat 环境变量 - 自定义设置 +description: 了解如何使用环境变量在部署 LobeChat 时进行自定义设置。包括基础环境变量和模型服务商设置。 +tags: + - LobeChat + - 环境变量 + - 自定义设置 + - 模型服务商 +--- + +# 环境变量 + +LobeChat 在部署时提供了一些额外的配置项,你可以使用环境变量进行自定义设置。 + + + + + + + + diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.mdx new file mode 100644 index 0000000..770a99d --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.mdx @@ -0,0 +1,84 @@ +--- +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 + collection and analysis. +tags: + - Data Analytics + - LobeChat + - Analytics Services + - Environment Variables + - Configuration +--- + +# Data Analytics + +We have integrated several free/open-source data analytics services in LobeChat for collecting user usage data. Here are environment variables that you can use. + +## Vercel Analytics + +### `ENABLE_VERCEL_ANALYTICS` + +- Type: Optional +- Description: Used to configure the environment variable for Vercel Analytics. Set to `1` to enable Vercel Analytics. +- Default: `-` +- Example: `1` + +### `DEBUG_VERCEL_ANALYTICS` + +- Type: Optional +- Description: Used to enable the debug mode for Vercel Analytics. +- Default: `-` +- Example: `1` + +## Google Analytics + +### `GOOGLE_ANALYTICS_MEASUREMENT_ID` + +- Type: Required +- 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 + +### `POSTHOG_KEY` + +- Type: Required +- Description: Set the PostHog project Key. Add it will auto enable PostHog Analytics. +- Default: `-` +- Example: `phc_xxxxxxxx` + +### `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` + +### `DEBUG_POSTHOG_ANALYTICS` + +- Type: Optional +- Description: Enable the debug mode for PostHog. +- Default: `-` +- Example: `1` + +## Umami Analytics + +### `UMAMI_WEBSITE_ID` + +- Type: Required +- Description: Your Umami Website ID. Add it will auto enable Umami Analytics. +- Default: `-` +- Example: `E738D82A-EE9E-4806-A81F-0CA3CAE57F65` + +### `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` + +[posthog-analytics-url]: https://posthog.com +[umami-analytics-url]: https://umami.is diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.zh-CN.mdx new file mode 100644 index 0000000..df02c2d --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/analytics.zh-CN.mdx @@ -0,0 +1,82 @@ +--- +title: 在 LobeChat 中 配置数据统计服务环境变量指南 +description: 了解如何在 LobeChat 中配置各种数据统计服务的环境变量,包括Vercel Analytics、Google Analytics 等。 +tags: + - 数据统计 + - 环境变量 + - Vercel Analytics + - Google Analytics + - Posthog Analytics + - Umami Analytics +--- + +# 数据统计 + +我们在 LobeChat 中集成了若干免费 / 开源的数据统计服务,用于了解用户的使用情况,以下是相关环境变量。 + +## Vercel Analytics + +### `ENABLE_VERCEL_ANALYTICS` + +- 类型:可选 +- 描述:用于配置 Vercel Analytics 的环境变量,当设为 `1` 时开启 Vercel Analytics +- 默认值: `-` +- 示例:`1` + +### `DEBUG_VERCEL_ANALYTICS` + +- 类型:可选 +- 描述:用于开启 Vercel Analytics 的调试模式 +- 默认值: `-` +- 示例:`1` + +## Google Analytics + +### `GOOGLE_ANALYTICS_MEASUREMENT_ID` + +- 类型:必选 +- 描述:Google Analytics 的 Measurement ID,填写此项后将自动开启 Google Analytics +- 默认值: `-` +- 示例:`G-63LP2TV03T` + +## Posthog Analytics + +### `POSTHOG_KEY` + +- 类型:必选 +- 描述:设置 PostHog 项目 Key,设置此项后将自动开启 PostHog Analytics +- 默认值: `-` +- 示例:`phc_xxxxxxxx` + +### `POSTHOG_HOST` + +- 类型:可选 +- 描述:设置 PostHog 服务的部署地址,默认为官方的 SaaS 地址 +- 默认值:`https://app.posthog.com` +- 示例:`https://example.com` + +### `POSTHOG_DEBUG` + +- 类型:可选 +- 描述:开启 PostHog 的调试模式 +- 默认值: `-` +- 示例:`1` + +## Umami Analytics + +### `UMAMI_WEBSITE_ID` + +- 类型:必选 +- 描述:你的 Umami 的 Website ID,填写此项后将自动开启 Umami Analytics +- 默认值:`-` +- 示例:`E738D82A-EE9E-4806-A81F-0CA3CAE57F65` + +### `UMAMI_SCRIPT_URL` + +- 类型:可选 +- 描述:Umami 脚本的网址,默认为 Umami Cloud 提供的脚本网址 +- 默认值:`https://analytics.umami.is/script.js` +- 示例:`https://umami.your-site.com/script.js` + +[posthog-analytics-url]: https://posthog.com +[umami-analytics-url]: https://umami.is diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.mdx new file mode 100644 index 0000000..909ea90 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.mdx @@ -0,0 +1,261 @@ +--- +title: LobeChat Authentication Service Environment Variables +description: >- + Explore the essential environment variables for configuring authentication + services in LobeChat, including OAuth SSO, NextAuth settings, and + provider-specific details. +tags: + - Authentication Service + - OAuth SSO + - Clerk + - NextAuth +--- + +# Authentication Service + +LobeChat provides a complete authentication service capability when deployed. The following are the relevant environment variables. You can use these environment variables to easily define the identity verification services that need to be enabled in LobeChat. + +## Next Auth + +### General Settings + +#### `NEXT_AUTH_SECRET` + +- Type: Required +- Description: Key used to encrypt the session tokens in Auth.js. You can generate the key using the following command: `openssl rand -base64 32`. +- Default: `-` +- Example: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=` + +#### `NEXT_AUTH_SSO_PROVIDERS` + +- Type: Optional +- Description: Select the single sign-on provider for LoboChat. For multiple SSO Providers separating them with commas, for example, `auth0,azure-ad,authentik`. +- Default: `auth0` +- Example: `auth0,azure-ad,authentik` + +#### `NEXTAUTH_URL` + +- Type: Optional +- Description: This URL is used to specify the callback address for Auth.js during OAuth authentication. It does not need to be set when deploying on Vercel. +- Default: `-` +- Example: `https://example.com/api/auth` + +### Auth0 + +#### `AUTH0_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Auth0 application. You can access it [here](https://manage.auth0.com/dashboard) and navigate to the application settings to view. +- Default: `-` +- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P` + +#### `AUTH0_CLIENT_SECRET` + +- Type: Required +- Description: Client Secret of the Auth0 application. +- Default: `-` +- Example: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm` + +#### `AUTH0_ISSUER` + +- Type: Required +- Description: Issuer/domain of the Auth0 application. +- Default: `-` +- Example: `https://example.auth0.com` + +### Microsoft Entra ID + +#### `AZURE_AD_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Microsoft Entra ID application. +- Default: `-` +- Example: `be8f6da1-58c3-4f16-ff1b-78f5148e10df` + +#### `AZURE_AD_CLIENT_SECRET` + +- Type: Required +- Description: Client Secret of the Microsoft Entra ID application. +- Default: `-` +- Example: `~gI8Q.pTiN1vwB6Gl.E1yFT1ojcXABkdACfJXaNj` + +#### `AZURE_AD_TENANT_ID` + +- Type: Required +- Description: Tenant ID of the Microsoft Entra ID application. +- Default: `-` +- Example: `c8ae2f36-edf6-4cda-96b9-d3e198a47cba` + +### Authentik + +#### `AUTHENTIK_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Authentik provider application. You can access it [here][auth0-client-page] and navigate to the application settings to view. +- Default: `-` +- Example: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P` + +#### `AUTHENTIK_CLIENT_SECRET` + +- Type: Required +- Description: Client Secret of the Authentik provider application. +- Default: `-` +- Example: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm` + +#### `AUTHENTIK_ISSUER` + +- Type: Required +- Description: Issuer/domain of the Authentik provider application. +- Default: `-` +- Example: `https://your-authentik-domain.com/application/o/slug/` + +### Authelia + +#### `AUTHELIA_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Authelia provider application. You can access it [here][auth0-client-page] and navigate to the application settings to view. +- Default: `-` +- Example: `lobe-chat` + +#### `AUTHELIA_CLIENT_SECRET` + +- Type: Required +- Description: The plaintext of the Client Secret for the Authelia provider +- Default: `-` +- Example: `insecure_secret` + +#### `AUTHELIA_ISSUER` + +- Type: Required +- Description: Issuer of the Authelia provider application. +- Default: `-` +- Example: `https://sso.example.com` + +### Cloudflare Zero Trust + +#### `CLOUDFLARE_ZERO_TRUST_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Cloudflare Zero Trust provider application. +- Default: `-` +- Example: `711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c` + +#### `CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET` + +- Type: Required +- Description: The plaintext of the Client Secret for the Cloudflare Zero Trust provider +- Default: `-` +- Example: `8f26d4ef834a828045b401e032ae128dbb00471bca53f0d25332323f525dfa30` + +#### `CLOUDFLARE_ZERO_TRUST_ISSUER` + +- Type: Required +- Description: Issuer of the Cloudflare Zero Trust provider application. +- Default: `-` +- Example: `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c` + +### Generic OIDC + +#### `GENERIC_OIDC_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Generic OIDC provider application. +- Default: `-` +- Example: `_client_id_for_lobe_chat_` + +#### `GENERIC_OIDC_CLIENT_SECRET` + +- Type: Required +- Description: The plaintext of the Client Secret for the Generic OIDC provider +- Default: `-` +- Example: `_client_secret_for_lobe_chat_` + +#### `GENERIC_OIDC_ISSUER` + +- Type: Required +- Description: Issuer of the Generic OIDC provider application. +- Default: `-` +- Example: `https://sso.example.com` + +### Github + +#### `GITHUB_CLIENT_ID` + +- Type: Required +- Description: Client ID of the Github application. You can access it [here](https://github.com/settings/apps) and navigate to the application settings to view. +- Default: `-` +- Example: `abd94200333283550508` + +#### `GITHUB_CLIENT_SECRET` + +- Type: Required +- Description: Client Secret of the Github application. +- Default: `-` +- Example: `dd262976ac0931d947e104891586a053f3d3750b` + +### ZITADEL + +#### `ZITADEL_CLIENT_ID` + +- Type: Required +- Description: Client ID of the ZITADEL application. This can be found under your application in the ZITADEL console. +- Default: `-` +- Example: `123456789012345678@your-project` + +#### `ZITADEL_CLIENT_SECRET` + +- Type: Required +- Description: Client Secret of the ZITADEL application. +- Default: `-` +- Example: `9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A` + +#### `ZITADEL_ISSUER` + +- Type: Required +- Description: Issuer of the ZITADEL application. This is usually the URL of the ZITADEL instance, and can be found in `URLs` tab of your application in the console. +- Default: `-` +- Example: `https://your-instance-abc123.zitadel.cloud` + +#### `LOGTO_CLIENT_ID` + +- Type: Required +- Description: The Client ID of the Logto application. You can find it in the Logto console for private deployment or [Logto Cloud](http://cloud.logto.io/) depending on the deployment mode. +- Default value: `-` +- Example: `123456789012345678@your-project` + +#### `LOGTO_CLIENT_SECRET` + +- Type: Required +- Description: The Client Secret of the Logto application. +- Default value: `-` +- Example: `9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A` + +#### `LOGTO_ISSUER` + +- Type: Required +- Description: The OpenID Connect issuer of the Logto application. You can find it in the Logto console for private deployment or [Logto Cloud](http://cloud.logto.io/) depending on the deployment mode. +- Default value: `-` +- Example: `https://lobe-auth-api.example.com/oidc` + + + Currently, we only support providers above. If you need to use other identity verification service + providers, you can submit a [feature + request](https://github.com/lobehub/lobe-chat/issues/new/choose) or Pull Request. + + +## Clerk + +### `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` + +- Type: Required +- Description: Publishable key of the Clerk application. You can access it [here](https://dashboard.clerk.com) and navigate to the API Keys to view. +- Default: `-` +- Example: `pk_test_Zmxvd4luZy1wdW1hLTIyLmNsXXJrTmFjY291bnRzLmRldiQ` in dev / `pk_live_Y2xlcdsubG9iZWh1Yi1cbmMuY24k` in production + +### `CLERK_SECRET_KEY` + +- Type: Required +- Description: Secret key of the Clerk application. +- Default: `-` +- Example: `sk_test_513Ma0P7IAWM1XMv4waxZjRYRajWTaCfJLjpEO3SD2` in dev / `sk_live_eMMlHjwJvZFUfczFljSKqZdwQtLvmczmsJSNmdrpeZ` in production diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.zh-CN.mdx new file mode 100644 index 0000000..768b7d0 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/auth.zh-CN.mdx @@ -0,0 +1,260 @@ +--- +title: LobeChat 身份验证服务设置 +description: 了解如何配置 LobeChat 的身份验证服务环境变量。 +tags: + - LobeChat + - 身份验证服务 + - 单点登录 + - Next Auth + - Clerk +--- + +# 身份验证服务 + +LobeChat 在部署时提供了完善的身份验证服务能力,以下是相关的环境变量,你可以使用这些环境变量轻松定义需要在 LobeChat 中开启的身份验证服务。 + +## Next Auth + +### 通用设置 + +#### `NEXT_AUTH_SECRET` + +- 类型:必选 +- 描述:用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32`. +- 默认值: `-` +- 示例: `Tfhi2t2pelSMEA8eaV61KaqPNEndFFdMIxDaJnS1CUI=` + +#### `NEXT_AUTH_SSO_PROVIDERS` + +- 类型:可选 +- 描述:选择 LoboChat 的单点登录提供商。如果有多个单点登录提供商,请用逗号分隔,例如 `auth0,azure-ad,authentik` +- 默认值: `auth0` +- 示例: `auth0,azure-ad,authentik` + +#### `NEXTAUTH_URL` + +- 类型:可选 +- 描述:该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,在 Vercel 上部署时无需设置。 +- 默认值:`-` +- 示例:`https://example.com/api/auth` + +### Auth0 + +#### `AUTH0_CLIENT_ID` + +- 类型:必选 +- 描述: Auth0 应用程序的 Client ID,您可以访问[这里](https://manage.auth0.com/dashboard)并导航至应用程序设置来查看 +- 默认值: `-` +- 示例: `evCnOJP1UX8FMnXR9Xkj5t0NyFn5p70P` + +#### `AUTH0_CLIENT_SECRET` + +- 类型:必选 +- 描述: Auth0 应用程序的 Client Secret +- 默认值: `-` +- 示例: `wnX7UbZg85ZUzF6ioxPLnJVEQa1Elbs7aqBUSF16xleBS5AdkVfASS49-fQIC8Rm` + +#### `AUTH0_ISSUER` + +- 类型:必选 +- 描述: Auth0 应用程序的签发人 / 域 +- 默认值: `-` +- 示例: `https://example.auth0.com` + +### Microsoft Entra ID + +#### `AZURE_AD_CLIENT_ID` + +- 类型:必选 +- 描述:Microsoft Entra ID 应用程序的客户端 ID。 +- 默认值:`-` +- 示例:`be8f6da1-58c3-4f16-ff1b-78f5148e10df` + +#### `AZURE_AD_CLIENT_SECRET` + +- 类型:必选 +- 描述:Microsoft Entra ID 应用程序的客户端密钥。 +- 默认值:`-` +- 示例:`~gI8Q.pTiN1vwB6Gl.E1yFT1ojcXABkdACfJXaNj` + +#### `AZURE_AD_TENANT_ID` + +- 类型:必选 +- 描述:Microsoft Entra ID 应用程序的租户 ID。 +- 默认值:`-` +- 示例:`c8ae2f36-edf6-4cda-96b9-d3e198a47cba` + +### Authentik + +#### `AUTHENTIK_CLIENT_ID` + +- 类型:必选 +- 描述: Authentik 提供程序的 Client ID +- 默认值: `-` +- 示例: `YNtbIRlYF8Kj66mTLue59nsGLlb7HNyx1qjPH6VS` + +#### `AUTHENTIK_CLIENT_SECRET` + +- 类型:必选 +- 描述: Authentik 提供程序的 Client Secret +- 默认值: `-` +- 示例: `h3lMI1vPUzqyqqeIDUbH5UNNOxyQLXk35h89yETeaAwHk7qVXBG3sJQWeqHBU5pyggwhP9u0eaZ1eq6DHUddVPLoS4gncqD37yuCr8jI8dY66WAt45MStDsDcQm0Ygze` + +#### `AUTHENTIK_ISSUER` + +- 类型:必选 +- 描述: Authentik 提供程序的 OpenID Connect 颁发者 +- 默认值: `-` +- 示例: `https://your-authentik-domain.com/application/o/slug/` + +### Authelia + +#### `AUTHELIA_CLIENT_ID` + +- 类型:必选 +- 描述: Authelia 提供程序的 Client ID +- 默认值: `-` +- 示例: `lobe-chat` + +#### `AUTHELIA_CLIENT_SECRET` + +- 类型:必选 +- 描述: Authelia 提供程序的 Client Secret 的明文 +- 默认值: `-` +- 示例: `insecure_secret` + +#### `AUTHELIA_ISSUER` + +- 类型:必选 +- 描述: Authentik 提供程序的 OpenID Connect 颁发者 +- 默认值: `-` +- 示例: `https://sso.example.com` + +### Cloudflare Zero Trust + +#### `CLOUDFLARE_ZERO_TRUST_CLIENT_ID` + +- 类型:必选 +- 描述: Cloudflare Zero Trust 提供程序的 Client ID +- 默认值: `-` +- 示例: `711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c` + +#### `CLOUDFLARE_ZERO_TRUST_CLIENT_SECRET` + +- 类型:必选 +- 描述: Cloudflare Zero Trust 提供程序的 Client Secret 的明文 +- 默认值: `-` +- 示例: `8f26d4ef834a828045b401e032ae128dbb00471bca53f0d25332323f525dfa30` + +#### `CLOUDFLARE_ZERO_TRUST_ISSUER` + +- 类型:必选 +- 描述: Cloudflare Zero Trust 提供程序的 OpenID Connect 颁发者 +- 默认值: `-` +- 示例: `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/711963a58df8c943cfd6c487cac99ce9f6ee0c88c0b7bf94584b8ff052fcb09c` + +### Generic OIDC + +#### `GENERIC_OIDC_CLIENT_ID` + +- 类型:必选 +- 描述: Generic OIDC 提供程序的 Client ID +- 默认值: `-` +- 示例: `_client_id_for_lobe_chat_` + +#### `GENERIC_OIDC_CLIENT_SECRET` + +- 类型:必选 +- 描述: Generic OIDC 提供程序的 Client Secret 的明文 +- 默认值: `-` +- 示例: `_client_secret_for_lobe_chat_` + +#### `GENERIC_OIDC_ISSUER` + +- 类型:必选 +- 描述: Generic OIDC 提供程序的 OpenID Connect 颁发者 +- 默认值: `-` +- 示例: `https://sso.example.com` + +### Github + +#### `GITHUB_CLIENT_ID` + +- 类型:必选 +- 描述: Github 应用的客户端 ID。您可以在[这里](https://github.com/settings/apps)访问,并导航到应用程序设置以查看。 +- 默认值: `-` +- 示例: `abd94200333283550508` + +#### `GITHUB_CLIENT_SECRET` + +- 类型:必选 +- 描述: Github应用的客户端密钥。 +- 默认值: `-` +- 示例: `dd262976ac0931d947e104891586a053f3d3750b` + +### ZITADEL + +#### `ZITADEL_CLIENT_ID` + +- 类型:必选 +- 描述:ZITADEL 应用的 Client ID。您可以在 ZITADEL 控制台应用设置中找到 Client ID。 +- 默认值:`-` +- 示例:`123456789012345678@your-project` + +#### `ZITADEL_CLIENT_SECRET` + +- 类型:必选 +- 描述:ZITADEL 应用的 Client Secret。 +- 默认值:`-` +- 示例:`9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A` + +#### `ZITADEL_ISSUER` + +- 类型:必选 +- 描述:ZITADEL 应用的 OpenID Connect 颁发者(issuer),通常为 ZITADEL 实例的 URL。您可以在 ZITADEL 控制台应用设置中的 `URLs` 选项卡中找到 issuer。 +- 默认值:`-` +- 示例:`https://your-instance-abc123.zitadel.cloud` + +### Logto + +#### `LOGTO_CLIENT_ID` + +- 类型:必选 +- 描述:Logto 应用程序的 Client ID。您可以在根据部署模式,在私有部署的 Logto 控制台或 [Logto Cloud](http://cloud.logto.io/) 中找到。 +- 默认值:`-` +- 示例:`123456789012345678@your-project` + +#### `LOGTO_CLIENT_SECRET` + +- 类型:必选 +- 描述:Logto 应用程序的 Client Secret。 +- 默认值:`-` +- 示例:`9QF1n5ATzU7Z3mHp2Iw4gKX8kY6oR7uW1DnKcV3LqX2jF6iG3fBmJ1kV7nS5zE6A` + +#### `LOGTO_ISSUER` + +- 类型:必选 +- 描述:Logto 应用程序的 OpenID Connect 颁发者(issuer)。根据部署模式,您可以在私有部署的 Logto 控制台或 [Logto Cloud](http://cloud.logto.io/) 中找到。 +- 默认值:`-` +- 示例:`https://lobe-auth-api.example.com/oidc` + + + 如果您需要使用其他身份验证服务提供商,可以提交 + [功能请求](https://github.com/lobehub/lobe-chat/issues/new/choose) 或 Pull Request。 + + +## Clerk + +### `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` + +- 类型:必选 +- 描述: Clerk 应用程序的 Publishable key。您可以在[这里](https://dashboard.clerk.com)访问,并导航到 API Keys 以查看。 +- 默认值:`-` +- 示例: `pk_test_Zmxvd4luZy1wdW1hLTIyLmNsXXJrTmFjY291bnRzLmRldiQ` (测试环境) / `pk_live_Y2xlcdsubG9iZWh1Yi1cbmMuY24k` (生产环境) + +### `CLERK_SECRET_KEY` + +- 类型:必选 +- 描述: Clerk 应用程序的 Secret key。您可以在[这里](https://dashboard.clerk.com)访问,并导航到 API Keys 以查看。 +- 默认值:`-` +- 示例: `sk_test_513Ma0P7IAWM1XMv4waxZjRYRajWTaCfJLjpEO3SD2` (测试环境) / `sk_live_eMMlHjwJvZFUfczFljSKqZdwQtLvmczmsJSNmdrpeZ`(生产环境) diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.mdx new file mode 100644 index 0000000..5fe4016 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.mdx @@ -0,0 +1,131 @@ +--- +title: Customize LobeChat Deployment with Environment Variables +description: >- + Learn about the common environment variables used to customize LobeChat + deployment, including access code, OAuth SSO, base path, and default agent + configuration. +tags: + - LobeChat + - environment variables + - deployment + - access code + - OAuth SSO + - base path + - default agent configuration +--- + +# Environment Variables + +LobeChat provides some additional configuration options during deployment, which can be customized using environment variables. + +## Common Variables + +### `ACCESS_CODE` + +- Type: Optional +- Description: Add a password to access the LobeChat service. You can set a long password to prevent brute force attacks. +- Default: - +- Example: `awCTe)re_r74` or `rtrt_ewee3@09!` + +### `API_KEY_SELECT_MODE` + +- Type:Optional +- Description:Controls the mode for selecting the API Key when multiple API Keys are available. Currently supports `random` and `turn`. +- Default:`random` +- Example:`random` or `turn` + +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 polling manner according to the specified order. + +### `NEXT_PUBLIC_BASE_PATH` + +- Type: Optional +- Description: Add a `basePath` for LobeChat. +- Default: - +- Example: `/test` + +### `DEFAULT_AGENT_CONFIG` + +- 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'` + +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: + +| Configuration Type | Example | Explanation | +| --- | --- | --- | +| Basic Key-Value Pair | `model=gpt-4` | Set the model to `gpt-4`. | +| Nested Field | `tts.sttLocale=en-US` | Set the language locale for the text-to-speech service to `en-US`. | +| 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`, `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`. | + +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. + +### `PROXY_URL` + +- Type: Optional +- Description: Used to specify the proxy URL for connecting to external services. The value of this variable should be different in different deployment environments. +- Default: - +- Example: `http://127.0.0.1:7890` or `socks5://localhost:7891` + + + If you're using Docker Desktop on Windows or macOS, it relies on a virtual machine. In this setup, + `localhost` / `127.0.0.1` refers to the localhost of the container itself. In such cases, please + try using `host.docker.internal` instead of `localhost`. + + +## Plugin Service + +### `PLUGINS_INDEX_URL` + +- Type: Optional +- Description: Index address of the LobeChat plugin market. If you have deployed the plugin market service on your own, you can use this variable to override the default plugin market address. +- Default: `https://chat-plugins.lobehub.com` + +### `PLUGIN_SETTINGS` + +- Type: Optional +- Description: Used to configure plugin settings. Use the format `plugin-name:setting-field=setting-value` to configure the settings of the plugin. Separate multiple setting fields with a semicolon `;`, and separate multiple plugin settings with a comma `,`. +- Default: `-` +- Example: `search-engine:SERPAPI_API_KEY=xxxxx,plugin-2:key1=value1;key2=value2` + +The above example sets the `SERPAPI_API_KEY` of the `search-engine` plugin to `xxxxx`, and sets `key1` of `plugin-2` to `value1`, and `key2` to `value2`. The generated plugin settings configuration is as follows: + +```json +{ + "plugin-2": { + "key1": "value1", + "key2": "value2" + }, + "search-engine": { + "SERPAPI_API_KEY": "xxxxx" + } +} +``` + +## Assistant Market + +### `AGENTS_INDEX_URL` + +- Type: Optional +- Description: Index address of the LobeChat assistant market. If you have deployed the assistant market service on your own, you can use this variable to override the default market address. +- Default: `https://chat-agents.lobehub.com` diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.zh-CN.mdx new file mode 100644 index 0000000..34c3b1b --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/basic.zh-CN.mdx @@ -0,0 +1,126 @@ +--- +title: LobeChat 环境变量配置指南 +description: 了解如何使用环境变量自定义设置 LobeChat 部署,包括访问密码、单点登录、basePath 设置等。 +tags: + - LobeChat + - 环境变量 + - 配置指南 + - 单点登录 + - 插件服务 + - 助手市场 +--- + +# 环境变量 + +LobeChat 在部署时提供了一些额外的配置项,你可以使用环境变量进行自定义设置。 + +## 通用变量 + +### `ACCESS_CODE` + +- 类型:可选 +- 描述:添加访问 LobeChat 服务的密码,你可以设置一个长密码以防被爆破 +- 默认值:- +- 示例:`awCTe)re_r74` or `rtrt_ewee3@09!` + +### `API_KEY_SELECT_MODE` + +- 类型:可选 +- 描述:用于控制多个 API Keys 时,选择 Key 的模式,当前支持 `random` 和 `turn` +- 默认值:`random` +- 示例:`random` 或 `turn` + +使用 `random` 模式下,将在多个 API Keys 中随机获取一个 API Key。 + +使用 `turn` 模式下,将按照填写的顺序,轮询获取得到 API Key。 + +### `NEXT_PUBLIC_BASE_PATH` + +- 类型:可选 +- 描述:为 LobeChat 添加 `basePath` +- 默认值: `-` +- 示例: `/test` + +### `DEFAULT_AGENT_CONFIG` + +- 类型:可选 +- 描述:用于配置 LobeChat 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。 +- 默认值:`-` +- 示例:`'model=gpt-4-1106-preview;params.max_tokens=300;plugins=search-engine,lobe-image-designer'` + +`DEFAULT_AGENT_CONFIG` 用于配置 LobeChat 默认助理的默认配置。它支持多种数据类型和结构,包括键值对、嵌套字段、数组值等。下表详细说明了 `DEFAULT_AGENT_CONFIG` 环境变量的配置项、示例以及相应解释: + +| 配置项类型 | 示例 | 解释 | +| --- | --- | --- | +| 基本键值对 | `model=gpt-4` | 设置模型为 `gpt-4`。 | +| 嵌套字段 | `tts.sttLocale=en-US` | 设置文本到语音服务的语言区域为 `en-US`。 | +| 数组 | `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`, `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`。 | + +相关阅读: + +- [[RFC] 022 - 环境变量配置默认助手参数](https://github.com/lobehub/lobe-chat/discussions/913) + +### `FEATURE_FLAGS` + +- 类型:可选 +- 描述:用于控制 LobeChat 的特性功能,支持多个功能标志,使用 `+` 增加一个功能,使用 `-` 来关闭一个功能,多个功能标志之间使用英文逗号 `,` 隔开,最外层建议添加引号 `"` 以避免解析错误。 +- 默认值:`-` +- 示例:`"-welcome_suggest"` + +具体的内容可以参见 [特性标志](/zh/docs/self-hosting/advanced/feature-flags) 中的说明。 + +### `PROXY_URL` + +- 类型:可选 +- 描述:用于指定连接到外部服务的代理 URL。该变量的值在不同的部署环境中应该有所不同。 +- 默认值:- +- 示例:`http://127.0.0.1:7890` 或 `socks5://localhost:7891` + + + `Docker Desktop` 在 `Windows `和 `macOS `上走的是虚拟机方案,如果是 `localhost` / `127.0.0.1` + 是走到自身容器的 `localhost`,此时请尝试用 `host.docker.internal` 替代 `localhost` + + +## 插件服务 + +### `PLUGINS_INDEX_URL` + +- 类型:可选 +- 描述:LobeChat 插件市场的索引地址,如果你自行部署了插件市场的服务,可以使用该变量来覆盖默认的插件市场地址 +- 默认值:`https://chat-plugins.lobehub.com` + +### `PLUGIN_SETTINGS` + +- 类型:可选 +- 描述:用于配置插件的设置,使用 `插件名:设置字段=设置值` 的格式来配置插件的设置,多个设置字段用英文分号 `;` 隔开,多个插件设置使用英文逗号`,`隔开。 +- 默认值:`-` +- 示例:`search-engine:SERPAPI_API_KEY=xxxxx,plugin-2:key1=value1;key2=value2` + +上述示例表示设置 `search-engine` 插件的 `SERPAPI_API_KEY` 为 `xxxxx`,设置 `plugin-2` 的 `key1` 为 `value1`,`key2` 为 `value2`。生成的插件设置配置如下: + +```json +{ + "plugin-2": { + "key1": "value1", + "key2": "value2" + }, + "search-engine": { + "SERPAPI_API_KEY": "xxxxx" + } +} +``` + +## 助手市场 + +### `AGENTS_INDEX_URL` + +- 类型:可选 +- 描述:LobeChat 助手市场的索引地址,如果你自行部署了助手市场的服务,可以使用该变量来覆盖默认的市场地址 +- 默认值:`https://chat-agents.lobehub.com` diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.mdx new file mode 100644 index 0000000..e6377bf --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.mdx @@ -0,0 +1,482 @@ +--- +title: LobeChat Model Service Providers - Environment Variables and Configuration +description: >- + Learn about the environment variables and configuration settings for various + model service providers like OpenAI, Google AI, AWS Bedrock, Ollama, + Perplexity AI, Anthropic AI, Mistral AI, Groq AI, OpenRouter AI, and 01.AI. +tags: + - Model Service Providers + - Environment Variables +--- + +# Model Providers + +When deploying LobeChat, a rich set of environment variables related to model service providers is provided, allowing you to easily define the model service providers to be enabled in LobeChat. + +## 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 +- Description: This is the API key you applied for on the OpenAI account page, you can check it out [here](https://platform.openai.com/api-keys) +- Default: - +- Example: `sk-xxxxxx...xxxxxx` + +### `OPENAI_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the OpenAI interface proxy, you can use this configuration item to override the default OpenAI API request base URL +- Default: `https://api.openai.com/v1` +- Example: `https://api.chatanywhere.cn` or `https://aihubmix.com/v1` + + + Please check the request suffix of your proxy service provider. Some proxy service providers may + add `/v1` to the request suffix, while others may not. If you find that the AI returns an empty + message during testing, try adding the `/v1` suffix and retry. + + + + Whether to fill in `/v1` is closely related to the model service provider. For example, the + default address of openai is `api.openai.com/v1`. If your proxy forwards the `/v1` interface, you + can simply fill in `proxy.com`. However, if the model service provider directly forwards the + `api.openai.com` domain, then you need to add `/v1` to the URL yourself. + + +Related discussions: + +- [Why is the return value blank after installing Docker, configuring environment variables?](https://github.com/lobehub/lobe-chat/discussions/623) +- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734) +- [No response in chat after filling in the proxy server address](https://github.com/lobehub/lobe-chat/discussions/1065) + +### `OPENAI_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo` + +The above example adds `qwen-7b-chat` and `glm-6b` to the model list, removes `gpt-3.5-turbo` from the list, and displays the name of `gpt-4-0125-preview` as `gpt-4-turbo`. If you want to disable all models first and then enable specific models, you can use `-all,+gpt-3.5-turbo`, which means only `gpt-3.5-turbo` will be enabled. + +You can find all current model names in [modelProviders](https://github.com/lobehub/lobe-chat/tree/main/src/config/modelProviders). + +## Azure OpenAI + +If you need to use Azure OpenAI to provide model services, you can refer to the [Deploying with Azure OpenAI](/docs/self-hosting/examples/azure-openai) section for detailed steps. Here, we will list the environment variables related to Azure OpenAI. + +### `AZURE_API_KEY` + +- Type: Required +- Description: This is the API key you applied for on the Azure OpenAI account page +- Default: - +- Example: `c55168be3874490ef0565d9779ecd5a6` + +### `AZURE_ENDPOINT` + +- Type: Required +- Description: The endpoint of Azure OpenAI, you can find it in the Azure OpenAI account page +- Default: `-` +- Example: `https://docs-test-001.openai.azure.com` + +### `AZURE_API_VERSION` + +- Type: Required +- Description: The API version of Azure, following the format YYYY-MM-DD +- Default: `-` +- Example: `2023-02-01`, refer to [latest version](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version) + +### `AZURE_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` + +## Google AI + +### `GOOGLE_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Google AI Platform to access Google AI services +- Default: - +- Example: `AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE` + +### `GOOGLE_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the Google API proxy, you can use this configuration item to override the default Google API request base URL +- Default: `https://generativelanguage.googleapis.com` +- Example: `https://api.genai.gd.edu.kg/google` + +### `GOOGLE_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest` + +## Anthropic AI + +### `ANTHROPIC_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Anthropic AI +- Default: - +- Example: `sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx` + +### `ANTHROPIC_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the Anthropic API proxy, you can use this configuration item to override the default Anthropic API request base URL +- Default: `https://api.anthropic.com` +- Example: `https://my-anthropic-proxy.com` + +## 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 +- Description: Access key ID for AWS service authentication +- Default: - +- Example: `AKIA5STVRLFSB4S9HWBR` + +### `AWS_SECRET_ACCESS_KEY` + +- Type: Required +- Description: Key for AWS service authentication +- Default: - +- Example: `Th3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oEC` + +### `AWS_REGION` + +- Type: Optional +- Description: Region setting for AWS services +- 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` + +- Type: Required +- Description: This is the API key you applied for in the OpenRouter AI service +- Default: - +- Example: `sk-or-v1-xxxxxx...xxxxxx=` + +### `OPENROUTER_MODEL_LIST` + +- Type: Optional +- Description: Used to specify a custom OpenRouter model list. Model definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta` + +## Github + +### `GITHUB_TOKEN` + +- Type: Required +- Description: This is your Personal access tokens you got for in the Github +- Default: `-` +- Example:`ghp_xxxxxx...xxxxxx=` + +### `GITHUB_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+gpt-4o,+gpt-4o-mini` + +## TogetherAI + +### `TOGETHERAI_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the TogetherAI service +- Default: - +- Example: `xxxxxx...xxxxxx` + +### `TOGETHERAI_MODEL_LIST` + +- Type: Optional +- Description: Used to specify a custom TogetherAI model list. Model definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo,+meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` + +## Fireworks AI + +### `FIREWORKSAI_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Fireworks AI service +- Default: `-` +- Example:`xxxxxx...xxxxxx` + +### `FIREWORKSAI_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1` + +## 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 +- Description: Used to enable the Ollama service, setting this will display optional open-source language models in the language model list and can also specify custom language models +- Default: - +- Example: `http://127.0.0.1:11434` + +### `OLLAMA_MODEL_LIST` + +- Type: Optional +- Description: Used to specify a custom Ollama language model. Model definition syntax rules see [model-list][model-list] +- Default: - +- Example: `llama2:7B` + +## Moonshot AI + +### `MOONSHOT_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Moonshot AI service +- Default: - +- Example: `Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=` + +## Perplexity AI + +### `PERPLEXITY_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Perplexity AI +- Default: - +- Example: `pplx-xxxxxx...xxxxxx` + +### `PERPLEXITY_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the Perplexity API proxy, you can use this configuration item to override the default Perplexity API request base URL +- Default: `https://api.Perplexity.ai` +- Example: `https://my-Perplexity-proxy.com` + +## Minimax AI + +### `MINIMAX_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Minimax AI service +- Default: - +- Example: `xxxxxx...xxxxxx` + +## Mistral AI + +### `MISTRAL_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Mistral AI service +- Default: - +- Example: `xxxxxx...xxxxxx=` + +## Groq AI + +### `GROQ_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Groq AI +- Default: - +- Example: `gsk_xxxxxx...xxxxxx` + +### `GROQ_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the Groq API proxy, you can use this configuration item to override the default Groq API request base URL +- Default: `https://api.groq.com/openai/v1` +- Example: `https://my-groq-proxy.com/v1` + +### `GROQ_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+gemma2-9b-it,+llama-3.1-8b-instant` + +## ZHIPU AI + +### `ZHIPU_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the ZHIPU AI service +- Default: - +- Example: `4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT` + +### `ZHIPU_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+glm-4-alltools,+glm-4-plus` + +## 01.AI + +### `ZEROONE_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the 01.AI service +- Default: - +- Example:`xxxxxx...xxxxxx` + +### `ZEROONE_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+yi-large,+yi-large-rag` + +## Qwen + +### `QWEN_API_KEY` + +- Type: Required +- Description: This is the DashScope API key you can obtain from Alibaba Cloud +- Default: - +- Example:`sk-xxxxx...xxxxx` + +### `QWEN_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+qwen-turbo-latest,+qwen-plus-latest` + +## Stepfun AI + +### `STEPFUN_API_KEY` + +- Type: Required +- Description: This is the DashScope API key you can obtain from Stepfun AI service +- Default: - +- Example:`sk-xxxxx...xxxxx` + +## Novita AI + +### `NOVITA_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the Novita AI service +- Default: - +- Example:`xxxxxx...xxxxxx` + +### `NOVITA_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct` + +## BAICHUAN + +### `BAICHUAN_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the BAICHUAN service +- Default: - +- Example:`xxxxxx...xxxxxx` + +## TAICHU + +### `TAICHU_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the TAICHU service +- Default: - +- Example:`xxxxxx...xxxxxx` + +## 360 AI + +### `AI360_API_KEY` + +- Type: Required +- Description: This is the API key you applied for in the 360 AI service +- Default: - +- Example:`xxxxxx...xxxxxx` + +## Siliconflow + +### `SILICONCLOUD_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Siliconflow service +- Default: - +- Example: `xxxxxx...xxxxxx` + +### `SILICONCLOUD_PROXY_URL` + +- Type: Optional +- Description: If you manually configure the Siliconflow API proxy, you can use this configuration item to override the default Siliconflow API request base URL +- Default: `https://api.siliconflow.cn/v1` +- Example: `https://my-siliconflow-proxy.com/v1` + +### `SILICONCLOUD_MODEL_LIST` + +- Type: Optional +- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list] +- Default: `-` +- Example: `-all,+deepseek-ai/DeepSeek-V2.5,+Qwen/Qwen2.5-7B-Instruct` + +## Upstage AI + +### `UPSTAGE_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Upstage AI service +- Default: - +- Example: `xxxxxx...xxxxxx` + +## Spark AI + +### `SPARK_API_KEY` + +- Type: Required +- Description: This is the API key you applied from Spark AI service +- Default: - +- Example: `xxxxxx...xxxxxx` + +## A21 AI + +### `AI21_API_KEY` + +- Type: Required +- Description: This is the API key you applied from AI21_API_KEY service +- Default: - +- Example: `xxxxxx...xxxxxx` + +[model-list]: /docs/self-hosting/advanced/model-list diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx new file mode 100644 index 0000000..e56b076 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx @@ -0,0 +1,480 @@ +--- +title: LobeChat 模型服务商相关环境变量配置指南 +description: 了解如何配置各个模型服务商的环境变量以在 LobeChat 中使用不同的AI模型服务。 +tags: + - LobeChat + - 模型服务商 + - 环境变量 + - AI模型 + - 配置指南 +--- + +# 模型服务商 + +LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,你可以使用这些环境变量轻松定义需要在 LobeChat 中开启的模型服务商。 + +## OpenAI + +### `ENABLED_OPENAI` + +- 类型:可选 +- 描述:默认启用 OpenAI 作为模型供应商,当设为 0 时关闭 OpenAI 服务 +- 默认值:`1` +- 示例:`0` + +### `OPENAI_API_KEY` + +- 类型:必选 +- 描述:这是你在 OpenAI 账户页面申请的 API 密钥,可以前往 [这里](https://platform.openai.com/api-keys) 查看 +- 默认值:- +- 示例:`sk-xxxxxx...xxxxxx` + +### `OPENAI_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL +- 默认值:`https://api.openai.com/v1` +- 示例:`https://api.chatanywhere.cn` 或 `https://aihubmix.com/v1` + + + 请检查你的代理服务商的请求后缀,有的代理服务商会在请求后缀添加 + `/v1`,有的则不会。如果你在测试时发现 AI 返回的消息为空,请尝试添加 `/v1` 后缀后重试。 + + + + 是否填写 `/v1` 跟模型服务商有很大关系,比如 openai 的默认地址是 `api.openai.com/v1` + 。如果你的代理商转发了 `/v1` 这个接口,那么直接填 `proxy.com` 即可。 但如果模型服务商是直接转发了 + `api.openai.com` 域名,那么你就要自己加上 `/v1` 这个 url。 + + +相关讨论: + +- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobe-chat/discussions/623) +- [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734) +- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065) + +### `OPENAI_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo` + +上面示例表示增加 `qwen-7b-chat` 和 `glm-6b` 到模型列表,而从列表中删除 `gpt-3.5-turbo`,并将 `gpt-4-0125-preview` 模型名字展示为 `gpt-4-turbo`。如果你想先禁用所有模型,再启用指定模型,可以使用 `-all,+gpt-3.5-turbo`,则表示仅启用 `gpt-3.5-turbo`。 + +你可以在 [modelProviders](https://github.com/lobehub/lobe-chat/tree/main/src/config/modelProviders) 查找到当前的所有模型名。 + +## Azure OpenAI + +如果你需要使用 Azure OpenAI 来提供模型服务,可以查阅 [使用 Azure OpenAI 部署](/zh/docs/self-hosting/examples/azure-openai) 章节查看详细步骤,这里将列举和 Azure OpenAI 相关的环境变量。 + +### `AZURE_API_KEY` + +- 类型:必选 +- 描述:这是你在 Azure OpenAI 账户页面申请的 API 密钥 +- 默认值:- +- 示例:`c55168be3874490ef0565d9779ecd5a6` + +### `AZURE_ENDPOINT` + +- 类型:必选 +- 描述:Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 +- 默认值:`-` +- 示例:`https://docs-test-001.openai.azure.com` + +### `AZURE_API_VERSION` + +- 类型:必选 +- 描述:Azure 的 API 版本,遵循 YYYY-MM-DD 格式 +- 默认值:`-` +- 示例:`2024-02-01`,查阅 [最新版本](https://docs.microsoft.com/zh-cn/azure/developer/javascript/api-reference/es-modules/azure-sdk/ai-translation/translationconfiguration?view=azure-node-latest#api-version) + +### `AZURE_MODEL_LIST` + +- 类型:必选 +- 描述:用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表][model-list] +- 默认值:`-` +- 示例:`gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` + +## Google AI + +### `GOOGLE_API_KEY` + +- 类型:必选 +- 描述:这是你在 Google AI Platform 申请的 API 密钥,用于访问 Google AI 服务 +- 默认值:- +- 示例:`AIraDyDwcw254kwJaGjI9wwaHcdDCS__Vt3xQE` + +### `GOOGLE_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 Google 接口代理,可以使用此配置项来覆盖默认的 Google API 请求基础 URL +- 默认值:`https://generativelanguage.googleapis.com` +- 示例:`https://api.genai.gd.edu.kg/google` + +### `GOOGLE_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+gemini-1.5-flash-latest,+gemini-1.5-pro-latest` + +## Anthropic AI + +### `ANTHROPIC_API_KEY` + +- 类型:必选 +- 描述:这是你在 Anthropic AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`sk-ant-apixx-xxxxxxxxx-xxxxxxxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx` + +### `ANTHROPIC_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 Anthropic 接口代理,可以使用此配置项来覆盖默认的 Anthropic API 请求基础 URL +- 默认值:`https://api.anthropic.com` +- 示例:`https://my-anthropic-proxy.com` + +## AWS Bedrock + +### `ENABLED_AWS_BEDROCK` + +- 类型:可选 +- 描述:当设为 1 时启用 AWS Bedrock 服务 +- 默认值:`0` +- 示例:`1` + +### `AWS_ACCESS_KEY_ID` + +- 类型:必选 +- 描述:用于 AWS 服务认证的访问键 ID +- 默认值:- +- 示例:`AKIA5STVRLFSB4S9HWBR` + +### `AWS_SECRET_ACCESS_KEY` + +- 类型:必选 +- 描述:用于 AWS 服务认证的密钥 +- 默认值:- +- 示例:`Th3vXxLYpuKcv2BARktPSTPxx+jbSiFT6/0w7oEC` + +### `AWS_REGION` + +- 类型:可选 +- 描述:AWS 服务的区域设置 +- 默认值:`us-east-1` +- 示例:`us-east-1` + +## DeepSeek AI + +### `DEEPSEEK_API_KEY` + +- 类型:必选 +- 描述:这是你在 DeepSeek AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`sk-xxxxxx...xxxxxx` + +## OpenRouter AI + +### `OPENROUTER_API_KEY` + +- 类型:必选 +- 描述:这是你在 OpenRouter AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`sk-or-v1-xxxxxx...xxxxxx=` + +### `OPENROUTER_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta` + +## Github + +### `GITHUB_TOKEN` + +- 类型:必选 +- 描述:这是你在 Github 申请的 Personal access tokens +- 默认值:- +- 示例:`ghp_xxxxxx...xxxxxx=` + +### `GITHUB_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+gpt-4o,+gpt-4o-mini` + +## TogetherAI + +### `TOGETHERAI_API_KEY` + +- 类型:必选 +- 描述:这是你在 TogetherAI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +### `TOGETHERAI_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo,+meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo` + +## Fireworks AI + +### `FIREWORKSAI_API_KEY` + +- 类型:必选 +- 描述:这是你在 Fireworks AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +### `FIREWORKSAI_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+accounts/fireworks/models/firefunction-v2,+accounts/fireworks/models/firefunction-v1` + +## Ollama + +### `ENABLED_OLLAMA` + +- 类型:可选 +- 描述:默认启用 Ollama 作为模型供应商,当设为 0 时关闭 Ollama 服务 +- 默认值:`1` +- 示例:`0` + +### `OLLAMA_PROXY_URL` + +- 类型:必选 +- 描述:用于启用 Ollama 服务,设置后可在语言模型列表内展示可选开源语言模型,也可以指定自定义语言模型 +- 默认值:- +- 示例:`http://127.0.0.1:11434` + +### `OLLAMA_MODEL_LIST` + +- 类型:可选 +- 描述:用于指定自定义 Ollama 语言模型。模型定义语法规则见 [模型列表][model-list] +- 默认值:- +- 示例:`qwen:32B` + +## Moonshot AI + +### `MOONSHOT_API_KEY` + +- 类型:必选 +- 描述:这是你在 Moonshot AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`Y2xpdGhpMzNhZXNoYjVtdnZjMWc6bXNrLWIxQlk3aDNPaXpBWnc0V1RaMDhSRmRFVlpZUWY=` + +## Perplexity AI + +### `PERPLEXITY_API_KEY` + +- 类型:必选 +- 描述:这是你在 Perplexity AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`pplx-xxxxxx...xxxxxx` + +### `PERPLEXITY_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 Perplexity 接口代理,可以使用此配置项来覆盖默认的 Perplexity API 请求基础 URL +- 默认值:`https://api.Perplexity.ai` +- 示例:`https://my-Perplexity-proxy.com` + +## Minimax AI + +### `MINIMAX_API_KEY` + +- 类型:必选 +- 描述:这是你在 Minimax AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## Mistral AI + +### `MISTRAL_API_KEY` + +- 类型:必选 +- 描述:这是你在 Mistral AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx=` + +## Groq AI + +### `GROQ_API_KEY` + +- 类型:必选 +- 描述:这是你在 Groq AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`gsk_xxxxxx...xxxxxx` + +### `GROQ_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+gemma2-9b-it,+llama-3.1-8b-instant` + +### `GROQ_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 Groq 接口代理,可以使用此配置项来覆盖默认的 Groq API 请求基础 URL +- 默认值:`https://api.groq.com/openai/v1` +- 示例:`https://my-groq-proxy.com/v1` + +## 智谱 AI + +### `ZHIPU_API_KEY` + +- 类型:必选 +- 描述:这是你在 智谱 AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`4582d332441a313f5c2ed9824d1798ca.rC8EcTAhgbOuAuVT` + +### `ZHIPU_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+glm-4-alltools,+glm-4-plus` + +## 01 AI + +### `ZEROONE_API_KEY` + +- 类型:必选 +- 描述:这是你在零一万物服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +### `ZEROONE_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+yi-large,+yi-large-rag` + +## 通义千问 + +### `QWEN_API_KEY` + +- 类型:必选 +- 描述:这是你在阿里云百炼平台上获取的 DashScope API 密钥 +- 默认值:- +- 示例:`sk-xxxxx...xxxxx` + +### `QWEN_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+qwen-turbo-latest,+qwen-plus-latest` + +## Stepfun AI + +### `STEPFUN_API_KEY` + +- 类型:必选 +- 描述:这是你在 Stepfun AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## Novita AI + +### `NOVITA_API_KEY` + +- 类型:必选 +- 描述:这是你在 Novita AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +### `NOVITA_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+meta-llama/llama-3.1-8b-instruct,+meta-llama/llama-3.1-70b-instruct` + +## 百川 + +### `BAICHUAN_API_KEY` + +- 类型:必选 +- 描述:这是你在 百川智能 服务平台申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## 紫东太初 + +### `TAICHU_API_KEY` + +- 类型:必选 +- 描述:这是你在 紫东太初 服务平台申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## 360 AI + +### `AI360_API_KEY` + +- 类型:必选 +- 描述:这是你在 360智脑 服务平台申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## Siliconflow + +### `SILICONCLOUD_API_KEY` + +- 类型:必选 +- 描述:这是你在 Siliconflow 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +### `SILICONCLOUD_MODEL_LIST` + +- 类型:可选 +- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list] +- 默认值:`-` +- 示例:`-all,+deepseek-ai/DeepSeek-V2.5,+Qwen/Qwen2.5-7B-Instruct` + +### `SILICONCLOUD_PROXY_URL` + +- 类型:可选 +- 描述:如果你手动配置了 Siliconflow 接口代理,可以使用此配置项来覆盖默认的 Siliconflow API 请求基础 URL +- 默认值:`https://api.siliconflow.cn/v1` +- 示例:`https://my-siliconflow-proxy.com/v1` + +## Upstage AI + +### `UPSTAGE_API_KEY` + +- 类型:必选 +- 描述:这是你在 Upstage AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## Spark AI + +### `SPARK_API_KEY` + +- 类型:必选 +- 描述:这是你在 Spark AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +## A21 AI + +### `AI21_API_KEY` + +- 类型:必选 +- 描述:这是你在 A21 AI 服务中申请的 API 密钥 +- 默认值:- +- 示例:`xxxxxx...xxxxxx` + +[model-list]: /zh/docs/self-hosting/advanced/model-list diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.mdx new file mode 100644 index 0000000..2a17c78 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.mdx @@ -0,0 +1,82 @@ +--- +title: Configuring S3 Storage Service +description: >- + Learn how to configure S3 storage service to support multimodal AI sessions + and image uploads. +tags: + - S3 Storage + - Multimodal AI + - Image Upload + - File Storage +--- + +# Configuring S3 Storage Service + +LobeChat supports multimodal AI sessions, including the ability to upload unstructured data such as images and files to large language models. To optimize storage and performance, we use S3-compatible file storage services to store image files and support file upload/knowledge base functionality. + +## Core Environment Variables + +### `S3_ACCESS_KEY_ID` + +- Type: Required +- Description: Access key ID for S3 storage service +- Default: - +- Example: `AKIAIOSFODNN7EXAMPLE` + +### `S3_SECRET_ACCESS_KEY` + +- Type: Required +- Description: Secret access key for S3 storage service +- Default: - +- Example: `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` + +### `S3_ENDPOINT` + +- Type: Required +- Description: Request endpoint for the bucket; for `virtual-host` mode, should not include the bucket name prefix +- Default: - +- Example: `https://cos.ap-chengdu.myqcloud.com` + +### `S3_BUCKET` + +- Type: Required +- Description: Name of the storage bucket +- Default: - +- Example: `my-bucket` + +### `S3_REGION` + +- Type: Optional +- Description: Region of the storage bucket +- Default: - +- Example: `ap-chengdu` + +### `S3_SET_ACL` + +- Type: Optional +- Description: Whether to set ACL to `public-read` when uploading files +- Default: `1` +- Example: `0` + +### `S3_PUBLIC_DOMAIN` + +- Type: Required +- Description: Public access domain for the bucket, used to access files in the bucket +- Default: - +- Example: `https://files.example.com` + +### `S3_ENABLE_PATH_STYLE` + +- Type: Optional +- Description: Whether to enable S3 `path-style` access mode +- Default: `0` +- Example: `1` + + + `path-style` and `virtual-host` are different methods of accessing buckets and objects in S3, with differences in URL structure and domain name resolution. + + Assuming the S3 service provider's domain is s3.example.net, the bucket is mybucket, and the object is config.env, the specific differences are: + + - path-style: `s3.example.net/mybucket/config.env` + - virtual-host: `mybucket.s3.example.net/config.env` + diff --git a/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.zh-CN.mdx new file mode 100644 index 0000000..cc73a04 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/environment-variables/s3.zh-CN.mdx @@ -0,0 +1,81 @@ +--- +title: 配置 S3 存储服务 +description: 了解如何配置 S3 存储服务以支持多模态 AI 会话和图片上传。 +tags: + - S3 存储 + - 多模态 AI + - 图片上传 + - 文件存储 +--- + +# 配置 S3 存储服务 + +LobeChat 支持多模态的 AI 会话,包括将图片、文件等非结构化数据上传给大模型的功能。为了优化存储和性能,我们使用 S3 兼容的文件存储服务来存储图片文件和支持文件上传/知识库功能。 + +## 核心环境变量 + +### `S3_ACCESS_KEY_ID` + +- 类型:必填 +- 描述:用于访问 S3 存储服务的访问密钥 ID +- 默认值:- +- 示例:`AKIAIOSFODNN7EXAMPLE` + +### `S3_SECRET_ACCESS_KEY` + +- 类型:必填 +- 描述:用于访问 S3 存储服务的秘密访问密钥 +- 默认值:- +- 示例:`wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` + +### `S3_ENDPOINT` + +- 类型:必填 +- 描述:存储桶的请求端点,对于 `virtual-host` 模式,不应包含前缀存储桶名称 +- 默认值:- +- 示例:`https://cos.ap-chengdu.myqcloud.com` + +### `S3_BUCKET` + +- 类型:必填 +- 描述:存储桶的名称 +- 默认值:- +- 示例:`my-bucket` + +### `S3_REGION` + +- 类型:可选 +- 描述:存储桶的区域 +- 默认值:- +- 示例:`ap-chengdu` + +### `S3_SET_ACL` + +- 类型:可选 +- 描述:是否在上传文件时设置 ACL 为 `public-read` +- 默认值:`1` +- 示例:`0` + +### `S3_PUBLIC_DOMAIN` + +- 类型:必填 +- 描述:存储桶对外的访问域名,用于访问存储桶中的文件 +- 默认值:- +- 示例:`https://files.example.com` + +### `S3_ENABLE_PATH_STYLE` + +- 类型:可选 +- 描述:是否启用 S3 的 `path-style` 访问模式 +- 默认值:`0` +- 示例:`1` + + + +`path-style` 和 `virtual-host` 在 S3 中是访问 bucket 和 object 的不同方式,URL 的结构和域名解析不太一样 + +假设 S3 服务商的域名是 s3.example.net ,bucket为mybucket,object为config.env,具体区别如下: +- path-style : `s3.example.net/mybucket/config.env` +- virtual-host : `mybucket.s3.example.net/config.env` + + diff --git a/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.mdx b/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.mdx new file mode 100644 index 0000000..30ce886 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.mdx @@ -0,0 +1,46 @@ +--- +title: Configuring Azure OpenAI for LobeChat +description: >- + Learn how to configure Azure OpenAI for LobeChat, including interface + configuration, and deployment settings. +tags: + - Azure OpenAI + - LobeChat + - Configuration + - Azure API + - Model Service Provider +--- + +# Integrating with Azure OpenAI + +LobeChat supports using [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/concepts/models) as the model service provider for OpenAI. This article will explain how to configure Azure OpenAI. + +## Configuring in the Interface + +Click in the bottom left corner "Actions" - "Settings", then switch to the "Language Model" tab and enable the "Azure OpenAI" switch to start using Azure OpenAI. + +Configuring in the Interface + +You can fill in the corresponding configuration items as needed: + +- **API Key**: The API key you applied for on the Azure OpenAI account page, which can be found in the "Keys and Endpoints" section. +- **API Address**: Azure API address, which can be found in the "Keys and Endpoints" section when checking resources in the Azure portal. +- **Azure API Version**: The API version of Azure, following the format YYYY-MM-DD. Refer to the [latest version](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions). +- ** Model List**: set your model list + +After completing the configuration of the above fields, click "Check". If it prompts "Check passed", it means the configuration was successful. + +## Configuration during Deployment + +If you want the deployed version to be pre-configured with Azure OpenAI for end users to use directly, you need to configure the following environment variables during deployment: + +| Environment Variable | Type | Description | Default Value | Example | +| --- | --- | --- | --- | --- | +| `AZURE_API_KEY` | Required | This is the API key you obtained from the Azure OpenAI account page | - | `c55168be3874490ef0565d9779ecd5a6` | +| `AZURE_ENDPOINT` | Required | Azure API address, can be found in the "Keys and Endpoints" section when checking resources in the Azure portal | - | `https://docs-test-001.openai.azure.com` | +| `AZURE_API_VERSION` | Required | Azure API version, following the format YYYY-MM-DD | 2023-08-01-preview | `-`, see [latest version](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions) | +| `AZURE_MODEL_LIST` | Required | Used to control the model list, use `+` to add a model, use `-` to hide a model, use `id->deplymentName=displayName` to customize the display name of a model, separated by commas. Definition syntax rules see [Model List](/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` or `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` | +| `ACCESS_CODE` | Optional | Add a password to access LobeChat. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | - | `awCT74` or `e3@09!` or `code1,code2,code3` | diff --git a/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.zh-CN.mdx new file mode 100644 index 0000000..31700ec --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/examples/azure-openai.zh-CN.mdx @@ -0,0 +1,48 @@ +--- +title: 在 LobeChat 中集成 Azure OpenAI +description: 了解如何在 LobeChat 中配置 Azure OpenAI。一步步指导从界面配置到部署时的环境变量设置。 +tags: + - Azure OpenAI + - 配置指南 + - 使用限制 + - 语言模型 + - Azure API + - API密钥 + - 环境变量 +--- + +# 与 Azure OpenAI 集成使用 + +LobeChat 支持使用 [Azure OpenAI](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/concepts/models) 作为 OpenAI 的模型服务商,本文将介绍如何配置 Azure OpenAI。 + +## 在界面中配置 + +点击左下角「操作」 -「设置」,切到 「语言模型」 Tab 后通过开启「Azure OpenAI」开关,即可开启使用 Azure OpenAI。 + +在界面中配置 + +你按需填写相应的配置项: + +- **APIKey**:你在 Azure OpenAI 账户页面申请的 API 密钥,可在 “密钥和终结点” 部分中找到此值 +- **API 地址**:Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 +- **Azure API Version**: Azure 的 API 版本,遵循 YYYY-MM-DD 格式,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) +- **模型列表**: 用来控制模型列表,你可以自行配置你的部署模型。 + +完成上述字段配置后,点击「检查」,如果提示「检查通过」,则说明配置成功。 + +
+ +## 在部署时配置 + +如果你希望部署的版本直接配置好 Azure OpenAI,让终端用户直接使用,那么你需要在部署时配置以下环境变量: + +| 环境变量 | 类型 | 描述 | 默认值 | 示例 | +| --- | --- | --- | --- | --- | +| `AZURE_API_KEY` | 必选 | 这是你在 Azure OpenAI 账户页面申请的 API 密钥 | - | `c55168be3874490ef0565d9779ecd5a6` | +| `AZURE_ENDPOINT` | 必选 | Azure API 地址,从 Azure 门户检查资源时,可在 “密钥和终结点” 部分中找到此值 | - | `https://docs-test-001.openai.azure.com` | +| `AZURE_API_VERSION` | 必选 | Azure 的 API 版本,遵循 YYYY-MM-DD 格式 | 2023-08-01-preview | `-`,查阅[最新版本](https://learn.microsoft.com/zh-cn/azure/ai-services/openai/reference#chat-completions) | +| `AZURE_MODEL_LIST` | 必选 | 用来控制模型列表,使用 `模型名->部署名=展示名` 来自定义模型的展示名,用英文逗号隔开。支持扩展能力,其余语法规则详见 [模型列表](/zh/docs/self-hosting/advanced/model-list) | - | `gpt-35-turbo->my-deploy=GPT 3.5 Turbo` 或 `gpt-4-turbo->my-gpt4=GPT 4 Turbo<128000:vision:fc>` | +| `ACCESS_CODE` | 可选 | 添加访问 LobeChat 的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | - | `awCT74` 或 `e3@09!` or `code1,code2,code3` | diff --git a/DigitalHumanWeb/docs/self-hosting/examples/ollama.mdx b/DigitalHumanWeb/docs/self-hosting/examples/ollama.mdx new file mode 100644 index 0000000..1ff7055 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/examples/ollama.mdx @@ -0,0 +1,104 @@ +--- +title: Integrating LobeChat with Ollama for Enhanced Language Models +description: >- + Learn how to configure and deploy LobeChat to leverage Ollama's powerful + language models locally. Follow the guide to run Ollama and LobeChat on your + system. +tags: + - Ollama integration + - LobeChat configuration + - Local deployment + - Language models + - Ollama usage +--- + +# Integrating with Ollama + +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 use the language models provided by Ollama to enhance your application within LobeChat. + +This document will guide you on how to configure and deploy LobeChat to use Ollama: + +## Running Ollama Locally + +First, you need to install Ollama. For detailed steps on installing and configuring Ollama, please refer to the [Ollama Website](https://ollama.com). + +## Running LobeChat Locally + +Assuming you have already started the Ollama service locally on port `11434`. Run the following Docker command to start LobeChat locally: + +```bash +docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 lobehub/lobe-chat +``` + +Now, you can use LobeChat to converse with the local LLM. + +For more information on using Ollama in LobeChat, please refer to [Ollama Usage](/docs/usage/providers/ollama). + +## Accessing Ollama from Non-Local Locations + +When you first initiate Ollama, it is configured to allow access only from the local machine. To enable access from other domains and set up port listening, you will need to adjust the environment variables `OLLAMA_ORIGINS` and `OLLAMA_HOST` accordingly. + +### 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 | | + +### Setting environment variables on Windows + +On Windows, Ollama inherits your user and system environment variables. + +1. First Quit Ollama by clicking on its tray icon and selecting Quit +2. Edit system environment variables from the control panel +3. Edit or create New variable(s) for your user account for `OLLAMA_HOST`, `OLLAMA_ORIGINS`, etc. +4. Click OK/Apply to save +5. Restart it + +### Setting environment variables on Mac + +If Ollama is run as a macOS application, environment variables should be set using `launchctl`: + +1. For each environment variable, call `launchctl setenv`. + + ```bash + launchctl setenv OLLAMA_HOST "0.0.0.0" + launchctl setenv OLLAMA_ORIGINS "*" + ``` + +2. Restart Ollama application. + +### Setting environment variables on Linux + +If Ollama is run as a systemd service, environment variables should be set using `systemctl`: + +1. Edit the systemd service by calling `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=*" + ``` + +3. Save and exit. +4. Reload `systemd` and restart Ollama: + + ```bash + sudo systemctl daemon-reload + sudo systemctl restart ollama + ``` + +### Setting environment variables on Docker + +If Ollama is run as a Docker container, you can add the environment variables to the `docker run` command. + +For further guidance on configuration, consult the [Ollama Official Documentation](https://github.com/ollama/ollama/blob/main/docs/faq.md#how-do-i-configure-ollama-server). diff --git a/DigitalHumanWeb/docs/self-hosting/examples/ollama.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/examples/ollama.zh-CN.mdx new file mode 100644 index 0000000..e7e82af --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/examples/ollama.zh-CN.mdx @@ -0,0 +1,102 @@ +--- +title: 在 LobeChat 中集成 Ollama +description: 学习如何在 LobeChat 中配置与部署 Ollama 语言模型框架,提升本地大模型使用体验。 +tags: + - Ollama + - LobeChat + - 语言模型 + - 集成 + - 配置 + - 部署 +--- + +# 与 Ollama 集成 + +Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 2, Mistral 等。现在,LobeChat 已经支持与 Ollama 的集成,这意味着你可以在 LobeChat 中轻松使用 Ollama 提供的语言模型来增强你的应用。 + +本文档将指导你如何配置与部署 LobeChat 来使用 Ollama: + +## 本地启动 Ollama + +首先,你需要安装 Ollama,安装与配置 Ollama 的详细步骤可以参考 [Ollama 官方站点](https://ollama.com)。 + +## 本地运行 LobeChat + +假设你已经在本地 `11434` 端口启动了 Ollama 服务。运行以下 Docker 命令行,在本地启动 LobeChat: + +```bash +docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434 lobehub/lobe-chat +``` + +接下来,你就可以使用 LobeChat 与本地 LLM 对话了。 + +关于在 LobeChat 中使用 Ollama 的更多信息,请查阅 [Ollama 使用](/zh/docs/usage/providers/ollama)。 + +## 非本地访问 Ollama + +由于 Ollama 默认参数在启动时设置了仅本地访问,所以跨域访问以及端口监听需要进行额外的环境变量设置 `OLLAMA_ORIGINS` 和 `OLLAMA_HOST`。 + +### 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 以启用额外的调试日志 | 默认关闭 | | + +### 在 Windows 上设置环境变量 + +在 Windows 上,Ollama 继承了您的用户和系统环境变量。 + +1. 首先通过 Windows 任务栏点击 Ollama 退出程序。 +2. 从控制面板编辑系统环境变量。 +3. 为您的用户账户编辑或新建 Ollama 的环境变量,比如`OLLAMA_HOST`、`OLLAMA_ORIGINS`等。 +4. 点击`OK/应用`保存。 +5. 重新运行`Ollama`。 + +### 在 Mac 上设置环境变量 + +如果 Ollama 作为 macOS 应用程序运行,你需要使用 `launchctl` 设置环境变量: + +1. 对于每个环境变量,调用 `launchctl setenv`。 + + ```bash + launchctl setenv OLLAMA_HOST "0.0.0.0" + launchctl setenv OLLAMA_ORIGINS "*" + ``` + +2. 重启 Ollama 应用程序。 + +### 在 Linux 上设置环境变量 + +如果 Ollama 作为 systemd 服务运行,应该使用`systemctl`设置环境变量: + +1. 通过调用`sudo systemctl edit ollama.service`编辑 systemd 服务。 + + ```bash + sudo systemctl edit ollama.service + ``` + +2. 对于每个环境变量,在`[Service]`部分下添加`Environment`: + + ```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 + ``` + +### 在 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/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.mdx b/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.mdx new file mode 100644 index 0000000..95bb275 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.mdx @@ -0,0 +1,30 @@ +--- +title: >- + Troubleshooting `OPENAI_PROXY_URL` in LobeChat Configuration for Empty + Response +description: >- + Learn how to troubleshoot and resolve the issue of receiving an empty response + after configuring the LobeChat `OPENAI_PROXY_URL` environment variable. +tags: + - OPENAI_PROXY_URL + - environment variable + - configuration troubleshooting +--- + +# Configuring `OPENAI_PROXY_URL` Environment Variable but Getting Empty Response + +### Problem Description + +After configuring the `OPENAI_PROXY_URL` environment variable, you may encounter a situation where the AI returns an empty message. This may be due to an incorrect configuration of `OPENAI_PROXY_URL`. + +### Solution + +Recheck and confirm whether `OPENAI_PROXY_URL` is set correctly, including whether the `/v1` suffix is added correctly (if required). + +### Related Discussion Links + +- [Why is the return value blank after configuring environment variables in Docker?](https://github.com/lobehub/lobe-chat/discussions/623) +- [Reasons for errors when using third-party interfaces](https://github.com/lobehub/lobe-chat/discussions/734) +- [No response when the proxy server address is filled in for chat](https://github.com/lobehub/lobe-chat/discussions/1065) + +If the problem still cannot be resolved, it is recommended to raise the issue in the community, providing relevant logs and configuration information for other developers or maintainers to offer assistance. diff --git a/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx new file mode 100644 index 0000000..2812c46 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/faq/no-v1-suffix.zh-CN.mdx @@ -0,0 +1,27 @@ +--- +title: 在 LobeChat 中配置 `OPENAI_PROXY_URL` 环境变量但返回值为空 +description: 重新检查并确认 LobeChat 环境变量 `OPENAI_PROXY_URL` 是否设置正确,包括是否正确地添加了 `/v1` 后缀(如果需要)。 +tags: + - OPENAI_PROXY_URL + - 环境变量配置 + - 返回值为空 + - 问题解决 +--- + +# 配置 `OPENAI_PROXY_URL` 环境变量但返回值为空 + +### 问题描述 + +配置 `OPENAI_PROXY_URL` 环境变量后,可能会遇到 AI 的返回消息为空的情况。这可能是由于 `OPENAI_PROXY_URL` 配置不正确导致。 + +### 解决方案 + +重新检查并确认 `OPENAI_PROXY_URL` 是否设置正确,包括是否正确地添加了 `/v1` 后缀(如果需要)。 + +### 相关讨论链接 + +- [Docker 安装,配置好环境变量后,为何返回值是空白?](https://github.com/lobehub/lobe-chat/discussions/623) +- [使用第三方接口报错的原因](https://github.com/lobehub/lobe-chat/discussions/734) +- [代理服务器地址填了聊天没任何反应](https://github.com/lobehub/lobe-chat/discussions/1065) + +如果问题依旧无法解决,建议在社区中提出问题,附上相关日志和配置信息,以便其他开发者或维护者提供帮助。 diff --git a/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx b/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx new file mode 100644 index 0000000..8253088 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.mdx @@ -0,0 +1,84 @@ +--- +title: Resolving `UNABLE_TO_VERIFY_LEAF_SIGNATURE` Error in LobeChat When Using Proxy +description: >- + Learn how to bypass Node.js certificate validation to resolve certificate + verification errors in LobeChat when using a proxy with self-signed or + untrusted certificates. +tags: + - Node.js + - certificate validation + - proxy server + - security + - Docker + - certificate issue +--- + +# Encounter `UNABLE_TO_VERIFY_LEAF_SIGNATURE` Error When Using Proxy + +## Problem Description + +When deploying privately and using a proxy (e.g., Surge) for network requests, you may encounter certificate verification errors. + +The error message may look like this: + +```bash +[TypeError: fetch failed] { + cause: [Error: unable to verify the first certificate] { + code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' + } +} +``` + +Or: + +```json +{ + "endpoint": "https://api.openai.com/v1", + "error": { + "cause": { + "code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE" + } + } +} +``` + +This problem typically occurs when using a proxy server with a self-signed certificate or a man-in-the-middle certificate that is not trusted by Node.js by default. + +## Solution + +To resolve this issue, you can bypass Node.js certificate validation by adding an environment variable when starting the application. Specifically, you can add `NODE_TLS_REJECT_UNAUTHORIZED=0` to the startup command. For example: + +```bash +NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start +``` + +Alternatively, when running in a Docker container, you can set the environment variable in the Dockerfile or docker-compose.yml: + +```dockerfile +# In the Dockerfile +ENV NODE_TLS_REJECT_UNAUTHORIZED=0 +``` + +```yaml +# In the docker-compose.yml +environment: + - NODE_TLS_REJECT_UNAUTHORIZED=0 +``` + +Example Docker run command: + +```bash +docker run -e NODE_TLS_REJECT_UNAUTHORIZED=0 +``` + +Please note that this method reduces security as it allows Node.js to accept unverified certificates. Therefore, it is only recommended for use in privately deployed environments with complete trust and should be reverted to the default certificate validation settings after resolving the certificate issue. + +## More Secure Alternatives + +If possible, it is recommended to address the certificate issue using the following methods: + +1. Ensure all man-in-the-middle certificates are correctly installed on the proxy server and the corresponding clients. +2. Replace self-signed or man-in-the-middle certificates with valid certificates issued by trusted certificate authorities. +3. Properly configure the certificate chain in the code to ensure Node.js can validate to the root certificate. + +Implementing these methods can resolve certificate validation issues without compromising security. diff --git a/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx new file mode 100644 index 0000000..90e648f --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/faq/proxy-with-unable-to-verify-leaf-signature.zh-CN.mdx @@ -0,0 +1,81 @@ +--- +title: 解决 LobeChat 使用代理时遇到证书验证错误的问题 +description: 在 LobeChat 私有化部署时,使用代理进行网络请求可能会遇到证书验证错误。了解如何通过跳过 Node.js 的证书验证来解决这一问题。 +tags: + - 证书验证错误 + - 代理服务器 + - Node.js + - 环境变量 + - Docker + - 安全性 +--- + +# 使用代理时遇到 `UNABLE_TO_VERIFY_LEAF_SIGNATURE` 错误 + +## 问题描述 + +在私有化部署时,使用代理(例如:Surge)进行网络请求可能会遇到证书验证错误。 + +此时错误信息可能如下: + +```bash +[TypeError: fetch failed] { + cause: [Error: unable to verify the first certificate] { + code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE' + } +} +``` + +或者是: + +```json +{ + "endpoint": "https://api.openai.com/v1", + "error": { + "cause": { + "code": "UNABLE_TO_VERIFY_LEAF_SIGNATURE" + } + } +} +``` + +这个问题通常出现在使用代理服务器时,代理服务器使用的自签名证书或中间人证书不被 Node.js 默认信任。 + +## 解决方案 + +要解决这个问题,可以在启动应用时添加环境变量,跳过 Node.js 的证书验证。具体做法是在启动命令中加入 `NODE_TLS_REJECT_UNAUTHORIZED=0`。例如: + +```bash +NODE_TLS_REJECT_UNAUTHORIZED=0 npm run start +``` + +或者在 Docker 容器中运行时,可以在 Dockerfile 或者 docker-compose.yml 中设置环境变量: + +```dockerfile +# 在 Dockerfile 中 +ENV NODE_TLS_REJECT_UNAUTHORIZED=0 +``` + +```yaml +# 在 docker-compose.yml 中 +environment: + - NODE_TLS_REJECT_UNAUTHORIZED=0 +``` + +Docker 运行命令示例: + +```bash +docker run -e NODE_TLS_REJECT_UNAUTHORIZED=0 <其他参数> <镜像名> +``` + +请注意,这种方法会降低安全性,因为它允许 Node.js 接受未经验证的证书。因此,仅建议在完全信任网络环境的私有化部署中使用,且需要在解决证书问题后恢复默认的证书验证设置。 + +## 更安全的替代方案 + +如果可能,建议通过以下方法解决证书问题: + +1. 确保所有的中间人证书都被正确地安装在代理服务器和相应的客户端上。 +2. 使用有效的、由受信任的证书颁发机构签发的证书替换自签名或中间人证书。 +3. 在代码中正确配置证书链,确保 Node.js 可以验证到根证书。 + +采用这些方法可以在不牺牲安全性的前提下解决证书验证问题。 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.mdx b/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.mdx new file mode 100644 index 0000000..66cc38c --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.mdx @@ -0,0 +1,143 @@ +--- +title: Deploy LobeChat with Docker Compose +description: >- + Learn how to deploy the LobeChat service using Docker Compose. Follow + step-by-step instructions to install Docker, run the deployment command, and + set up automatic updates. +tags: + - Docker Compose + - LobeChat Service + - Docker Deployment + - Automatic Updates + - Crontab Script +--- + +# Docker Compose Deployment Guide + +
+ +[![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ +We provide a [Docker image][docker-release-link] for deploying the LobeChat service on your private device. + + + +### Install Docker Container Environment + +(Skip this step if already installed) + + + + + +```fish +$ apt install docker.io +``` + + + + + +```fish +$ yum install docker +``` + + + + + +### Run Docker Compose Deployment Command + +When using `docker-compose`, the configuration file is as follows: + +```yml +version: '3.8' + +services: + lobe-chat: + image: lobehub/lobe-chat + container_name: lobe-chat + restart: always + ports: + - '3210:3210' + environment: + OPENAI_API_KEY: sk-xxxx + OPENAI_PROXY_URL: https://api-proxy.com/v1 + ACCESS_CODE: lobe66 +``` + +Run the following command to start the Lobe Chat service: + +```bash +$ docker-compose up -d +``` + +### Crontab Automatic Update Script (Optional) + +Similarly, you can use the following script to automatically update Lobe Chat. When using `Docker Compose`, no additional configuration of environment variables is required. + +```bash +#!/bin/bash +# auto-update-lobe-chat.sh + +# Set proxy (optional) +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 + +# Pull the latest image and store the output in a variable +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# Check if the pull command was executed successfully +if [ $? -ne 0 ]; then + exit 1 +fi + +# Check if the output contains a specific string +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 +fi + +echo "Detected Lobe-Chat update" + +# Remove the old container +echo "Removed: $(docker rm -f Lobe-Chat)" + +# You may need to navigate to the directory where `docker-compose.yml` is located first +# cd /path/to/docker-compose-folder + +# Run the new container +echo "Started: $(docker-compose up)" + +# Print the update time and version +echo "Update time: $(date)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# Clean up unused images +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + +This script can also be used in Crontab, but ensure that your Crontab can find the correct Docker command. It is recommended to use absolute paths. + +Configure Crontab to execute the script every 5 minutes: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.zh-CN.mdx new file mode 100644 index 0000000..ac28171 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/docker-compose.zh-CN.mdx @@ -0,0 +1,133 @@ +--- +title: 通过 Docker Compose 部署 LobeChat +description: 学习如何使用 Docker Compose 部署 LobeChat 服务,包括安装 Docker 容器环境和自动更新脚本设置。 +tags: + - Docker Compose + - LobeChat + - Docker 容器 + - 自动更新脚本 + - 部署指引 +--- + +# Docker Compose 部署指引 + +
+ +[![](https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square)](https://hub.docker.com/r/lobehub/lobe-chat) + +[![](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square)](https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square) + +[![](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square)](https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square) + +
+ +我们提供了 [Docker 镜像](https://hub.docker.com/r/lobehub/lobe-chat) ,供你在自己的私有设备上部署 LobeChat 服务。 + + + +### 安装 Docker 容器环境 + +(如果已安装,请跳过此步) + + + + + +```fish +$ apt install docker.io +``` + + + + + +```fish +$ yum install docker +``` + + + + + +### 运行 Docker Compose 部署指令 + +使用 `docker-compose` 时配置文件如下: + +```yml +version: '3.8' + +services: + lobe-chat: + image: lobehub/lobe-chat + container_name: lobe-chat + restart: always + ports: + - '3210:3210' + environment: + OPENAI_API_KEY: sk-xxxx + OPENAI_PROXY_URL: https://api-proxy.com/v1 + ACCESS_CODE: lobe66 +``` + +运行以下命令启动 Lobe Chat 服务: + +```bash +$ docker-compose up -d +``` + +### Crontab 自动更新脚本(可选) + +类似地,你可以使用以下脚本来自动更新 Lobe Chat,使用 `Docker Compose` 时,环境变量无需额外配置。 + +```bash +#!/bin/bash +# auto-update-lobe-chat.sh + +# Set proxy (optional) +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 + +# Pull the latest image and store the output in a variable +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# Check if the pull command was executed successfully +if [ $? -ne 0 ]; then + exit 1 +fi + +# Check if the output contains a specific string +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 +fi + +echo "Detected Lobe-Chat update" + +# Remove the old container +echo "Removed: $(docker rm -f Lobe-Chat)" + +# You may need to navigate to the directory where `docker-compose.yml` is located first +# cd /path/to/docker-compose-folder + +# Run the new container +echo "Started: $(docker-compose up)" + +# Print the update time and version +echo "Update time: $(date)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# Clean up unused images +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + +This script can also be used in Crontab, but ensure that your Crontab can find the correct Docker command. It is recommended to use absolute paths. + +Configure Crontab to execute the script every 5 minutes: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + diff --git a/DigitalHumanWeb/docs/self-hosting/platform/docker.mdx b/DigitalHumanWeb/docs/self-hosting/platform/docker.mdx new file mode 100644 index 0000000..3b8fc8f --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/docker.mdx @@ -0,0 +1,169 @@ +--- +title: Deploy LobeChat with Docker +description: >- + Learn how to deploy the LobeChat service using Docker, including installation + steps, command deployment, proxy configuration, and automatic update scripts. +tags: + - Docker Deployment + - LobeChat Service + - Docker Command + - Proxy Configuration + - Automatic Update Script +--- + +# Docker Deployment Guide + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ +We provide a [Docker image][docker-release-link] for you to deploy the LobeChat service on your private device. + + + ### Install Docker Container Environment + +(If already installed, skip this step) + + + + ```fish + $ apt install docker.io + ``` + + + + + ```fish + $ yum install docker + ``` + + + + + +### Docker Command Deployment + +Use the following command to start the LobeChat service with one click: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +Command explanation: + +- The default port mapping is `3210`, please ensure it is not occupied or manually change the port mapping. + +- Replace `sk-xxxx` in the above command with your OpenAI API Key. + +- For the complete list of environment variables supported by LobeChat, please refer to the [Environment Variables](/docs/self-hosting/environment-variables) section. + + + Since the official Docker image build takes about half an hour, if you see the "update available" + prompt after deployment, you can wait for the image to finish building before deploying again. + + + + The official Docker image does not have a password set. It is strongly recommended to add a + password to enhance security, otherwise you may encounter situations like [My API Key was + stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123). + + + + Note that when the **deployment architecture is inconsistent with the image**, you need to + cross-compile **Sharp**, see [Sharp + Cross-Compilation](https://sharp.pixelplumbing.com/install#cross-platform) for details. + + +#### Using a Proxy Address + +If you need to use the OpenAI service through a proxy, you can configure the proxy address using the `OPENAI_PROXY_URL` environment variable: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +### Crontab Automatic Update Script (Optional) + +If you want to automatically obtain the latest image, you can follow these steps. + +First, create a `lobe.env` configuration file with various environment variables, for example: + +```env +OPENAI_API_KEY=sk-xxxx +OPENAI_PROXY_URL=https://api-proxy.com/v1 +ACCESS_CODE=arthals2333 +OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision +``` + +Then, you can use the following script to automate the update: + +```bash +#!/bin/bash +# auto-update-lobe-chat.sh + +# Set up proxy (optional) +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 + +# Pull the latest image and store the output in a variable +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# Check if the pull command was executed successfully +if [ $? -ne 0 ]; then + exit 1 +fi + +# Check if the output contains a specific string +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 +fi + +echo "Detected Lobe-Chat update" + +# Remove the old container +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)" + +# Print the update time and version +echo "Update time: $(date)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# Clean up unused images +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + +This script can be used in Crontab, but please ensure that your Crontab can find the correct Docker command. It is recommended to use absolute paths. + +Configure Crontab to execute the script every 5 minutes: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/docker.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/docker.zh-CN.mdx new file mode 100644 index 0000000..4c6e3f0 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/docker.zh-CN.mdx @@ -0,0 +1,227 @@ +--- +title: 通过 Docker 部署 LobeChat +description: 学习如何使用 Docker 部署 LobeChat 服务,包括安装 Docker 容器环境和使用指令一键启动服务。详细说明如何配置环境变量和使用代理地址。 +tags: + - Docker + - LobeChat + - 部署指引 + - 环境变量 + - 代理地址 + - 自动更新脚本 +--- + +# Docker 部署指引 + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ +我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。 + +## 部署指南 + + + ### 安装 Docker 容器环境 + +(如果已安装,请跳过此步) + + + + ```fish + $ apt install docker.io + ``` + + + + + ```fish + $ yum install docker + ``` + + + + + +### Docker 指令部署 + +使用以下命令即可使用一键启动 LobeChat 服务: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +指令说明: + +- 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射 +- 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx` ,获取 API Key 的方式详见最后一节。 + + + LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables) 部分 + + + + 由于官方的 Docker + 镜像构建大约需要半小时左右,如果在更新部署后会出现「存在更新」的提示,可以等待镜像构建完成后再次部署。 + + + + 官方 Docker 镜像中未设定密码,强烈建议添加密码以提升安全性,否则你可能会遇到 [My API Key was + stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123) 这样的情况 + + + + 注意,当**部署架构与镜像的不一致时**,需要对 **Sharp** 进行交叉编译,详见 [Sharp + 交叉编译](https://sharp.pixelplumbing.com/install#cross-platform) + + +#### 使用代理地址 + +如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址: + +```fish +$ docker run -d -p 3210:3210 \ + -e OPENAI_API_KEY=sk-xxxx \ + -e OPENAI_PROXY_URL=https://api-proxy.com/v1 \ + -e ACCESS_CODE=lobe66 \ + --name lobe-chat \ + lobehub/lobe-chat +``` + +### Crontab 自动更新脚本(可选) + +如果你想自动获得最新的镜像,你可以如下操作。 + +首先,新建一个 `lobe.env` 配置文件,内容为各种环境变量,例如: + +```env +OPENAI_API_KEY=sk-xxxx +OPENAI_PROXY_URL=https://api-proxy.com/v1 +ACCESS_CODE=arthals2333 +OPENAI_MODEL_LIST=-gpt-4,-gpt-4-32k,-gpt-3.5-turbo-16k,gpt-3.5-turbo-1106=gpt-3.5-turbo-16k,gpt-4-0125-preview=gpt-4-turbo,gpt-4-vision-preview=gpt-4-vision +``` + +然后,你可以使用以下脚本来自动更新: + +```bash +#!/bin/bash +# 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 + +# 拉取最新的镜像并将输出存储在变量中 +output=$(docker pull lobehub/lobe-chat:latest 2>&1) + +# 检查拉取命令是否成功执行 +if [ $? -ne 0 ]; then + exit 1 +fi + +# 检查输出中是否包含特定的字符串 +echo "$output" | grep -q "Image is up to date for lobehub/lobe-chat:latest" + +# 如果镜像已经是最新的,则不执行任何操作 +if [ $? -eq 0 ]; then + exit 0 +fi + +echo "Detected Lobe-Chat update" + +# 删除旧的容器 +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)" + +# 打印更新的时间和版本 +echo "Update time: $(date)" +echo "Version: $(docker inspect lobehub/lobe-chat:latest | grep 'org.opencontainers.image.version' | awk -F'"' '{print $4}')" + +# 清理不再使用的镜像 +docker images | grep 'lobehub/lobe-chat' | grep -v 'lobehub/lobe-chat-database' | grep -v 'latest' | awk '{print $3}' | xargs -r docker rmi > /dev/null 2>&1 +echo "Removed old images." +``` + +此脚本可以在 Crontab 中使用,但请确认你的 Crontab 可以找到正确的 Docker 命令。建议使用绝对路径。 + +配置 Crontab,每 5 分钟执行一次脚本: + +```bash +*/5 * * * * /path/to/auto-update-lobe-chat.sh >> /path/to/auto-update-lobe-chat.log 2>&1 +``` + + + +## 获取 OpenAI API Key + +API Key 是使用 LobeChat 进行大语言模型会话的必要信息,本节以 OpenAI 模型服务商为例,简要介绍获取 API Key 的方式。 + +### `A` 通过 OpenAI 官方渠道 + +- 注册一个 [OpenAI 账户](https://platform.openai.com/signup),你需要使用国际手机号、非大陆邮箱进行注册; +- 注册完毕后,前往 [API Keys](https://platform.openai.com/api-keys) 页面,点击 `Create new secret key` 创建新的 API Key: + + + +#### 步骤 1:打开创建窗口 + +{'打开创建窗口'} + +#### 步骤 2:创建 API Key + +{'创建 + +#### 步骤 3:获取 API Key + +{'获取 + + + +将此 API Key 填写到 LobeChat 的 API Key 配置中,即可开始使用。 + + + 账户注册后,一般有 5 美元的免费额度,但有效期只有三个月。如果你希望长期使用你的 API + Key,你需要完成支付的信用卡绑定。由于 OpenAI + 只支持外币信用卡,因此你需要找到合适的支付渠道,此处不再详细展开。 + + +### `B` 通过 OpenAI 第三方代理商 + +如果你发现注册 OpenAI 账户或者绑定外币信用卡比较麻烦,可以考虑借助一些知名的 OpenAI 第三方代理商来获取 API Key,这可以有效降低获取 OpenAI API Key 的门槛。但与此同时,一旦使用三方服务,你可能也需要承担潜在的风险,请根据你自己的实际情况自行决策。以下是常见的第三方模型代理商列表,供你参考: + +| Logo | 服务商 | 特性说明 | Proxy 代理地址 | 链接 | +| --- | --- | --- | --- | --- | +| | **AiHubMix** | 使用 OpenAI 企业接口,全站模型价格为官方 **86 折**(含 GPT-4 、Cluade 3.5 等) | `https://aihubmix.com/v1` | [获取](https://lobe.li/CnsM6fH) | + + + **免责申明**: 在此推荐的 OpenAI API Key 由第三方代理商提供,所以我们不对 API Key 的 **有效性** 和 + **安全性** 负责,请你自行承担购买和使用 API Key 的风险。 + + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat +[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 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/netlify.mdx b/DigitalHumanWeb/docs/self-hosting/platform/netlify.mdx new file mode 100644 index 0000000..f20084b --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/netlify.mdx @@ -0,0 +1,154 @@ +--- +title: Deploy LobeChat with Netlify - Step-by-Step Guide +description: >- + Learn how to deploy LobeChat on Netlify with detailed instructions on forking + the repository, preparing your OpenAI API Key, importing to Netlify workspace, + configuring site name and environment variables, and monitoring deployment + progress. +tags: + - Deploy LobeChat + - Netlify Deployment + - OpenAI API Key + - Environment Variables + - Custom Domain Setup +--- + +# Deploy LobeChat with Netlify + +If you want to deploy LobeChat on Netlify, you can follow these steps: + +## Deploy LobeChat with Netlify + + + ### Fork the LobeChat Repository + +Click the Fork button to fork the LobeChat repository to your GitHub account. + +### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to obtain your OpenAI API Key. + +### Import to Netlify Workspace + + + After testing, it is currently not supported to have a one-click deployment button similar to + Vercel/Zeabur. The reason is unknown. Therefore, manual import is required. + + +Click "Import from git" + +{'Click + +Then click "Deploy with Github" and authorize Netlify to access your GitHub account. + +{'Authorize + +Next, select the LobeChat project: + +{'Select + +### Configure Site Name and Environment Variables + +In this step, you need to configure your site, including the site name, build command, and publish directory. Fill in your site name in the "Site Name" field. If there are no special requirements, you do not need to modify the remaining configurations as we have already set the default configurations. + +{'Configure + +Click the "Add environment variables" button to add site environment variables: + +{'Add + +Taking OpenAI as an example, the environment variables you need to add are as follows: + +| Environment Variable | Type | Description | Example | +| --- | --- | --- | --- | +| `OPENAI_API_KEY` | Required | This is the API key you applied for on the OpenAI account page | `sk-xxxxxx...xxxxxx` | +| `ACCESS_CODE` | Required | Add a password to access this service. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | `awCT74` or `e3@09!` or `code1,code2,code3` | +| `OPENAI_PROXY_URL` | Optional | If you manually configure the OpenAI interface proxy, you can use this configuration to override the default OpenAI API request base URL | `https://aihubmix.com/v1`, default value: `https://api.openai.com/v1` | + + + For a complete list of environment variables supported by LobeChat, please refer to the [📘 + Environment Variables](/docs/self-hosting/environment-variables) + + +Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase + +{'Environment + +### Wait for Deployment to Complete + +After clicking deploy, you will enter the site details page, where you can click the "Deploying your site" in blue or the "Building" in yellow to view the deployment progress. + +{'Netlify + +Upon entering the deployment details, you will see the following interface, indicating that your LobeChat is currently being deployed. Simply wait for the deployment to complete. + +{'LobeChat + +During the deployment and build process: + +{'Deployment + +### Deployment Successful, Start Using + +If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed. + +{'Deployment + +At this point, you can click on "Open production deploy" to access your LobeChat site. + + {'Access + + +## Set up Custom Domain (Optional) + +You can use the subdomain provided by Netlify, or choose to bind a custom domain. Currently, the domain provided by Netlify has not been contaminated, and can be accessed directly in most regions. diff --git a/DigitalHumanWeb/docs/self-hosting/platform/netlify.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/netlify.zh-CN.mdx new file mode 100644 index 0000000..60db352 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/netlify.zh-CN.mdx @@ -0,0 +1,148 @@ +--- +title: 在 Netlify 上部署 LobeChat +description: >- + 学习如何在 Netlify 上部署 LobeChat,包括 Fork 仓库、准备 OpenAI API Key、导入到 Netlify + 工作台、配置站点名称与环境变量等步骤。 +tags: + - Netlify + - LobeChat + - 部署教程 + - OpenAI API Key + - 环境配置 +--- + +# 使用 Netlify 部署 + +如果想在 Netlify 上部署 LobeChat,可以按照以下步骤进行操作: + +## Netlify 部署 LobeChat + + + ### Fork LobeChat 仓库 + +点击 Fork 按钮,将 LobeChat 仓库 Fork 到你的 GitHub 账号下。 + +### 准备好你的 OpenAI API Key + +前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 在 Netlify 工作台导入 + +经过测试,暂不支持类似 Vercel/Zeabur 的一键部署按钮,原因未知。因此需要手动导入 + +点击 「Import from git」 + +{'在 + +然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号 + +{'授权 + +然后选择 LobeChat 项目: + +{'选择 + +### 配置站点名称与环境变量 + +在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。 + +{'配置 + +点击 「Add environment variables」按钮,添加站点环境变量: + +{'添加 + +以配置 OpenAI 为例,你需要添加的环境变量如下: + +| 环境变量 | 类型 | 描述 | 示例 | +| --- | --- | --- | --- | +| `OPENAI_API_KEY` | 必选 | 这是你在 OpenAI 账户页面申请的 API 密钥 | `sk-xxxxxx...xxxxxx` | +| `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCT74` 或 `e3@09!` or `code1,code2,code3` | +| `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` | + + + LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/docs/self-hosting/environment-variables) 部分 + + +添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。 + +{'环境变量添加完成'} + +### 等待部署完成 + +点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。 + +{'Netlify + +进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。 + +{'LobeChat + +部署构建过程中: + +{'部署构建中'} + +### 部署成功,开始使用 + +如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。 + +{'部署成功'} + +此时,你可以点击「Open production deploy」,即可访问你的 LobeChat 站点 + + {'访问你的 + + +## 绑定自定义域名(可选) + +你可以使用 Netlify 提供的子域名,也可以选择绑定自定义域名。目前 Netlify 提供的域名还未被污染,大多数地区都可以直连。 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/railway.mdx b/DigitalHumanWeb/docs/self-hosting/platform/railway.mdx new file mode 100644 index 0000000..f312329 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/railway.mdx @@ -0,0 +1,35 @@ +--- +title: Deploy LobeChat with Railway +description: >- + Learn how to deploy LobeChat on Railway and follow the step-by-step process. + Get your OpenAI API Key, deploy with a click, and start using it. Optionally, + bind a custom domain for your deployment. +tags: + - Deploy LobeChat + - Railway Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploy LobeChat with Railway + +If you want to deploy LobeChat on Railway, you can follow the steps below: + +## Railway Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### Click the button below to deploy + +[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT) + +### Once deployed, you can start using it + +### Bind a custom domain (optional) + +You can use the subdomain provided by Railway, or choose to bind a custom domain. Currently, the domains provided by Railway have not been contaminated, and most regions can connect directly. + + diff --git a/DigitalHumanWeb/docs/self-hosting/platform/railway.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/railway.zh-CN.mdx new file mode 100644 index 0000000..57fb29a --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/railway.zh-CN.mdx @@ -0,0 +1,34 @@ +--- +title: 在 Railway 上部署 LobeChat +description: 学习如何在 Railway 上部署 LobeChat 应用,包括准备 OpenAI API Key、点击按钮进行部署、绑定自定义域名等步骤。 +tags: + - Railway + - 部署 + - LobeChat + - OpenAI + - API Key + - 自定义域名 +--- + +# 使用 Railway 部署 + +如果想在 Railway 上部署 LobeChat,可以按照以下步骤进行操作: + +## Railway 部署流程 + + + ### 准备好你的 OpenAI API Key + +前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 点击下方按钮进行部署 + +[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/FB6HrV?referralCode=9bD9mT) + +### 部署完毕后,即可开始使用 + +### 绑定自定义域名(可选) + +你可以使用 Railway 提供的子域名,也可以选择绑定自定义域名。目前 Railway 提供的域名还未被污染,大多数地区都可以直连。 + + diff --git a/DigitalHumanWeb/docs/self-hosting/platform/repocloud.mdx b/DigitalHumanWeb/docs/self-hosting/platform/repocloud.mdx new file mode 100644 index 0000000..2b07870 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/repocloud.mdx @@ -0,0 +1,38 @@ +--- +title: Deploy LobeChat on RepoCloud +description: >- + Learn how to deploy LobeChat on RepoCloud with ease. Follow these steps to + prepare your OpenAI API Key, deploy the application, and start using it. + Optional: Bind a custom domain for a personalized touch. +tags: + - Deploy LobeChat + - RepoCloud Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploy LobeChat with RepoCloud + +If you want to deploy LobeChat on RepoCloud, you can follow the steps below: + +## RepoCloud Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### One-click to deploy + +[![][deploy-button-image]][deploy-link] + +### Once deployed, you can start using it + +### Bind a custom domain (optional) + +You can use the subdomain provided by RepoCloud, or choose to bind a custom domain. Currently, the domains provided by RepoCloud have not been contaminated, and most regions can connect directly. + + + +[deploy-button-image]: https://d16t0pc4846x52.cloudfront.net/deploy.svg +[deploy-link]: https://repocloud.io/details/?app_id=248 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/repocloud.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/repocloud.zh-CN.mdx new file mode 100644 index 0000000..0bdaabc --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/repocloud.zh-CN.mdx @@ -0,0 +1,36 @@ +--- +title: 在 RepoCloud 上部署 LobeChat +description: 学习如何在RepoCloud上部署LobeChat应用,包括准备OpenAI API Key、点击部署按钮、绑定自定义域名等操作。 +tags: + - RepoCloud + - LobeChat + - 部署流程 + - OpenAI API Key + - 自定义域名 +--- + +# 使用 RepoCloud 部署 + +如果想在 RepoCloud 上部署 LobeChat,可以按照以下步骤进行操作: + +## RepoCloud 部署流程 + + + ### 准备好你的 OpenAI API Key + +前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 点击下方按钮进行部署 + +[![][deploy-button-image]][deploy-link] + +### 部署完毕后,即可开始使用 + +### 绑定自定义域名(可选) + +你可以使用 RepoCloud 提供的子域名,也可以选择绑定自定义域名。目前 RepoCloud 提供的域名还未被污染,大多数地区都可以直连。 + + + +[deploy-button-image]: https://d16t0pc4846x52.cloudfront.net/deploy.svg +[deploy-link]: https://repocloud.io/details/?app_id=248 diff --git a/DigitalHumanWeb/docs/self-hosting/platform/sealos.mdx b/DigitalHumanWeb/docs/self-hosting/platform/sealos.mdx new file mode 100644 index 0000000..440510e --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/sealos.mdx @@ -0,0 +1,37 @@ +--- +title: Deploy LobeChat on SealOS +description: >- + Learn how to deploy LobeChat on SealOS with ease. Follow the provided steps to + set up LobeChat and start using it efficiently. +tags: + - Deploy LobeChat + - SealOS Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploy LobeChat with SealOS + +If you want to deploy LobeChat on SealOS, you can follow the steps below: + +## SealOS Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### Click the button below to deploy + +[![][deploy-button-image]][deploy-link] + +### After deployment, you can start using it + +### Bind a custom domain (optional) + +You can use the subdomain provided by SealOS, or choose to bind a custom domain. Currently, the domains provided by SealOS have not been contaminated, and can be directly accessed in most regions. + + + +[deploy-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg +[deploy-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat diff --git a/DigitalHumanWeb/docs/self-hosting/platform/sealos.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/sealos.zh-CN.mdx new file mode 100644 index 0000000..b0bf457 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/sealos.zh-CN.mdx @@ -0,0 +1,36 @@ +--- +title: 在 SealOS 上部署 LobeChat +description: 学习如何在 SealOS 上部署 LobeChat,包括准备 OpenAI API Key、点击部署按钮、绑定自定义域名等操作。 +tags: + - SealOS + - LobeChat + - OpenAI API Key + - 部署流程 + - 自定义域名 +--- + +# 使用 SealOS 部署 + +如果想在 SealOS 上部署 LobeChat,可以按照以下步骤进行操作: + +## SealOS 部署流程 + + + ### 准备好你的 OpenAI API Key + +前往 [OpenAI](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 点击下方按钮进行部署 + +[![][deploy-button-image]][deploy-link] + +### 部署完毕后,即可开始使用 + +### 绑定自定义域名(可选) + +你可以使用 SealOS 提供的子域名,也可以选择绑定自定义域名。目前 SealOS 提供的域名还未被污染,大多数地区都可以直连。 + + + +[deploy-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg +[deploy-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat diff --git a/DigitalHumanWeb/docs/self-hosting/platform/vercel.mdx b/DigitalHumanWeb/docs/self-hosting/platform/vercel.mdx new file mode 100644 index 0000000..a521cf7 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/vercel.mdx @@ -0,0 +1,46 @@ +--- +title: Deploy LobeChat with Vercel +description: >- + Learn how to deploy LobeChat on Vercel with ease. Follow the provided steps to + prepare your OpenAI API Key, deploy the project, and start using it + efficiently. +tags: + - Deploy LobeChat + - Vercel Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploy LobeChat with Vercel + +If you want to deploy LobeChat on Vercel, you can follow the steps below: + +## Vercel Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### Click the button below to deploy + +[![](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat) + +Simply log in with your GitHub account, and remember to fill in `OPENAI_API_KEY` (required) and `ACCESS_CODE` (recommended) in the environment variables page. + +### After deployment, you can start using it + +### Bind a custom domain (optional) + +Vercel's assigned domain DNS may be polluted in some regions, so binding a custom domain can establish a direct connection. + + + +## Automatic Synchronization of Updates + +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. + diff --git a/DigitalHumanWeb/docs/self-hosting/platform/vercel.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/vercel.zh-CN.mdx new file mode 100644 index 0000000..60fc6d0 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/vercel.zh-CN.mdx @@ -0,0 +1,48 @@ +--- +title: 在 Vercel 上部署 LobeChat +description: 学习如何在 Vercel 上一键部署 LobeChat,准备 OpenAI API Key,点击按钮进行部署,绑定自定义域名,自动同步更新等。 +tags: + - Vercel + - 部署指引 + - LobeChat + - OpenAI API Key + - 自定义域名 + - 自动同步更新 +--- + +# Vercel 部署指引 + +如果想在 Vercel 上部署 LobeChat,可以按照以下步骤进行操作: + +## Vercel 部署流程 + + + ### 准备好你的 OpenAI API Key + +前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 点击下方按钮进行部署 + +[![][deploy-button-image]][deploy-link] + +直接使用 GitHub 账号登录即可,记得在环境变量页填入 `OPENAI_API_KEY` (必填) and `ACCESS_CODE`(推荐); + +### 部署完毕后,即可开始使用 + +### 绑定自定义域名(可选) + +Vercel 分配的域名 DNS 在某些区域被污染了,绑定自定义域名即可直连。 + + + +## 自动同步更新 + +如果你根据上述中的一键部署步骤部署了自己的项目,你可能会发现总是被提示 “有可用更新”。这是因为 Vercel 默认为你创建新项目而非 fork 本项目,这将导致无法准确检测更新。 + + + 我们建议按照 [📘 LobeChat 自部署保持更新](/zh/docs/self-hosting/advanced/upstream-sync) + 步骤重新部署。 + + +[deploy-button-image]: https://vercel.com/button +[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat diff --git a/DigitalHumanWeb/docs/self-hosting/platform/zeabur.mdx b/DigitalHumanWeb/docs/self-hosting/platform/zeabur.mdx new file mode 100644 index 0000000..d6a4705 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/zeabur.mdx @@ -0,0 +1,84 @@ +--- +title: Deploy LobeChat on Zeabur +description: >- + Learn how to deploy LobeChat on Zeabur with ease. Follow the provided steps to + set up your chat application seamlessly. +tags: + - Deploy LobeChat + - Zeabur Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploy LobeChat with Zeabur + +If you want to deploy LobeChat on Zeabur, you can follow the steps below: + +## Zeabur Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### Click the button below to deploy + +[![][deploy-button-image]][deploy-link] + +### Once deployed, you can start using it + +### Bind a custom domain (optional) + +You can use the 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. + + + +[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/DigitalHumanWeb/docs/self-hosting/platform/zeabur.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/platform/zeabur.zh-CN.mdx new file mode 100644 index 0000000..00ee9aa --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/platform/zeabur.zh-CN.mdx @@ -0,0 +1,83 @@ +--- +title: 在 Zeabur 上部署 LobeChat +description: 按照指南准备 OpenAI API Key 并点击按钮进行部署。在部署完成后,即可开始使用 LobeChat 并选择是否绑定自定义域名。 +tags: + - Zeabur + - LobeChat + - OpenAI API Key + - 部署流程 + - 自定义域名 +--- + +# 使用 Zeabur 部署 + +如果想在 Zeabur 上部署 LobeChat,可以按照以下步骤进行操作: + +## Zeabur 部署流程 + + + ### 准备好你的 OpenAI API Key + +前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key + +### 点击下方按钮进行部署 + +[![][deploy-button-image]][deploy-link] + +### 部署完毕后,即可开始使用 + +### 绑定自定义域名(可选) + +你可以使用 Zeabur 提供的子域名,也可以选择绑定自定义域名。目前 Zeabur 提供的域名还未被污染,大多数地区都可以直连。 + + + +[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/DigitalHumanWeb/docs/self-hosting/server-database.mdx b/DigitalHumanWeb/docs/self-hosting/server-database.mdx new file mode 100644 index 0000000..0e7d476 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database.mdx @@ -0,0 +1,140 @@ +--- +title: Deploying Server-Side Database for LobeChat +description: Learn how to deploy LobeChat's server-side database using Postgres. +tags: + - LobeChat + - Server-Side Database + - Postgres + - Deployment Guide +--- +# Deploying Server-Side Database + +LobeChat defaults to using a client-side database (IndexedDB) but also supports deploying 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 guide will introduce the process and principles of deploying the server-side database version of LobeChat on any platform from a framework perspective, so you can understand both the what and the why, and then deploy according to your specific needs. + +If you are already familiar with the complete principles, you can quickly get started by checking the deployment guides for each platform: + + + +--- + +For the server-side database version of LobeChat, a normal deployment process typically involves configuring three modules: + +1. Database configuration; +2. Authentication service configuration; +3. S3 storage service configuration. + +## Configure the Database + +Before deployment, make sure you have a Postgres database instance ready. You can choose from the following instances: + +- `A.` Use Serverless Postgres instances like Vercel/Neon; +- `B.` Use self-deployed Postgres instances like Docker/Railway/Zeabur, collectively referred to as Node Postgres instances; + +There is a slight difference in the way they are configured in terms of environment variables. + +Since we support file-based conversations/knowledge base conversations, we need to install the `pgvector` plugin for Postgres. This plugin provides vector search capabilities and is a key component for LobeChat to implement RAG. + + +### `NEXT_PUBLIC_SERVICE_MODE` + +LobeChat supports both client-side and server-side databases, so we provide an environment variable for switching modes, which is `NEXT_PUBLIC_SERVICE_MODE`, with a default value of `client`. + +For server-side database deployment scenarios, you need to set `NEXT_PUBLIC_SERVICE_MODE` to `server`. + + +In the official `lobe-chat-database` Docker image, this environment variable is already set to `server` by default. Therefore, if you deploy using the Docker image, you do not need to configure this environment variable again. + + + +Since environment variables starting with `NEXT_PUBLIC` take effect in the front-end code, they cannot be modified through container runtime injection. (Refer to the `next.js` documentation [Configuring: Environment Variables | Next.js (nextjs.org)](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables)). This is why we chose to create a separate DB version image. + +If you need to modify variables with the `NEXT_PUBLIC` prefix in a Docker deployment, you must build the image yourself and inject your own `NEXT_PUBLIC` prefixed environment variables during the build. + + +### `DATABASE_URL` + +The core of configuring the database is to add the `DATABASE_URL` environment variable and fill in the Postgres database connection URL you have prepared. The typical format of the database connection URL is `postgres://username:password@host:port/database`. + + +If you want to enable SSL when connecting to the database, please refer to the [documentation](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode) for setup instructions. + + +### `DATABASE_DRIVER` + +The `DATABASE_DRIVER` environment variable is used to distinguish between the two types of Postgres database instances, with values of `node` or `neon`. + +To streamline deployment, we have set default values based on the characteristics of different platforms: + +- On the Vercel platform, `DATABASE_DRIVER` defaults to `neon`; +- In our provided Docker image `lobe-chat-database`, `DATABASE_DRIVER` defaults to `node`. + +Therefore, if you follow the standard deployment methods below, you do not need to manually configure the `DATABASE_DRIVER` environment variable: + +- Vercel + Serverless Postgres +- Docker image + Node Postgres + +### `KEY_VAULTS_SECRET` + +Considering that users will store sensitive information such as their API Key and baseURL in the database, we need a key to encrypt this information to prevent leakage in case of a database breach. Hence, the `KEY_VAULTS_SECRET` environment variable is used to encrypt sensitive information like user-stored apikeys. + + +You can generate a random 32-character string as the value of `KEY_VAULTS_SECRET` using `openssl rand -base64 32`. + + + + +## Configuring Authentication Services + +In the server-side database mode, we need an authentication service to distinguish the identities of different users. There are many well-developed authentication solutions in the open-source community. We have integrated two different authentication services to meet the demands of different scenarios, one is Clerk, and the other is NextAuth. + +### Clerk + +[Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) is an authentication SaaS service that provides out-of-the-box authentication capabilities with high productization, low integration costs, and a great user experience. For those who offer SaaS products, Clerk is a good choice. Our official [LobeChat Cloud](https://lobechat.com) uses Clerk as the authentication service. + +The integration of Clerk is relatively simple, requiring only the configuration of the `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`, `CLERK_SECRET_KEY`, and `CLERK_WEBHOOK_SECRET` environment variables, which can be obtained from the Clerk console. + + +In Vercel deployment mode, we recommend using Clerk as the authentication service for a better user experience. + + +However, this type of authentication relies on Clerk's official service, so there may be some limitations in certain scenarios: + +- For example, when using Clerk in China, it may be affected by the network environment. +- Clerk is not suitable for scenarios that require complete private deployment. +- It relies on `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`, which may not be readily usable with public Docker images. + +Therefore, for the above scenarios, we also provide NextAuth as an alternative solution. + +### NextAuth + +NextAuth is an open-source authentication library that supports multiple identity providers, including Auth0, Cognito, GitHub, Google, Facebook, Apple, Twitter, and more. NextAuth itself provides a complete authentication solution, including user registration, login, password recovery, integration with various identity providers, and more. + +For information on configuring NextAuth, you can refer to the [Authentication](/docs/self-hosting/advanced/authentication) documentation. + + +In the official Docker image `lobe-chat-database`, we recommend using NextAuth as the authentication service. + + +## Configuring S3 Storage Service + +LobeChat has supported multimodal AI conversations since [a long time ago](https://x.com/lobehub/status/1724289575672291782), involving the function of uploading images to large models. In the client-side database solution, image files are stored as binary data directly in the browser's IndexedDB database. However, this solution is not feasible in the server-side database. Storing file-like data directly in Postgres will greatly waste valuable database storage space and slow down computational performance. + +The best practice in this area is to use a file storage service (S3) to store image files, which is also the storage solution relied upon for subsequent file uploads/knowledge base functions. + + +In this documentation, S3 refers to a compatible S3 storage solution, which supports the Amazon S3 API-compatible object storage system. Common examples include Cloudflare R2, Alibaba Cloud OSS, and self-deployable Minio, all of which support the S3-compatible API. + + +For detailed configuration guidelines on S3, please refer to [S3 Object Storage](/docs/self-hosting/advanced/s3) for more information. + +## Getting Started with Deployment + +The above is a detailed explanation of configuring LobeChat with a server-side database. You can configure it according to your actual situation and then choose a deployment platform that suits you to start deployment: + + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database.zh-CN.mdx new file mode 100644 index 0000000..8f0c966 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database.zh-CN.mdx @@ -0,0 +1,148 @@ +--- +title: 使用服务端数据库部署 - 配置数据库、身份验证服务和 S3 存储服务 +description: 本文将介绍服务端数据库版 LobeChat 的部署思路,解释如何配置数据库、身份验证服务和 S3 存储服务。 +tags: + - 服务端数据库 + - Postgres + - S3存储服务 + - 数据库配置 + - 身份验证服务 + - 环境变量配置 +--- + +# 使用服务端数据库部署 + +LobeChat 默认使用客户端数据库(IndexedDB),同时也支持使用服务端数据库(下简称 DB 版)。LobeChat 采用了 Postgres 作为后端存储数据库。 + + + PostgreSQL是一种强大的开源关系型数据库管理系统,具备高度扩展性和标准SQL支持。它提供了丰富的数据类型、并发处理、数据完整性、安全性及可编程性,适用于复杂应用和大规模数据管理。 + + +本文将从框架角度介绍在任何一个平台中部署 DB 版 LobeChat 的流程和原理,让你知其然也知其所以然,最后可以根据自己的实际情况进行部署。 + +如你已经熟悉完整原理,可以查看各个平台的部署指南快速开始: + + + +--- + +对于 LobeChat 的 DB 版,正常的部署流程都需要包含三个模块的配置: + +1. 数据库配置; +2. 身份验证服务配置; +3. S3 存储服务配置。 + +## 配置数据库 + +在部署之前,请确保你已经准备好 Postgres 数据库实例,你可以选择以下任一实例: + +- `A.` 使用 Vercel / Neon 等 Serverless Postgres 实例; +- `B.` 使用 Docker / Railway / Zeabur 等自部署 Postgres 实例,下统称 Node Postgres 实例; + +两者的配置方式在环境变量的取值上会略有一点区别,其他方面是一样的。 + +同时,由于我们支持了文件对话/知识库对话的能力,因此我们需要为 Postgres 安装 `pgvector` 插件,该插件提供了向量搜索的能力,是 LobeChat 实现 RAG 的重要构件之一。 + + + +### `NEXT_PUBLIC_SERVICE_MODE` + +LobeChat 同时支持了客户端数据库和服务端数据库,因此我们提供了一个环境变量用于切换模式,这个变量为 `NEXT_PUBLIC_SERVICE_MODE`,该值默认为 `client`。 + +针对服务端数据库部署场景,你需要将 `NEXT_PUBLIC_SERVICE_MODE` 设置为 `server`。 + + + 在官方的 `lobe-chat-database` Docker 镜像中,已经默认将该环境变量设为 `server`,因此如果你使用 + Docker 镜像部署,则无需再配置该环境变量。 + + + + 由于 `NEXT_PUBLIC` 开头的环境变量是在前端代码中生效的,而因此无法通过容器运行时注入进行修改。 (`next.js`的参考文档 [Configuring: Environment Variables | Next.js (nextjs.org)](https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables) ) 这也是为什么我们选择再打一个 DB 版镜像的原因。 + +如果你需要在 Docker 部署中修改 `NEXT_PUBLIC` 前缀的变量,你必须自行构建镜像,在 build 时就把自己的 `NEXT_PUBLIC` 开头的环境变量打进去。 + + + +### `DATABASE_URL` + +配置数据库,核心是添加 `DATABASE_URL` 环境变量,将你准备好的 Postgres 数据库连接 URL 填入其中。数据库连接 URL 的通常格式为 `postgres://username:password@host:port/database`。 + + + 如果希望连接数据库时启用 SSL + ,请自行参考[文档](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode)进行设置 + + +### `DATABASE_DRIVER` + +`DATABASE_DRIVER` 环境变量用于区分两种 Postgres 数据库实例,`DATABASE_DRIVER` 的取值为 `node` 或 `neon`。 + +为提升部署便捷性,我们根据不同的平台特点设置了默认值: + +- 在 Vercel 平台下,`DATABASE_DRIVER` 默认为 `neon`; +- 在我们提供的 Docker 镜像 `lobe-chat-database` 中,`DATABASE_DRIVER` 默认为 `node`。 + +因此如果你采用了以下标准的部署方式,你无需手动配置 `DATABASE_DRIVER` 环境变量: + +- Vercel + Serverless Postgres +- Docker 镜像 + Node Postgres + +### `KEY_VAULTS_SECRET` + +考虑到用户会存储自己的 API Key 和 baseURL 等敏感信息到数据库中,因此我们需要一个密钥来加密这些信息,避免数据库被爆破/脱库时这些关键信息被泄露。 因此有了 `KEY_VAULTS_SECRET` 环境变量,用于加密用户存储的 apikey 等敏感信息。 + + + 你可以使用 `openssl rand -base64 32` 生成一个随机的 32 位字符串作为 `KEY_VAULTS_SECRET` 的值。 + + + + +## 配置身份验证服务 + +在服务端数据库模式下,我们要为不同用户区分身份,因此需要一个身份验证服务。开源社区中已经存在较多完善的身份验证解决方案。我们在实现过程中集成了两种不同的身份验证服务,用于满足不同场景的诉求,一种是 Clerk ,另外一种是 NextAuth。 + +### Clerk + +[Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) 是一个身份验证 SaaS 服务,提供了开箱即用的身份验证能力,产品化程度很高,集成成本较低,体验很好。对于提供 SaaS 化产品的诉求来说,Clerk 是一个不错的选择。我们官方提供的 [LobeChat Cloud](https://lobechat.com),就是使用了 Clerk 作为身份验证服务。 + +Clerk 的集成也相对简单,只需要配置 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 、 `CLERK_SECRET_KEY` 和 `CLERK_WEBHOOK_SECRET` 环境变量即可,这三个环境变量可以在 Clerk 控制台中获取。 + + + 在 Vercel 部署模式下,我们推荐使用 Clerk 作为身份验证服务,可以获得更好的用户体验。 + + +但是这种身份验证依赖了 Clerk 官方的服务,因此在一些场景下可能会有一些限制: + +- 比如在国内使用 Clerk 时,可能会受到网络环境的影响; +- 需要完全私有化部署的场景下,Clerk 并不适用; +- 必须依赖 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,对于公共 Docker 镜像无法开箱即用; + +因此针对上述场景,我们也提供了 NextAuth 作为备选方案。 + +### NextAuth + +NextAuth 是一个开源的身份验证库,支持多种身份验证提供商,包括 Auth0、Cognito、GitHub、Google、Facebook、Apple、Twitter 等。NextAuth 本身提供了一套完整的身份验证解决方案,包括用户注册、登录、密码找回、多种身份验证提供商的集成等。 + +关于 NextAuth 的配置,你可以参考 [身份验证](/zh/docs/self-hosting/advanced/authentication) 的文档获取更多信息。 + + + 在官方的 Docker 镜像 `lobe-chat-database` 中,我们推荐使用 NextAuth 作为身份验证服务。 + + +## 配置 S3 存储服务 + +LobeChat 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就支持了多模态的 AI 会话,其中涉及到图片上传给大模型的功能。在客户端数据库方案中,图片文件直接以二进制数据存储在浏览器 IndexedDB 数据库,但在服务端数据库中这个方案并不可行。因为在 Postgres 中直接存储文件类二进制数据会大大浪费宝贵的数据库存储空间,并拖慢计算性能。 + +这块最佳实践是使用文件存储服务(S3)来存储图片文件,同时 S3 也是文件上传/知识库功能所依赖的大容量静态文件存储方案。 + + + 在本文档库中,S3 所指代的是指兼容 S3 存储方案,即支持 Amazon S3 API 的对象存储系统,常见例如 + Cloudflare R2 、阿里云 OSS,可以自部署的 minio 等均支持 S3 兼容 API。 + + +关于 S3 的详细配置指南,请参阅 [S3 对象存储](/zh/docs/self-hosting/advanced/s3) 了解详情。 + +## 开始部署 + +以上就是关于服务端数据库版 LobeChat 的配置详解,你可以根据自己的实际情况进行配置,然后选择适合自己的部署平台开始部署: + + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.mdx new file mode 100644 index 0000000..edbd634 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.mdx @@ -0,0 +1,675 @@ +--- +title: Deploying LobeChat Server Database with Docker Compose +description: >- + Learn how to deploy LobeChat Server Database using Docker Compose, including + configuration tutorials for various services. +tags: + - Docker Compose + - LobeChat + - Docker Container + - Deployment Guide +--- + +# Deploying LobeChat server database with Docker Compose + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ + + This article assumes that you are familiar with the basic principles and processes of deploying + the LobeChat server database version (hereinafter referred to as DB version), so it only includes + the core environment variable configuration. If you are not familiar with the deployment + principles of LobeChat DB version, please refer to [Deploying using a Server + Database](/zh/docs/self-hosting/server-database). + + + + Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as an authentication service when deploying LobeChat using Docker / Docker Compose. + +If you do need Clerk as an authentication service, you might consider deploying using Vercel or building your own image. + + + +Generally speaking, to fully run the LobeChat database version, you need at least the following four services: + +- LobeChat database version itself +- PostgreSQL database with PGVector plugin +- Object storage service supporting S3 protocol +- SSO authentication service supported by LobeChat + +These services can be combined through self-hosting or online cloud services to meet your needs. + +We provide a fully self-built Docker Compose configuration, which you can use directly to start the LobeChat database version or modify to suit your needs. + +We default to using [MinIO](https://github.com/minio/minio) as the local S3 object storage service and [Logto](https://github.com/logto-io/logto) as the local authentication service. + +## Quick Start + +To facilitate quick start, this chapter uses the docker-compose configuration file in the `docker-compose/local` directory. The LobeChat application runs at `http://localhost:3210` after startup and can be run locally. + + + To facilitate quick start, this docker-compose.yml omits a large number of Secret/Password configurations and is only suitable for quick demonstration or personal local use. Do not use it directly in a production environment! Otherwise, you will be responsible for any security issues! + + + + ### Create Configuration Files + +Create a new `lobe-chat-db` directory to store your configuration files and subsequent database files. + +```sh +mkdir lobe-chat-db +``` + +Pull the configuration files into your directory: + +```sh +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/docker-compose.yml > docker-compose.yml +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/.env.example > .env +``` + +### Start Services + +```sh +docker compose up -d +``` + +### Configure Logto + +1. Open `http://localhost:3002` to access the Logto WebUI and register an administrator account. + +2. Create a `Next.js (App Router)` application and add the following configurations: + + - `Redirect URI` should be `http://localhost:3210/api/auth/callback/logto` + - `Post sign-out redirect URI` should be `http://localhost:3210/` + +3. Obtain the `App ID` and `App secrets`, and fill them into your `.env` file corresponding to `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET`. + +### Configure MinIO S3 + +1. Open `http://localhost:9001` to access the MinIO WebUI. The default admin account password is configured in `.env`. + +2. Create a bucket that matches the `MINIO_LOBE_BUCKET` field in your `.env` file, which defaults to `lobe`. + +3. Choose a custom policy, copy the following content, and paste it in (if you modified the bucket name, please find and replace accordingly): + + ```json + { + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:GetBucketLocation"], + "Resource": ["arn:aws:s3:::lobe"] + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:ListBucket"], + "Resource": ["arn:aws:s3:::lobe"], + "Condition": { + "StringEquals": { + "s3:prefix": ["files/*"] + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"], + "Resource": ["arn:aws:s3:::lobe/files/**"] + } + ], + "Version": "2012-10-17" + } + ``` + +4. Create a new access key, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`. + +### Restart LobeChat Service + +```sh +docker compose up -d +``` + + + At this point, do not use `docker compose restart lobe` to restart, as this method will not reload the environment variables, and your S3 configuration will not take effect. + + + +If you see the following logs in the container, it indicates that it has started successfully: + +```log +[Database] Start to migration... +✅ database migration pass. +------------------------------------- + ▲ Next.js 14.x.x + - Local: http://localhost:3210 + - Network: http://0.0.0.0:3210 + + ✓ Starting... + ✓ Ready in 95ms +``` + + + +You have successfully deployed the LobeChat database version, and you can access your LobeChat service at `http://localhost:3210`. + +If you encounter issues, please check the Docker logs and console logs, and follow the detailed troubleshooting guide later in the document. + +## Deploying to Production + +The main difference between production and local operation is the need to use domain addresses instead of localhost. We assume that in addition to the above services, you are also running an Nginx layer for reverse proxy and SSL configuration. + +The domain names and corresponding service port descriptions are as follows: + +- `lobe.example.com`: your LobeChat service domain, needs to be reverse proxied to the LobeChat service port, default is `3210` +- `lobe-auth-api.example.com`: your Logto service domain, needs to be reverse proxied to the Logto API service port, default is `3001` +- `lobe-auth-ui.example.com`: your Logto UI domain, needs to be reverse proxied to the Logto WebUI service port, default is `3002` +- `lobe-s3-api.example.com`: your MinIO API domain, needs to be reverse proxied to the MinIO API service port, default is `9000` +- `lobe-s3-ui.example.com`: optional, your MinIO UI domain, needs to be reverse proxied to the MinIO WebUI service port, default is `9001` + +And the service port without reverse proxy: + +- `postgresql`: your PostgreSQL database service port, default is `5432` + + + Please note that CORS cross-origin is configured internally in MinIO / Logto service, do not configure CORS additionally in your reverse proxy, as this will cause errors. + For minio ports other than 443, Host must be $http_host (with port number), otherwise a 403 error will occur: proxy_set_header Host $http_host. + +If you need to configure SSL certificates, please configure them uniformly in the outer Nginx reverse proxy, rather than in MinIO. + + + +### Configuration Files + +```sh +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.example > .env +``` + +The configuration files include `.env` and `docker-compose.yml`, where the `.env` file is used to configure LobeChat's environment variables, and the `docker-compose.yml` file is used to configure the Postgres, MinIO, and Logto services. + +In general, you should only modify sensitive information such as domain names and account passwords, while other configuration items should be set according to the default values. + +Refer to the example configurations in the appendix of this article. + +### PostgreSQL Database Configuration + +You can check the logs using the following command: + +```sh +docker logs -f lobe-database +``` + + + In our official Docker images, the database schema migration will be automatically executed before + starting the image. Our official image guarantees the stability of the "empty database -> complete + table" automatic table creation. Therefore, we recommend that your database instance use an empty + table instance, thereby avoiding the hassle of manually maintaining table structures or + migrations. + + +If you encounter issues when creating tables, you can try using the following commands to forcibly remove the database container and restart: + +```sh +docker compose down # Stop services +sudo rm -rf ./data # Remove mounted database data +docker compose up -d # Restart +``` + +### Authentication Service Configuration + +This article uses Logto as an example to explain the configuration process. If you are using other authentication service providers, please refer to their documentation for configuration. + + + Please remember to configure the corresponding CORS cross-origin settings for the authentication service provider to ensure that LobeChat can access the authentication service properly. + +In this article, you need to allow cross-origin requests from `https://lobe.example.com`. + + + +You need to first access the WebUI for configuration: + +- If you configured the reverse proxy as mentioned earlier, open `https://lobe-auth-ui.example.com` +- Otherwise, after port mapping, open `http://localhost:3002` + +1. Register a new account; the first registered account will automatically become an administrator. + +2. In `Applications`, create a `Next.js (App Router)` application with any name. + +3. Set `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto`, and `Post sign-out redirect URI` to `https://lobe.example.com/`. + +4. Set `CORS allowed origins` to `https://lobe.example.com`. + + Configure Logto + +5. Obtain `App ID` and `App secrets`, and fill them into your `.env` file under `LOGTO_CLIENT_ID` and `LOGTO_CLIENT_SECRET`. + +6. Set `LOGTO_ISSUER` in your `.env` file to `https://lobe-auth-api.example.com/oidc`. + + Configure environment variables + +7. Optional: In the left panel under `Sign-in experience`, in `Sign-up and sign-in - Advanced Options`, disable `Enable user registration` to prohibit user self-registration. If you disable user self-registration, you can only manually add users in the left panel under `User Management`. + + Disable user registration + +8. Restart the LobeChat service: + + ```sh + docker compose up -d + ``` + + + Please note that the administrator account is not the same as a registered user; do not use your + administrator account to log into LobeChat, as this will only result in an error. + + +### S3 Object Storage Service Configuration + +This article uses MinIO as an example to explain the configuration process. If you are using other S3 service providers, please refer to their documentation for configuration. + + + Please remember to configure the corresponding CORS cross-origin settings for the S3 service provider to ensure that LobeChat can access the S3 service properly. + +In this article, you need to allow cross-origin requests from `https://lobe.example.com`. This can be configured in the MinIO WebUI under `Configuration - API - Cors Allow Origin`, or in the Docker Compose under `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN`. + +If you configure using the second method (which is also the default method), you will not be able to configure it in the MinIO WebUI anymore. + + + +You need to first access the WebUI for configuration: + +- If you configured the reverse proxy as mentioned earlier, open `https://lobe-s3-ui.example.com` +- Otherwise, after port mapping, open `http://localhost:9001` + +1. Enter your `MINIO_ROOT_USER` and `MINIO_ROOT_PASSWORD` on the login screen, then click login. + +2. In the left panel under Administer / Buckets, click `Create Bucket`, enter `lobe` (corresponding to your `S3_BUCKET` environment variable), and then click `Create`. + + Create a bucket + +3. Select your bucket, click Summary - Access Policy, edit, choose `Custom`, and input the content from `minio-bucket-config.json` (see appendix) and save (again, assuming your bucket name is `lobe`): + + Select MinIO bucket policy + + Configure MinIO bucket policy + +4. In the left panel under User / Access Keys, click `Create New Access Key`, make no additional modifications, and fill the generated `Access Key` and `Secret Key` into your `.env` file under `S3_ACCESS_KEY_ID` and `S3_SECRET_ACCESS_KEY`. + + Create a new access key + +5. Restart the LobeChat service: + + ```sh + docker compose up -d + ``` + +You have successfully deployed the LobeChat database version, and you can access your LobeChat service at `https://lobe.example.com`. + +## Appendix + +To facilitate one-click copying, here are the example configuration files needed to configure the server database: + +### Local Deployment + +#### `.env` + +```sh +# Logto secret +LOGTO_CLIENT_ID= +LOGTO_CLIENT_SECRET= + +# MinIO S3 configuration +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# Configure the bucket information of MinIO +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID= +S3_SECRET_ACCESS_KEY= + +# Proxy, if you need it +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE. +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + +# ----- Other config ----- +# if no special requirements, no need to change +LOBE_PORT=3210 +LOGTO_PORT=3001 +MINIO_PORT=9000 + +# Postgres related, which are the necessary environment variables for DB +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC + +``` + +#### `docker-compose.yml` + +```yaml +services: + network-service: + image: alpine + container_name: lobe-network + ports: + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console + - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto + - '3002:3002' # Logto Admin + - '${LOBE_PORT}:3210' # LobeChat + command: tail -f /dev/null + networks: + - lobe-network + + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - "5432:5432" + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=${LOBE_DB_NAME}' + - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + networks: + - lobe-network + + minio: + image: minio/minio + container_name: lobe-minio + network_mode: 'service:network-service' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}' + - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}' + - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}' + restart: always + command: > + server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + + logto: + image: svhd/logto + container_name: lobe-logto + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'PORT=${LOGTO_PORT}' + - 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto' + - 'ENDPOINT=http://localhost:${LOGTO_PORT}' + - 'ADMIN_ENDPOINT=http://localhost:3002' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + network-service: + condition: service_started + minio: + condition: service_started + logto: + condition: service_started + + environment: + - 'APP_URL=http://localhost:3210' + - 'NEXT_AUTH_SSO_PROVIDERS=logto' + - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=' + - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg' + - 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth' + - 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc' + - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}' + - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}' + - 'S3_BUCKET=${MINIO_LOBE_BUCKET}' + - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}' + - 'S3_ENABLE_PATH_STYLE=1' + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +networks: + lobe-network: + driver: bridge + +``` + +### Deploying to Production + +#### `.env` + +```sh +# Required: LobeChat domain for tRPC calls +# Ensure this domain is whitelisted in your NextAuth providers and S3 service CORS settings +APP_URL=https://lobe.example.com/ + +# Postgres related environment variables +# Required: Secret key for encrypting sensitive information. Generate with: openssl rand -base64 32 +KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ= +# Required: Postgres database connection string +# Format: postgresql://username:password@host:port/dbname +# If using Docker, you can use the container name as the host +DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe + +# NEXT_AUTH related environment variables +# Supports auth0, Azure AD, GitHub, Authentik, Zitadel, Logto, etc. +# For supported providers, see: https://lobehub.com/docs/self-hosting/advanced/auth#next-auth +# If you have ACCESS_CODE, please remove it. We use NEXT_AUTH as the sole authentication source +# Required: NextAuth secret key. Generate with: openssl rand -base64 32 +NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg +# Required: Specify the authentication provider (e.g., Logto) +NEXT_AUTH_SSO_PROVIDERS=logto +# Required: NextAuth URL for callbacks +NEXTAUTH_URL=https://lobe.example.com/api/auth + +# NextAuth providers configuration (example using Logto) +# For other providers, see: https://lobehub.com/docs/self-hosting/environment-variables/auth +LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID +LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET +LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc + +# Proxy settings (if needed, e.g., when using GitHub as an auth provider) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# S3 related environment variables (example using MinIO) +# Required: S3 Access Key ID (for MinIO, invalid until manually created in MinIO UI) +S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_ID +# Required: S3 Secret Access Key (for MinIO, invalid until manually created in MinIO UI) +S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY +# Required: S3 Endpoint for server/client connections to S3 API +S3_ENDPOINT=https://lobe-s3-api.example.com +# Required: S3 Bucket (invalid until manually created in MinIO UI) +S3_BUCKET=lobe +# Required: S3 Public Domain for client access to unstructured data +S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com +# Optional: S3 Enable Path Style +# Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO +# See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style +S3_ENABLE_PATH_STYLE=1 + +# Other basic environment variables (as needed) +# See: https://lobehub.com/docs/self-hosting/environment-variables/basic +# Note: For server versions, the API must support embedding models (OpenAI text-embedding-3-small) for file processing +# You don't need to specify this model in OPENAI_MODEL_LIST +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + +``` + +#### `docker-compose.yml` + +```yaml +services: + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - '5432:5432' + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=lobe' + - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + + minio: + image: minio/minio + container_name: lobe-minio + ports: + - '9000:9000' + - '9001:9001' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=YOUR_MINIO_USER' + - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD' + - 'MINIO_DOMAIN=lobe-s3-api.example.com' + - 'MINIO_API_CORS_ALLOW_ORIGIN=https://lobe.example.com' # Your LobeChat's domain name. + restart: always + command: > + server /etc/minio/data --address ":9000" --console-address ":9001" + + logto: + image: svhd/logto + container_name: lobe-logto + ports: + - '3001:3001' + - '3002:3002' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto' + - 'ENDPOINT=https://lobe-auth-api.example.com' + - 'ADMIN_ENDPOINT=https://lobe-auth-ui.example.com' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + ports: + - '3210:3210' + depends_on: + - postgresql + - minio + - logto + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +``` + +#### `minio-bucket-config.json` + +```json +{ + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:GetBucketLocation"], + "Resource": ["arn:aws:s3:::lobe"] + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:ListBucket"], + "Resource": ["arn:aws:s3:::lobe"], + "Condition": { + "StringEquals": { + "s3:prefix": ["files/*"] + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"], + "Resource": ["arn:aws:s3:::lobe/files/**"] + } + ], + "Version": "2012-10-17" +} +``` + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat-database?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square +[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.zh-CN.mdx new file mode 100644 index 0000000..a518144 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/docker-compose.zh-CN.mdx @@ -0,0 +1,671 @@ +--- +title: 通过 Docker Compose 部署 LobeChat +description: 学习如何使用 Docker Compose 部署 LobeChat 服务,包括各种服务的配置教程。 +tags: + - Docker Compose + - LobeChat + - Docker 容器 + - 部署指引 +--- + +# 使用 Docker Compose 部署 LobeChat 服务端数据库版本 + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ + + 本文已经假定你了解了 LobeChat 服务端数据库版本(下简称 DB + 版)的部署基本原理和流程,因此只包含核心环境变量配置的内容。如果你还不了解 LobeChat DB + 版的部署原理,请先查阅 [使用服务端数据库部署](/zh/docs/self-hosting/server-database) 。 + + + + 由于无法使用 Docker 环境变量暴露 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,使用 Docker / Docker Compose + 部署 LobeChat 时,你不能使用 Clerk 作为登录鉴权服务。 + +如果你确实需要 Clerk 作为登录鉴权服务,你可以考虑使用 Vercel 部署或者自行构建镜像。 + + + +一般来讲,想要完整的运行 LobeChat 数据库版本,你需要至少拥有如下四个服务 + +- LobeChat 数据库版本自身 +- 带有 PGVector 插件的 PostgreSQL 数据库 +- 支持 S3 协议的对象存储服务 +- 受 LobeChat 支持的 SSO 登录鉴权服务 + +这些服务可以通过自建或者在线云服务组合搭配,以满足不同层次的部署需求。 + +本文中,我们提供了完全基于开源自建服务的 Docker Compose 配置,你可以直接使用这份配置文件来启动 LobeChat 数据库版本,也可以对之进行修改以适应你的需求。 + +我们默认使用 [MinIO](https://github.com/minio/minio) 作为本地 S3 对象存储服务,使用 [Logto](https://github.com/logto-io/logto) 作为本地鉴权服务。 + +## 快速启动 + +为方便快速上手,这一章使用 `docker-compose/local` 目录中的 docker-compose 配置文件,启动后的 LobeChat 应用运行在 `http://localhost:3210`,可在本地运行。 + + + 为了快速上手,此 docker-compose.yml内置掉了大量的 Secret/Password + 的配置,仅适用于快速演示或个人本地使用。请勿直接用于线上生产环境!否则遇到安全问题请自行负责! + + + + ### 创建配置文件 + +新建一个 `lobe-chat-db` 目录,用于存放你的配置文件和后续的数据库文件。 + +```sh +mkdir lobe-chat-db +``` + +拉取配置文件到你的目录中: + +```sh +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/docker-compose.yml > docker-compose.yml +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/local-logto/.env.zh-CN.example > .env +``` + +### 启动服务 + +```sh +docker compose up -d +``` + +### 配置 Logto + +1. 打开 `http://localhost:3002`,访问 Logto WebUI,注册管理员账号 + +2. 创建一个 `Next.js (App Router)` 应用,添加以下配置: + + - `Redirect URI` 为 `http://localhost:3210/api/auth/callback/logto` + - `Post sign-out redirect URI` 为 `http://localhost:3210/` + +3. 获取 `App ID` 和 `App secrets`,填入 `.env` 文件中对应的 `LOGTO_CLIENT_ID` 、 `LOGTO_CLIENT_SECRETT` + +### 配置 MinIO S3 + +1. 打开 `http://localhost:9001`,访问 MinIO WebUI,默认管理员账号密码在 `.env` 中配置 + +2. 创建符合你的 `.env` 文件中 `MINIO_LOBE_BUCKET` 字段的桶,默认为 `lobe` + +3. 选择自定义策略,复制并粘贴如下内容(如果你修改了桶名,请自行查找替换) + + ```json + { + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:GetBucketLocation"], + "Resource": ["arn:aws:s3:::lobe"] + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:ListBucket"], + "Resource": ["arn:aws:s3:::lobe"], + "Condition": { + "StringEquals": { + "s3:prefix": ["files/*"] + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"], + "Resource": ["arn:aws:s3:::lobe/files/**"] + } + ], + "Version": "2012-10-17" + } + ``` + +4. 创建一个新的访问密钥,将生成的 `Access Key` 和 `Secret Key` 填入你的 `.env` 文件中的 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 中 + +### 重启 LobeChat 服务 + +```sh +docker compose up -d +``` + + + 此时,请勿使用 `docker compose restart lobe` 来重启,因为这种重启方式不会重新加载环境变量,你的 + S3 配置将不会生效。 + + + +如果你在容器中看到了以下日志,则说明已经启动成功: + +```log +[Database] Start to migration... +✅ database migration pass. +------------------------------------- + ▲ Next.js 14.x.x + - Local: http://localhost:3210 + - Network: http://0.0.0.0:3210 + + ✓ Starting... + ✓ Ready in 95ms +``` + + + +至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `http://localhost:3210` 访问你的 LobeChat 服务。 + +如果你遇到问题,请尝试查看 Docker 日志和控制台日志,并根据后文的详细指引进行排查。 + +## 发布到生产 + +生产和本地运行存在一个很大的差别,就是在于需要使用域名地址而不是 localhost。我们假设在上述服务之外,你还运行了一层 Nginx 来进行反向代理、配置 SSL。 + +域名和配套服务端口说明如下: + +- `lobe.example.com`:为你的 LobeChat 服务端域名,需要反向代理到 LobeChat 服务端口,默认为 `3210` +- `lobe-auth-api.example.com`:为你的 Logto 服务端域名,需要反向代理到 Logto API 服务端口,默认为 `3001` +- `lobe-auth-ui.example.com`:为你的 Logto UI 域名,需要反向代理到 Logto WebUI 服务端口,默认为 `3002` +- `lobe-s3-api.example.com`:为你的 MinIO API 域名,需要反向代理到 MinIO API 服务端口,默认为 `9000` +- `lobe-s3-ui.example.com`:可选,为你的 MinIO UI 域名,需要反向代理到 MinIO WebUI 服务端口,默认为 `9001` + +以及不进行反向代理的服务端口: + +- `postgresql`:你的 PostgreSQL 数据库服务端口,默认为 `5432` + + + 请务必注意,CORS 跨域是在 MinIO / Logto 服务端内部配置的,请勿在你的反向代理中额外配置 CORS,这会导致错误。 + 对于minio非443端口时,Host必须是$http_host(带端口号),否则会403错误:proxy_set_header Host $http_host。 + +如果你需要配置 SSL 证书,请统一在外层的 Nginx 反向代理中配置,而不是在 MinIO 中配置。 + + + +### 配置文件 + +```sh +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/docker-compose.yml > docker-compose.yml +curl -fsSL https://raw.githubusercontent.com/lobehub/lobe-chat/HEAD/docker-compose/production/.env.zh-CN.example > .env +``` + +配置文件包括 `.env` 和 `docker-compose.yml` 两个文件,其中 `.env` 文件用于配置 LobeChat 的环境变量,`docker-compose.yml` 文件用于配置 Postgres、MinIO 和 Logto 服务。 + +一般情况下,你只应修改其中的域名和账号密码等敏感信息,其他配置项请按照默认值进行配置。 + +它们的示例配置请参见本文附录。 + +### Postgres 数据库配置 + +你可以使用下述指令检查日志: + +```sh +docker logs -f lobe-database +``` + + + 在我们官方的 Docker 镜像中,会在启动镜像前自动执行数据库 schema 的 migration + ,我们的官方镜像承诺「空数据库 -> + 完整表」这一段自动建表的稳定性。因此我们建议你的数据库实例使用一个空表实例,进而省去手动维护表结构或者 + migration 的麻烦。 + + +如果你在建表的时候出现了问题,你可以尝试使用如下命令强制移除数据库容器并重新启动: + +```sh +docker compose down # 停止服务 +sudo rm -rf ./data # 移除挂载的数据库数据 +docker compose up -d # 重新启动 +``` + +### 登录鉴权服务配置 + +本文以 Logto 为例,解释配置过程,如果你使用的是其他登录鉴权服务商,请参照其文档进行配置。 + + + 请记得注意配置对应登录鉴权服务提供商的 CORS 跨域配置,以确保 LobeChat 能够正常访问登录鉴权服务。 + +在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。 + + + +你需要首先访问 WebUI 来进行配置: + +- 如果你按照前文配置了反向代理,打开 `https://lobe-auth-ui.example.com` +- 否则,请在进行端口映射后,打开 `http://localhost:3002` + +1. 注册一个新账户,首个注册的账户将自动成为管理员 + +2. 在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意 + +3. 配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/` + +4. 配置 `CORS allowed origins` 为 `https://lobe.example.com` + + 配置 Logto + +5. 获取 `App ID` 和 `App secrets`,填入你的 `.env` 文件中的 `LOGTO_CLIENT_ID` 和 `LOGTO_CLIENT_SECRETT` 中 + +6. 配置你的 `.env` 文件中 `LOGTO_ISSUER` 为 `https://lobe-auth-api.example.com/oidc` + + 配置 Logto 环境变量 + +7. 可选,在左侧 `Sign-in experience` 面板的 `Sign-up and sign-in - Advanced Options` 中关闭 `Enable user registration`,禁止用户自行注册。如果你禁止了用户自行注册,那么你只能在左侧 `User Management` 里手动添加用户。 + + 关闭用户注册 + +8. 重启 LobeChat 服务: + + ```sh + docker compose up -d + ``` + + + 请注意,管理员账户不等同于注册用户,不要用你的管理员账户登录 LobeChat,那样只会报错。 + + +### S3 对象存储服务配置 + +本文以 MinIO 为例,解释配置过程,如果你使用的是其他 S3 服务商,请参照其文档进行配置。 + + + 请记得注意配置对应 S3 服务商的 CORS 跨域配置,以确保 LobeChat 能够正常访问 S3 服务。 + +在本文中,你需要允许 `https://lobe.example.com` 的跨域请求。这既可以在 MinIO WebUI 的 `Configuration - API - Cors Allow Origin` 中配置,也可以在 Docker Compose 中的 `minio - environment - MINIO_API_CORS_ALLOW_ORIGIN` 中配置。 + +如果你使用第二种方法(这也是默认的方法)进行配置,你将无法再在 MinIO WebUI 中配置。 + + + +你需要首先访问 WebUI 来进行配置: + +- 如果你按照前文配置了反向代理,打开 `https://lobe-s3-ui.example.com` +- 否则,请在进行端口映射后,打开 `http://localhost:9001` + +1. 在登录界面输入你设置的 `MINIO_ROOT_USER` 和 `MINIO_ROOT_PASSWORD`,然后点击登录 + +2. 在左侧面板 Administer / Buckets 中点击 `Create Bucket`,输入 `lobe`(对应你的 `S3_BUCKET` 环境变量),然后点击 `Create` + + 创建 MinIO 桶 + +3. 选中你的桶,点击 Summary - Access Policy,编辑,选择 `Custom`,输入 `minio-bucket-config.json` 中的内容(见附录)并保存(同样默认你的桶名为 `lobe`): + + 选中 MinIO 桶策略 + + 配置 MinIO 桶策略 + +4. 在左侧面板 User / Access Keys 处,点击 `Create New Access Key`,无需额外修改,将生成的 `Access Key` 和 `Secret Key` 填入你的 `.env` 文件中的 `S3_ACCESS_KEY_ID` 和 `S3_SECRET_ACCESS_KEY` 中 + + 创建 MinIO 访问密钥 + +5. 重启 LobeChat 服务: + + ```sh + docker compose up -d + ``` + +至此,你已经成功部署了 LobeChat 数据库版本,你可以通过 `https://lobe.example.com` 访问你的 LobeChat 服务。 + +## 附录 + +为方便一键复制,在此汇总配置服务端数据库所需要的示例配置文件: + +### 本地部署 + +#### `.env` + +```sh +# Logto secret +LOGTO_CLIENT_ID= +LOGTO_CLIENT_SECRET= + +# MinIO S3 配置 +MINIO_ROOT_USER=YOUR_MINIO_USER +MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD + +# 在下方配置 minio 中添加的桶 +MINIO_LOBE_BUCKET=lobe +S3_ACCESS_KEY_ID= +S3_SECRET_ACCESS_KEY= + +# Proxy,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# 其他环境变量,视需求而定,可以参照客户端版本的环境变量配置,注意不要有 ACCESS_CODE +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + +# ----- 相关配置 start ----- +# 如没有特殊需要不用更改 +LOBE_PORT=3210 +LOGTO_PORT=3001 +MINIO_PORT=9000 + +# Postgres 相关,也即 DB 必须的环境变量 +LOBE_DB_NAME=lobechat +POSTGRES_PASSWORD=uWNZugjBqixf8dxC + +``` + +#### `docker-compose.yml` + +```yaml +services: + network-service: + image: alpine + container_name: lobe-network + ports: + - '${MINIO_PORT}:${MINIO_PORT}' # MinIO API + - '9001:9001' # MinIO Console + - '${LOGTO_PORT}:${LOGTO_PORT}' # Logto + - '3002:3002' # Logto Admin + - '${LOBE_PORT}:3210' # LobeChat + command: tail -f /dev/null + networks: + - lobe-network + + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - "5432:5432" + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=${LOBE_DB_NAME}' + - 'POSTGRES_PASSWORD=${POSTGRES_PASSWORD}' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + networks: + - lobe-network + + minio: + image: minio/minio + container_name: lobe-minio + network_mode: 'service:network-service' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=${MINIO_ROOT_USER}' + - 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}' + - 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}' + restart: always + command: > + server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001" + + logto: + image: svhd/logto + container_name: lobe-logto + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'PORT=${LOGTO_PORT}' + - 'DB_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/logto' + - 'ENDPOINT=http://localhost:${LOGTO_PORT}' + - 'ADMIN_ENDPOINT=http://localhost:3002' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + network_mode: 'service:network-service' + depends_on: + postgresql: + condition: service_healthy + network-service: + condition: service_started + minio: + condition: service_started + logto: + condition: service_started + + environment: + - 'APP_URL=http://localhost:3210' + - 'NEXT_AUTH_SSO_PROVIDERS=logto' + - 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ=' + - 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg' + - 'NEXTAUTH_URL=http://localhost:${LOBE_PORT}/api/auth' + - 'LOGTO_ISSUER=http://localhost:${LOGTO_PORT}/oidc' + - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}' + - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}' + - 'S3_BUCKET=${MINIO_LOBE_BUCKET}' + - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}' + - 'S3_ENABLE_PATH_STYLE=1' + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +networks: + lobe-network: + driver: bridge + +``` + +### 发布到生产 + +#### `.env` + +```sh +# 必填,LobeChat 域名,用于 tRPC 调用 +# 请保证此域名在你的 NextAuth 鉴权服务提供商、S3 服务商的 CORS 白名单中 +APP_URL=https://lobe.example.com/ + +# Postgres 相关,也即 DB 必需的环境变量 +# 必填,用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成 +KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ= +# 必填,Postgres 数据库连接字符串,用于连接到数据库 +# 格式:postgresql://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器且位于同一 docker-compose 文件中,亦可使用容器名作为 host +DATABASE_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/lobe + +# NEXT_AUTH 相关,也即鉴权服务必需的环境变量 +# 可以使用 auth0、Azure AD、GitHub、Authentik、Zitadel、Logto 等,如有其他接入诉求欢迎提 PR +# 目前支持的鉴权服务提供商请参考:https://lobehub.com/zh/docs/self-hosting/advanced/auth#next-auth +# 如果你有 ACCESS_CODE,请务必清空,我们以 NEXT_AUTH 作为唯一鉴权来源 +# 必填,用于 NextAuth 的密钥,可以使用 openssl rand -base64 32 生成 +NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg +# 必填,指定鉴权服务提供商,这里以 Logto 为例 +NEXT_AUTH_SSO_PROVIDERS=logto +# 必填,NextAuth 的 URL,用于 NextAuth 的回调 +NEXTAUTH_URL=https://lobe.example.com/api/auth + +# NextAuth 鉴权服务提供商部分,以 Logto 为例 +# 其他鉴权服务提供商所需的环境变量,请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/auth +LOGTO_CLIENT_ID=YOUR_LOGTO_CLIENT_ID +LOGTO_CLIENT_SECRET=YOUR_LOGTO_CLIENT_SECRET +LOGTO_ISSUER=https://lobe-auth-api.example.com/oidc + +# 代理相关,如果你需要的话(比如你使用 GitHub 作为鉴权服务提供商) +# HTTP_PROXY=http://localhost:7890 +# HTTPS_PROXY=http://localhost:7890 + +# S3 相关,也即非结构化数据(文件、图片等)存储必需的环境变量 +# 这里以 MinIO 为例 +# 必填,S3 的 Access Key ID,对于 MinIO 来说,直到在 MinIO UI 中手动创建之前都是无效的 +S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_ID +# 必填,S3 的 Secret Access Key,对于 MinIO 来说,直到在 MinIO UI 中手动创建之前都是无效的 +S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY +# 必填,S3 的 Endpoint,用于服务端/客户端连接到 S3 API +S3_ENDPOINT=https://lobe-s3-api.example.com +# 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的 +S3_BUCKET=lobe +# 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据 +S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com +# 选填,S3 的 Enable Path Style +# 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1 +# 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style +S3_ENABLE_PATH_STYLE=1 + +# 其他基础环境变量,视需求而定。注意不要有 ACCESS_CODE +# 请参考:https://lobehub.com/zh/docs/self-hosting/environment-variables/basic +# 请注意,对于服务端版本,其 API 必须支持嵌入(OpenAI text-embedding-3-small)模型,否则无法对上传文件进行处理,但你无需在 OPENAI_MODEL_LIST 中指定此模型 +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... + +``` + +#### `docker-compose.yml` + +```yaml +services: + postgresql: + image: pgvector/pgvector:pg16 + container_name: lobe-postgres + ports: + - '5432:5432' + volumes: + - './data:/var/lib/postgresql/data' + environment: + - 'POSTGRES_DB=lobe' + - 'POSTGRES_PASSWORD=uWNZugjBqixf8dxC' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U postgres'] + interval: 5s + timeout: 5s + retries: 5 + restart: always + + minio: + image: minio/minio + container_name: lobe-minio + ports: + - '9000:9000' + - '9001:9001' + volumes: + - './s3_data:/etc/minio/data' + environment: + - 'MINIO_ROOT_USER=YOUR_MINIO_USER' + - 'MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD' + - 'MINIO_DOMAIN=lobe-s3-api.example.com' + - 'MINIO_API_CORS_ALLOW_ORIGIN=https://lobe.example.com' # Your LobeChat's domain name. + restart: always + command: > + server /etc/minio/data --address ":9000" --console-address ":9001" + + logto: + image: svhd/logto + container_name: lobe-logto + ports: + - '3001:3001' + - '3002:3002' + depends_on: + postgresql: + condition: service_healthy + environment: + - 'TRUST_PROXY_HEADER=1' + - 'DB_URL=postgresql://postgres:uWNZugjBqixf8dxC@postgresql:5432/logto' + - 'ENDPOINT=https://lobe-auth-api.example.com' + - 'ADMIN_ENDPOINT=https://lobe-auth-ui.example.com' + entrypoint: ['sh', '-c', 'npm run cli db seed -- --swe && npm start'] + + lobe: + image: lobehub/lobe-chat-database + container_name: lobe-database + ports: + - '3210:3210' + depends_on: + - postgresql + - minio + - logto + env_file: + - .env + restart: always + +volumes: + data: + driver: local + s3_data: + driver: local + +``` + +#### `minio-bucket-config.json` + +```json +{ + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:GetBucketLocation"], + "Resource": ["arn:aws:s3:::lobe"] + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:ListBucket"], + "Resource": ["arn:aws:s3:::lobe"], + "Condition": { + "StringEquals": { + "s3:prefix": ["files/*"] + } + } + }, + { + "Effect": "Allow", + "Principal": { + "AWS": ["*"] + }, + "Action": ["s3:PutObject", "s3:DeleteObject", "s3:GetObject"], + "Resource": ["arn:aws:s3:::lobe/files/**"] + } + ], + "Version": "2012-10-17" +} +``` + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat-database?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square +[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/docker.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/docker.mdx new file mode 100644 index 0000000..3404851 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/docker.mdx @@ -0,0 +1,161 @@ +--- +title: Deploying LobeChat Database with Docker +description: >- + Learn how to deploy the LobeChat server database version using Docker on Linux + and local machines. +tags: + - LobeChat + - Docker + - Database Deployment + - Postgres +--- +# Deploying Server Database Version Using Docker + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ + +This article assumes that you are familiar with the basic principles and processes of deploying the LobeChat server database version, so it only includes content related to core environment variable configuration. If you are not familiar with the deployment principles of the LobeChat server database version, please refer to [Deploying Server Database](/docs/self-hosting/server-database) first. + + + + Due to the inability to expose `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` using Docker environment variables, you cannot use Clerk as an authentication service when deploying LobeChat using Docker / Docker Compose. + +If you do need Clerk as an authentication service, you might consider deploying using Vercel or building your own image. + + + +## Deploying on a Linux Server + +Here is the process for deploying the LobeChat server database version on a Linux server: + + + +### Create a Postgres Database Instance + +Please create a Postgres database instance with the PGVector plugin according to your needs, for example: + +```sh +docker network create pg + +docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d pgvector/pgvector:pg16 +``` + +The above command will create a PG instance named `my-postgres` on the network `pg`, where `pgvector/pgvector:pg16` is a Postgres 16 image with the pgvector plugin installed by default. + + +The pgvector plugin provides vector search capabilities for Postgres, which is an important component for LobeChat to implement RAG. + + + +The above command does not specify a persistent storage location for the pg instance, so it is only for testing/demonstration purposes. Please configure persistent storage for production environments. + + +### Create a file named `lobe-chat.env` to store environment variables: + +```shell +# Website domain +APP_URL=https://your-prod-domain.com + +# DB required environment variables +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= +# Postgres database connection string +# Format: postgres://username:password@host:port/dbname; if your pg instance is a Docker container, use the container name +DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres + +# NEXT_AUTH related, can use auth0, Azure AD, GitHub, Authentik, zitadel, etc. If you have other access requirements, feel free to submit a PR +NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250 +NEXT_AUTH_SSO_PROVIDERS=auth0 +NEXTAUTH_URL=https://your-prod-domain.com/api/auth +AUTH0_CLIENT_ID=xxxxxx +AUTH0_CLIENT_SECRET=cSX_xxxxx +AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com + +# S3 related +S3_ACCESS_KEY_ID=xxxxxxxxxx +S3_SECRET_ACCESS_KEY=xxxxxxxxxx +S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com +S3_BUCKET=lobechat +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com + +# Other environment variables, as needed. You can refer to the environment variables configuration for the client version, making sure not to have ACCESS_CODE. +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... +``` + +### Start the lobe-chat-database Docker image + +```sh +docker run -it -d -p 3210:3210 --network pg --env-file lobe-chat.env --name lobe-chat-database lobehub/lobe-chat-database +``` + +You can use the following command to check the logs: + +```sh +docker logs -f lobe-chat-database +``` + +If you see the following logs in the container, it means it has started successfully: + +```log +[Database] Start to migration... +✅ database migration pass. +------------------------------------- + ▲ Next.js 14.x.x + - Local: http://localhost:3210 + - Network: http://0.0.0.0:3210 + + ✓ Starting... + ✓ Ready in 95ms +``` + + + + +In our official Docker image, the database schema migration is automatically executed before starting the image. We ensure stability from an empty database to all tables being formally available. Therefore, we recommend using an empty table instance for your database to avoid the cost of manually maintaining table structure migration. + + +## Using Locally (Mac / Windows) + +The data version of LobeChat also supports direct use on a local Mac/Windows machine. + +Here, we assume that you have a pg instance available on port 5432 locally on your Mac/Windows, with the account `postgres` and password `mysecretpassword`, accessible at `localhost:5432`. + +The script command you need to execute is: + +```shell +$ docker run -it -d --name lobe-chat-database -p 3210:3210 \ + -e DATABASE_URL=postgres://postgres:mysecretpassword@host.docker.internal:5432/postgres \ + -e KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \ + -e NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250 \ + -e NEXT_AUTH_SSO_PROVIDERS=auth0 \ + -e AUTH0_CLIENT_ID=xxxxxx \ + -e AUTH0_CLIENT_SECRET=cSX_xxxxx \ + -e AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com \ + -e APP_URL=http://localhost:3210 \ + -e NEXTAUTH_URL=http://localhost:3210/api/auth \ + -e S3_ACCESS_KEY_ID=xxxxxxxxxx \ + -e S3_SECRET_ACCESS_KEY=xxxxxxxxxx \ + -e S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com \ + -e S3_BUCKET=lobechat \ + -e S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com \ + lobehub/lobe-chat-database +``` + + +`Docker` uses a virtual machine solution on `Windows` and `macOS`. If you use `localhost` / `127.0.0.1`, it will refer to the container's `localhost`. In this case, try using `host.docker.internal` instead of `localhost`. + + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat-database?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square +[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/docker.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/docker.zh-CN.mdx new file mode 100644 index 0000000..279437d --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/docker.zh-CN.mdx @@ -0,0 +1,170 @@ +--- +title: 使用 Docker 部署 LobeChat 数据库 +description: 详细步骤教你如何在 Docker 中部署 LobeChat 服务端数据库。 +tags: + - Docker + - LobeChat + - 数据库部署 + - Postgres +--- + +# 使用 Docker 部署服务端数据库版 + +
+ [![][docker-release-shield]][docker-release-link] + +[![][docker-size-shield]][docker-size-link] + +[![][docker-pulls-shield]][docker-pulls-link] + +
+ + + 本文已经假定你了解了 LobeChat 服务端数据库版本(下简称 DB + 版)的部署基本原理和流程,因此只包含核心环境变量配置的内容。如果你还不了解 LobeChat DB + 版的部署原理,请先查阅 [使用服务端数据库部署](/zh/docs/self-hosting/server-database) 。 + + + + 由于无法使用 Docker 环境变量暴露 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY`,使用 Docker / Docker Compose + 部署 LobeChat 时,你不能使用 Clerk 作为登录鉴权服务。 + + 如果你确实需要 Clerk 作为登录鉴权服务,你可以考虑使用 Vercel 部署或者自行构建镜像。 + + +## 在 Linux 服务器上部署 + +以下是在 Linux 服务器上部署 LobeChat DB 版的流程: + + + +### 创建 Postgres 数据库实例 + +请按照你自己的诉求创建一个带有 PGVector 插件的 Postgres 数据库实例,例如: + +```sh +docker network create pg + +docker run --name my-postgres --network pg -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -d pgvector/pgvector:pg16 +``` + +上述指令会创建一个名为 `my-postgres`,并且网络为 `pg` 的 PG 实例,其中 `pgvector/pgvector:pg16` 是一个 Postgres 16 的镜像,且默认安装了 pgvector 插件。 + + + pgvector 插件为 Postgres 提供了向量搜索的能力,是 LobeChat 实现 RAG 的重要构件之一。 + + + + 以上指令得到的 pg + 实例并没有指定持久化存储位置,因此仅用于测试/演示,生产环境请自行配置持久化存储。 + + +### 创建名为 `lobe-chat.env` 文件用于存放环境变量: + +```shell +# 网站域名 +APP_URL=https://your-prod-domain.com + +# DB 必须的环境变量 +# 用于加密敏感信息的密钥,可以使用 openssl rand -base64 32 生成 +KEY_VAULTS_SECRET='jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk=' +# Postgres 数据库连接字符串 +# 格式:postgres://username:password@host:port/dbname,如果你的 pg 实例为 Docker 容器,请使用容器名 +DATABASE_URL=postgres://postgres:mysecretpassword@my-postgres:5432/postgres + +# NEXT_AUTH 相关,可以使用 auth0、Azure AD、GitHub、Authentik、zitadel 等,如有其他接入诉求欢迎提 PR +NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250 +NEXT_AUTH_SSO_PROVIDERS=auth0 +NEXTAUTH_URL=https://your-prod-domain.com/api/auth +AUTH0_CLIENT_ID=xxxxxx +AUTH0_CLIENT_SECRET=cSX_xxxxx +AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com + +# S3 相关 +S3_ACCESS_KEY_ID=xxxxxxxxxx +S3_SECRET_ACCESS_KEY=xxxxxxxxxx +S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com # 用于 S3 API 访问的域名 +S3_BUCKET=lobechat +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com # 用于外网访问 S3 的公共域名,需配置 CORS +# S3_REGION=ap-chengdu # 如果需要指定地域 + +# 其他环境变量,视需求而定 +# OPENAI_API_KEY=sk-xxxx +# OPENAI_PROXY_URL=https://api.openai.com/v1 +# OPENAI_MODEL_LIST=... +# ... +``` + +### 启动 lobe-chat-database docker 镜像 + +```sh +docker run -it -d -p 3210:3210 --network pg --env-file lobe-chat.env --name lobe-chat-database lobehub/lobe-chat-database +``` + +你可以使用下述指令检查日志: + +```sh +docker logs -f lobe-chat-database +``` + +如果你在容器中看到了以下日志,则说明已经启动成功: + +```log +[Database] Start to migration... +✅ database migration pass. +------------------------------------- + ▲ Next.js 14.x.x + - Local: http://localhost:3210 + - Network: http://0.0.0.0:3210 + + ✓ Starting... + ✓ Ready in 95ms +``` + + + + + 在我们官方的 Docker 镜像中,会在启动镜像前自动执行数据库 schema 的 migration + ,我们的官方镜像承诺「空数据库 -> + 完整表」这一段自动建表的稳定性。因此我们建议你的数据库实例使用一个空表实例,进而省去手动维护表结构或者 + migration 的麻烦。 + + +## 在本地(Mac / Windows) 上使用 + +LobeChat 的 DB 版也支持直接在本地的 Mac/Windows 本地使用。 + +在此我们已假设你的本地有一个 5432 端口可用,账号为 `postgres` ,密码是 `mysecretpassword` 的 pg 实例,它在 `localhost:5432` 可用。 + +那么你需要执行的脚本指令为: + +```shell +$ docker run -it -d --name lobe-chat-database -p 3210:3210 \ + -e DATABASE_URL=postgres://postgres:mysecretpassword@host.docker.internal:5432/postgres \ + -e KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= \ + -e NEXT_AUTH_SECRET=3904039cd41ea1bdf6c93db0db96e250 \ + -e NEXT_AUTH_SSO_PROVIDERS=auth0 \ + -e AUTH0_CLIENT_ID=xxxxxx \ + -e AUTH0_CLIENT_SECRET=cSX_xxxxx \ + -e AUTH0_ISSUER=https://lobe-chat-demo.us.auth0.com \ + -e APP_URL=http://localhost:3210 \ + -e NEXTAUTH_URL=http://localhost:3210/api/auth \ + -e S3_ACCESS_KEY_ID=xxxxxxxxxx \ + -e S3_SECRET_ACCESS_KEY=xxxxxxxxxx \ + -e S3_ENDPOINT=https://xxxxxxxxxx.r2.cloudflarestorage.com \ + -e S3_BUCKET=lobechat \ + -e S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com \ + lobehub/lobe-chat-database +``` + + + `Docker` 在 `Windows` 和 `macOS` 上走的是虚拟机方案,如果使用 `localhost` / `127.0.0.1` + ,将会走到自身容器的 `localhost`,此时请尝试用 `host.docker.internal` 替代 `localhost` + + +[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat-database?color=45cc11&labelColor=black&style=flat-square +[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square +[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database +[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/netlify.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/netlify.mdx new file mode 100644 index 0000000..b637e20 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/netlify.mdx @@ -0,0 +1,14 @@ +--- +title: Deploy LobeChat with Database on Netlify +description: >- + Learn how to deploy LobeChat on Netlify with ease, including: database, + authentication and S3 storage service. +tags: + - Deploy LobeChat + - Netlify Deployment +--- + +# Deploy LobeChat with Database on Netlify + +TODO + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/netlify.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/netlify.zh-CN.mdx new file mode 100644 index 0000000..c71f604 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/netlify.zh-CN.mdx @@ -0,0 +1,16 @@ +--- +title: 在 Netlify 上部署 LobeChat 服务端数据库版 +description: >- + 学习如何在 Netlify 上部署 LobeChat,包括 Fork 仓库、准备 OpenAI API Key、导入到 Netlify + 工作台、配置站点名称与环境变量等步骤。 +tags: + - Netlify + - LobeChat + - 部署教程 + - OpenAI API Key + - 环境配置 +--- + +# 使用 Netlify 部署 LobeChat 数据库版 + +TODO diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/railway.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/railway.mdx new file mode 100644 index 0000000..f213064 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/railway.mdx @@ -0,0 +1,14 @@ +--- +title: Deploy LobeChat with Database on Railway +description: >- + Learn how to deploy LobeChat on Railway with ease, including: database, + authentication and S3 storage service. +tags: + - Deploy LobeChat + - Railway Deployment +--- + +# Deploy LobeChat with Database on Railway + +TODO + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/railway.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/railway.zh-CN.mdx new file mode 100644 index 0000000..c51def9 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/railway.zh-CN.mdx @@ -0,0 +1,15 @@ +--- +title: 在 Railway 上部署 LobeChat 数据库版 +description: 学习如何在 Railway 上部署 LobeChat 应用,包括准备 OpenAI API Key、点击按钮进行部署、绑定自定义域名等步骤。 +tags: + - Railway + - 部署 + - LobeChat + - OpenAI + - API Key + - 自定义域名 +--- + +# 使用 Railway 部署 LobeChat 数据库版 + +TODO diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.mdx new file mode 100644 index 0000000..d29b715 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.mdx @@ -0,0 +1,32 @@ +--- +title: Deploy LobeChat with Database on RepoCloud +description: Learn how to deploy LobeChat on RepoCloud with ease, including: database, authentication and S3 storage service. +tags: + - Deploy LobeChat + - RepoCloud Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploying LobeChat Database Edition with RepoCloud + +If you want to deploy LobeChat Database Edition on RepoCloud, you can follow the steps below: + +## RepoCloud Deployment Process + + + ### Prepare your OpenAI API Key + +Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key. + +### One-click to deploy + +[![Deploy to RepoCloud](https://d16t0pc4846x52.cloudfront.net/deploy.svg)](https://repocloud.io/details/?app_id=248) + +### Once deployed, you can start using it + +### Bind a custom domain (optional) + +You can use the subdomain provided by RepoCloud, or choose to bind a custom domain. Currently, the domains provided by RepoCloud have not been contaminated, and most regions can connect directly. + + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.zh-CN.mdx new file mode 100644 index 0000000..00efa59 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/repocloud.zh-CN.mdx @@ -0,0 +1,14 @@ +--- +title: 在 RepoCloud 上部署 LobeChat 数据库版 +description: 学习如何在RepoCloud上部署LobeChat应用,包括准备OpenAI API Key、点击部署按钮、绑定自定义域名等操作。 +tags: + - RepoCloud + - LobeChat + - 部署流程 + - OpenAI API Key + - 自定义域名 +--- + +# 使用 RepoCloud 部署 LobeChat 数据库版 + +TODO diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/sealos.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/sealos.mdx new file mode 100644 index 0000000..92a5135 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/sealos.mdx @@ -0,0 +1,12 @@ +--- +title: Deploy LobeChat on SealOS +description: >- + Learn how to deploy LobeChat on SealOS with ease. Follow the provided steps to + set up LobeChat and start using it efficiently. +tags: + - Deploy LobeChat + - SealOS Deployment + - OpenAI API Key + - Custom Domain Binding +--- + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/sealos.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/sealos.zh-CN.mdx new file mode 100644 index 0000000..f880f45 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/sealos.zh-CN.mdx @@ -0,0 +1,14 @@ +--- +title: 在 SealOS 上部署 LobeChat +description: 学习如何在 SealOS 上部署 LobeChat,包括准备 OpenAI API Key、点击部署按钮、绑定自定义域名等操作。 +tags: + - SealOS + - LobeChat + - OpenAI API Key + - 部署流程 + - 自定义域名 +--- + +# 使用 SealOS 部署 LobeChat 数据库版 + +TODO diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/vercel.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/vercel.mdx new file mode 100644 index 0000000..4861d97 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/vercel.mdx @@ -0,0 +1,428 @@ +--- +title: Deploy LobeChat with database on Vercel +description: >- + Learn how to deploy LobeChat with database on Vercel with ease, including: + database, authentication and S3 storage service. +tags: + - Deploy LobeChat + - Vercel Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploying Server Database Version on Vercel + +This article will detail how to deploy the server database version of LobeChat on Vercel, including: 1) database configuration; 2) identity authentication service configuration; 3) steps for setting up the S3 storage service. + + +Before proceeding, please make sure of the following: + +- Export all data, as after deploying the server-side database, existing user data cannot be automatically migrated and can only be manually imported after backup! +- The `ACCESS_CODE` in the environment variables is either unset or cleared! +- When configuring the environment variables required for the server-side database, make sure to fill in all of them before deployment, otherwise you may encounter database migration issues! + + + +## 1. Configure the Database + + + +### Prepare the Server Database Instance and Obtain the Connection URL + +Before deployment, make sure you have prepared a Postgres database instance. You can choose one 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, and will be distinguished in the next step. + +### Add Environment Variables in Vercel + +In Vercel's deployment environment variables, add `DATABASE_URL` and other environment variables, and fill in the Postgres database connection URL prepared in the previous step. The typical format for the database connection URL is `postgres://username:password@host:port/database`. + + + + + + + Please confirm the `Postgres` type provided by your vendor. If it is `Node Postgres`, switch to + the `Node Postgres` Tab. + + +Variables to be filled for Serverless Postgres are as follows: + +```shell +# Serverless Postgres DB Url +DATABASE_URL= + +# Specify service mode as server, otherwise it will not enter the server-side database +NEXT_PUBLIC_SERVICE_MODE=server +``` + +An example of filling in Vercel is as follows: + +{'Add + + + + + Variables to be filled for Node Postgres are as follows: + +```shell +# Node Postgres DB Url +DATABASE_URL= + +# Specify Postgres database driver as node +DATABASE_DRIVER=node + +# Specify service mode as server, otherwise it will not enter the server-side database +NEXT_PUBLIC_SERVICE_MODE=server +``` + +An example of filling in Vercel is as follows: + +{'Add + + + + + + + If you wish to enable SSL when connecting to the database, please refer to the + [link](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode) + for setup instructions. + + +### Add the `KEY_VAULTS_SECRET` Environment Variable + +After adding the DATABASE_URL environment variable for the database, you need to add a `KEY_VAULTS_SECRET` environment variable. This variable is used to encrypt sensitive information such as apikeys stored by users. You can generate a random 32-character string as the key using `openssl rand -base64 32`. + +```shell +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= +``` + +Make sure to add this to the Vercel environment variables as well. + +### Add the `APP_URL` Environment Variable + +Finally, you need to add the `APP_URL` environment variable, which specifies the URL address of the LobeChat application. + + + +## 2. Configure Authentication Service + +The server-side database needs to be paired with a user authentication service to function properly. Therefore, the corresponding authentication service needs to be configured. + + + +### Prepare Clerk 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 not familiar 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 the above variables to Vercel: + +{'Add + +### Create and Configure Webhook in Clerk + +Since we let Clerk fully handle user authentication and management, we need Clerk to notify our application and store data in the database when there are changes in the user's lifecycle (create, update, delete). We achieve this requirement through 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 information changes. + +{'Add + +Fill in the endpoint with the URL of your Vercel project, such as `https://your-project.vercel.app/api/webhooks/clerk`. Then, subscribe to events by checking the three user events (`user.created`, `user.deleted`, `user.updated`), and click create. + + + The `https://` in the URL is essential to maintain the integrity of the URL. + + + + +> + + + +### Add Webhook Secret to Vercel Environment Variables + +After creation, you can find the secret of this Webhook in the bottom right corner: + + + +> + + + +The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + +Add it to Vercel's environment variables: + +{'Add + + + +By completing these steps, you have successfully configured the Clerk authentication service. Next, we will configure the S3 storage service. + +## 3. Configure S3 Storage Service + +In the server-side database, we need to configure the S3 storage service to store files. + + + 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, Alibaba Cloud + OSS, 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. The following steps will use Cloudflare R2 as an example to explain the creation process. + +The interface of Cloudflare R2 is shown below: + +{'Cloudflare + +When creating a storage 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 +# Storage bucket name +S3_BUCKET=lobechat +# Storage bucket request endpoint (note that the path in this link includes the bucket name, which must be removed, or use the link provided on the S3 API token application page) +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# Public access domain for the storage bucket +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + + + `S3_ENDPOINT` must have its path removed, otherwise uploaded files will not be accessible + + +### 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 and enter the create API Token page. + +{'Create + +Since our server-side database needs to read and write to the S3 storage service, the permission needs to be set to `Object Read and Write`, 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 +``` + +### Adding 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: + + + The `https://` in the URL is essential and must be maintained for the completeness of the URL. + + +```shell +# 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 domain for bucket access +S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com + +# Bucket region, such as us-west-1, generally not required, but some providers may need to configure +# S3_REGION=us-west-1 +``` + +Then, insert the above environment variables into Vercel's environment variables: + +{'Adding + +### Configuring 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 bucket settings: + +{'Cloudflare + +Add a CORS rule to allow requests from your domain (in this case, `https://your-project.vercel.app`): + +{'Configuring + +Example configuration: + +```json +[ + { + "AllowedOrigins": ["https://your-project.vercel.app"], + "AllowedMethods": ["GET", "PUT", "HEAD", "POST", "DELETE"], + "AllowedHeaders": ["*"] + } +] +``` + +After configuring, click save. + + + +## Four, Deployment and Verification + +After completing the steps above, the configuration of the server-side database should be done. Next, we can deploy LobeChat to Vercel and then visit your Vercel link to verify if the server-side 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 successfully configured it. Enjoy using it\~ + + + + + + + +## Appendix + +### Overview of Server-side Database Environment Variables + +For easy copying, here is a summary of the environment variables required to configure the server-side database: + +```shell +APP_URL=https://your-project.com + +# 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 +S3_PUBLIC_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/DigitalHumanWeb/docs/self-hosting/server-database/vercel.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/vercel.zh-CN.mdx new file mode 100644 index 0000000..1586530 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/vercel.zh-CN.mdx @@ -0,0 +1,409 @@ +--- +title: 在 Vercel 上部署 LobeChat 的服务端数据库版本 +description: 本文详细介绍如何在 Vercel 中部署服务端数据库版 LobeChat,包括数据库配置、身份验证服务配置和 S3 存储服务的设置步骤。 +tags: + - 服务端数据库 + - Postgres + - Clerk + - S3存储服务 + - Vercel部署 + - 数据库配置 + - 身份验证服务 + - 环境变量配置 +--- + +# 在 Vercel 上部署服务端数据库版 + +本文将详细介绍如何在 Vercel 中部署服务端数据库版 LobeChat,包括: 1)数据库配置;2)身份验证服务配置;3) S3 存储服务的设置步骤。 + + +进行后续操作前,请务必确认以下事项: + - 导出所有数据,部署服务端数据库后,原有用户数据无法自动迁移,只能提前备份后进行手动导入! + - 环境变量中的`ACCESS_CODE`未设置或已清除! + - 配置服务端数据库所需要的环境变量时,需全部填入后再进行部署,否则可能遭遇数据库迁移问题! + + +## 一、 配置数据库 + + + +### 准备服务端数据库实例,获取连接 URL + +在部署之前,请确保你已经准备好 Postgres 数据库实例,你可以选择以下任一方式: + +- `A.` 使用 Vercel / Neon 等 Serverless Postgres 实例; +- `B.` 使用 Docker 等自部署 Postgres 实例。 + +两者的配置方式略有不同,在下一步会有所区分。 + +### 在 Vercel 中添加环境变量 + +在 Vercel 的部署环境变量中,添加 `DATABASE_URL` 等环境变量,将上一步准备好的 Postgres 数据库连接 URL 填入其中。数据库连接 URL 的通常格式为 `postgres://username:password@host:port/database`。 + + + + + + + 请确认您的供应商所提供的 `Postgres` 类型,若为 `Node Postgres`,请切换到 `Node Postgres` Tab 。 + + + + 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 中填写的示例如下: + + {'添加 + + + + + + + 如果希望连接数据库时启用 SSL + ,请自行参考[链接](https://stackoverflow.com/questions/14021998/using-psql-to-connect-to-postgresql-in-ssl-mode)进行设置 + + +### 添加 `KEY_VAULTS_SECRET` 环境变量 + +在完成数据库 DATABASE_URL 环境变量添加后,需要添加一个 `KEY_VAULTS_SECRET` 环境变量。该变量用于加密用户存储的 apikey 等敏感信息。你可以使用 `openssl rand -base64 32` 生成一个随机的 32 位字符串作为密钥。 + +```shell +KEY_VAULTS_SECRET=jgwsK28dspyVQoIf8/M3IIHl1h6LYYceSYNXeLpy6uk= +``` + +同样需要将其添加到 Vercel 环境变量中。 + +### 添加 `APP_URL` 环境变量 + +该部分最后需要添加 APP_URL 环境变量,用于指定LobeChat 应用的 URL 地址。 + + + +## 二、 配置身份验证服务 + +服务端数据库需要搭配用户身份验证服务才可以正常使用。因此需要配置对应的身份验证服务。 + + + +### 准备 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`),然后点击创建。 + +URL的`https://`不可缺失,须保持URL的完整性 + +{'添加 + +### 将 Webhook 秘钥添加到 Vercel 环境变量 + +创建完毕后,可以在右下角找到该 Webhook 的秘钥: + +{'查看 + +这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`: + +```shell +CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx +``` + +将其添加到 Vercel 的环境变量中: + +{'在 + + + +这样,你已经成功配置了 Clerk 身份验证服务。接下来我们将配置 S3 存储服务。 + +## 三、 配置 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 API token 页面所提供的链接) +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com +``` + +`S3_ENDPOINT`必须删除其路径,否则会无法访问所上传文件 + + ### 获取 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 服务商获取所需环境变量的步骤可能有所不同,但最终获得到的环境变量应该都是一致的: + +URL的`https://`不可缺失,须保持URL的完整性 + +```shell +# S3 秘钥 +S3_ACCESS_KEY_ID=9998d6757e276cf9f1edbd325b7083a6 +S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f497ac2 + +# 存储桶的名称 +S3_BUCKET=lobechat +# 存储桶的请求端点 +S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com +# 存储桶对外的访问域名 +S3_PUBLIC_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 +APP_URL=https://your-project.com + +# 指定服务模式为 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 +# 存储桶对外的访问域名 +S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com +# 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置 +# S3_REGION=us-west-1 +``` diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.mdx new file mode 100644 index 0000000..d7b99d3 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.mdx @@ -0,0 +1,82 @@ +--- +title: Deploying LobeChat Database on Zeabur +description: >- + Learn how to deploy LobeChat on Zeabur with ease. Follow the provided steps to + set up your chat application seamlessly. +tags: + - Deploy LobeChat + - Zeabur Deployment + - OpenAI API Key + - Custom Domain Binding +--- + +# Deploying LobeChat Database on Zeabur + + + This article assumes that you are familiar with the basic principles and processes of deploying + the LobeChat server database version, so it only includes content related to core environment + variable configuration. If you are not familiar with the deployment principles of the LobeChat + server database version, please refer to [Deploying Server + Database](/docs/self-hosting/server-database) first. + + +The template on Zeabur includes 4 services: +- Logto for authrization. +- PostgreSQL with Vector plugin for data storage and indexing. +- MinIO for image storage. +- LobeChat database version. + +## Deploying on Zeabur + +Here is the process for deploying the LobeChat server database version on Zeabur: + + + +### Go to the template page on Zeabur + +Go to the [LobeChat Database template page](https://zeabur.com/templates/RRSPSD) on Zeabur and click on the "Deploy" button. + +### Fill in the required environment variables + +After you click on the "Deploy" button, you will see a modal pop-up where you can fill in the required environment variables. + +Here are the environment variables you need to fill in: + +- OpenAI API key: Your OpenAI API key to get responses from OpenAI. + +- LobeChat Domain: A free subdomain with `.zeabur.app` suffix. + +- MinIO Public Domain: A free subdomain with `.zeabur.app` suffix for yout MinIO web port to enable public access for the uploaded files. + +- Logto Console Domain: A free subdomain with `.zeabur.app` suffix for your Logto console. + +- Logto API Domain: A free subdomain with `.zeabur.app` suffix for your Logto api. + + +### Select a region and deploy + +After you fill all the required environment variables, select a region where you want to deploy your LobeChat Database and click on the "Deploy" button. + +You will see another modal pop-up where you can see the deployment progress. + +### Configure Logto + +After the deployment is done, you need to configure your Logto service to enable authrization. + +Access your Logto console with the console domain you just binded, and then create a `Next.js 14(App router)` application to get the client ID and client secret, and fill in the cors and callback URLs. +You can check [this document](../advanced/auth.mdx) for a more detailed guide. + +Fill in those variables into your LobeChat service on Zeabur, here is a more detailed guide for [editing environment variables on Zeabur](https://zeabur.com/docs/deploy/variables). + +``` +LOGTO_CLIENT_ID=your_logto_client_id +LOGTO_CLIENT_SECRET=your_logto_client_secret +``` + +### Access your LobeChat Instance + +Press on the `LobeChat-Database` and you can see the public domain you just created, click on it to access your LobeChat Database. + +You can also bind a custom domain for your services if you want, here is a guide on how to [bind a custom domain on Zeabur](https://zeabur.com/docs/deploy/domain-binding). + + diff --git a/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.zh-CN.mdx new file mode 100644 index 0000000..9057e7a --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/server-database/zeabur.zh-CN.mdx @@ -0,0 +1,70 @@ +--- +title: 在 Zeabur 上部署 LobeChat +description: 按照指南准备 OpenAI API Key 并点击按钮进行部署。在部署完成后,即可开始使用 LobeChat 并选择是否绑定自定义域名。 +tags: + - Zeabur + - LobeChat + - OpenAI API Key + - 部署流程 + - 自定义域名 +--- + +# 使用 Zeabur 部署 LobeChat 数据库版 + + + 本文假设你已经熟悉 LobeChat + 服务器数据库版的部署基本原理和流程,因此只包含与核心环境变量配置相关的内容。如果你对 LobeChat + 服务器数据库版的部署原理不熟悉,请先参考[部署服务器数据库](/zh/docs/self-hosting/server-database)。 + + +在 Zeabur 的模板中总共包含有以下四个服务: +- Logto 提供身份校验 +- 带有 Vector 插件的 PostgreSQL 来做数据存储和向量化 +- MinIO 作为对象存储 +- LobeChat Database 的实例 + +## 在 Zeabur 上部署 + +这里是在 Zeabur 上部署 LobeChat 服务器数据库版的流程: + + + +### 前往 Zeabur 上的模板页面 + +前往 [Zeabur 上的 LobeChat 数据库模板页面](https://zeabur.com/templates/RRSPSD) 并点击 "Deploy" 按钮。 + +### 填写必要的环境变量 + +在你点击“部署“按钮后,你会看到一个模态弹窗,你可以在这里填写必要的环境变量。 + +以下是你需要填写的环境变量: + +- OpenAI API key: 你的 OpenAI API key 用于获取模型的访问权限。 +- LobeChat Domain: 一个免费的 `.zeabur.app` 后缀的域名。 +- MinIO Public Domain: 一个免费的 `.zeabur.app` 后缀的域名为了暴露 MinIO 服务以公开访问资源。 +- Logto Console Domain: 一个免费的 `.zeabur.app` 后缀的域名来访问 Logto 的控制台。 +- Logto API Domain: 一个免费的 `.zeabur.app` 后缀的域名来访问 Logto 的 API。 + +### 选择一个区域并部署 + +在你填写完所有必要的环境变量后,选择一个你想要部署 LobeChat 数据库的区域并点击“部署”按钮。 + +你会看到另一个模态弹窗,你可以在这里看到部署的进度。 + +### 配置 Logto + +当部署完成后,你会被自动导航到你在 Zeabur 控制台上刚刚创建的项目。 +你需要再进一步配置你的 Logto 服务。 + +使用你刚绑定的域名来访问你的 Logto 控制台,创建一个新项目以获得对应的客户端 ID 与密钥,将它们填入你的 LobeChat 服务的变量中。 +关于如何填入变量,可以参照 [Zeabur 的官方文档](https://zeabur.com/docs/deploy/variables)。 + +Logto 的详细配置可以参考[这篇文档](../advanced/auth.zh-CN.mdx)。 + +### 访问你的 LobeChat + +按下 `LobeChat-Database` 你会看到你刚刚创建的公共域名,点击它以访问你的 LobeChat 数据库。 + +你可以选择绑定一个自定义域名,这里有一个关于如何在 Zeabur 上[绑定自定义域名](https://zeabur.com/docs/deploy/domain-binding)的指南。 + + diff --git a/DigitalHumanWeb/docs/self-hosting/start.mdx b/DigitalHumanWeb/docs/self-hosting/start.mdx new file mode 100644 index 0000000..b56d9c1 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/start.mdx @@ -0,0 +1,35 @@ +--- +title: Build Your Own LobeChat - Choose Your Deployment Platform +description: >- + Explore multiple deployment platforms like Vercel, Docker, Docker Compose, and + more to deploy LobeChat. Choose the platform that best suits your needs. +tags: + - Lobe Chat + - Deployment Platform + - Vercel + - Docker + - Docker Compose +--- +# Build Your Own Lobe Chat + +LobeChat supports various deployment platforms, including Vercel, Docker, and Docker Compose. You can choose a deployment platform that suits you to build your own Lobe Chat. + +## Quick Deployment + +For users who are new to LobeChat, we recommend using the client-side database mode for quick deployment. The advantage of this mode is that deployment can be quickly completed with just one command/button, making it easy for you to quickly get started and experience LobeChat. + +You can follow the guide below for quick deployment of LobeChat: + + + + + In the client-side database mode, data is stored locally on the user's device, without cross-device synchronization, and does not support advanced features such as file uploads and knowledge base. + + +## Advanced Mode: Server-Side Database + +For users who are already familiar with LobeChat or need cross-device synchronization, you can deploy a version with a server-side database to access a more complete and powerful LobeChat. + + + + diff --git a/DigitalHumanWeb/docs/self-hosting/start.zh-CN.mdx b/DigitalHumanWeb/docs/self-hosting/start.zh-CN.mdx new file mode 100644 index 0000000..26c31a9 --- /dev/null +++ b/DigitalHumanWeb/docs/self-hosting/start.zh-CN.mdx @@ -0,0 +1,37 @@ +--- +title: 构建属于自己的 LobeChat - 自选部署平台 +description: >- + 选择适合自己的部署平台,构建个性化的 Lobe Chat。支持 Docker、Docker + Compose、Netlify、Railway、Repocloud、SealOS、Vercel 和 Zeabur 部署。 +tags: + - Lobe Chat + - 部署平台 + - Docker + - Netlify + - Vercel + - 个性化 +--- + +# 构建属于自己的 Lobe Chat + +LobeChat 支持多种部署平台,包括 Vercel、Docker 和 Docker Compose 等,你可以选择适合自己的部署平台进行部署,构建属于自己的 Lobe Chat。 + +## 快速部署 + +对于第一次了解 LobeChat 的用户,我们推荐使用客户端数据库的模式快速部署,该模式的优势是一行指令/一个按钮即可快捷完成部署,便于你快速上手与体验 LobeChat。 + +你可以通过以下指南快速部署 LobeChat: + + + + + 客户端数据库模式下数据均保留在用户本地,不会跨多端同步,也不支持文件上传、知识库等进阶功能。 + + +## 进阶模式:服务端数据库 + +针对已经了解 LobeChat 的用户,或需要多端同步的用户,可以自行部署带有服务端数据库的版本,进而获得更完整、功能更强大的 LobeChat。 + + + + diff --git a/DigitalHumanWeb/docs/usage/agents/agent-organization.mdx b/DigitalHumanWeb/docs/usage/agents/agent-organization.mdx new file mode 100644 index 0000000..477dccc --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/agent-organization.mdx @@ -0,0 +1,69 @@ +--- +title: Efficiently Organize Your AI Assistants with LobeChat +description: >- + Learn how to use LobeChat's grouping, search, and pinning functions to + efficiently organize and locate your AI assistants. +tags: + - LobeChat + - AI assistants + - assistant organization + - grouping + - search function + - pinning function +--- + +# Assistant Organization Guide + +{'Assistant + +LobeChat provides a rich variety of AI assistant resources. Users can easily add various assistants through the assistant market, offering a wide range of application scenarios for AI applications. + +When you have added a large number of assistants, finding a specific assistant in the list may become challenging. LobeChat provides `search`, `grouping`, and `pinning` functions to help you better organize assistants and improve efficiency in locating them. + +## Assistant Grouping + +Firstly, LobeChat's AI assistants support organization through grouping. You can categorize assistants of the same type together and easily search for the required assistants by collapsing and expanding groups. + +### Assistant Settings + +{'Assistant + +- In the menu of an individual assistant, selecting the `Move to Group` option can quickly categorize the assistant into the specified group. +- If you don't find the group you want, you can choose `Add Group` to quickly create a new group. + +### Group Settings + +{'Group + +- In the group menu, you can quickly create a new assistant under that group. +- Clicking the `Group Management` button allows you to `rename`, `delete`, `sort`, and perform other operations on all groups. + +## Assistant Search + +{'Assistant + +- At the top of the assistant list, you can use the assistant search function to easily locate the assistant you need using keywords. + +## Assistant Pinning + +{'Assistant + +- In the assistant menu, you can use the `Pin` function to pin the assistant to the top. +- After pinning an assistant, a pinned area will appear at the top of the assistant list, displaying all pinned assistants. +- For pinned assistants, you can choose `Unpin` to remove them from the pinned area. diff --git a/DigitalHumanWeb/docs/usage/agents/agent-organization.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/agent-organization.zh-CN.mdx new file mode 100644 index 0000000..5ce6aa5 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/agent-organization.zh-CN.mdx @@ -0,0 +1,67 @@ +--- +title: LobeChat 助手组织指南 - 提升助手管理效率 +description: 了解如何通过分组、搜索和固定功能更好地组织 LobeChat 的 AI 助手,提升助手管理效率和定位效率。 +tags: + - LobeChat + - AI 助手 + - 助手组织 + - 分组设置 + - 助手搜索 + - 助手固定 +--- + +# 助手组织指南 + +{'助手组织'} + +LobeChat 提供了丰富的 AI 助手资源,用户可以通过助手市场方便地添加各类助手,为 AI 应用提供了广泛的应用场景。 + +当你添加了大量助手后,在列表中寻找特定助手可能会变得比较困难。LobeChat 提供了`搜索`、`分组`和`固定`功能,帮助您更好地组织助手,提升定位效率。 + +## 助手分组 + +首先 LobeChat 的 AI 助手支持以分组的方式进行组织。你可以将同类型的助手归类到一起,并通过折叠和展开分组的方式方便地查询所需助手。 + +### 助手设置 + +{'助手分组'} + +- 在单个助手的菜单中,选择`移动到分组`选项可以快速将该助手归类到指定分组。 +- 如果没有你想要的分组,可以选择`添加分组`,快速创建一个新的分组。 + +### 分组设置 + +{'分组菜单'} + +- 在分组菜单中,可以快速在该分组下新建助手 +- 点击`分组管理`按钮可以对所有分组进行`重命名`、`删除`、`排序`等操作。 + +## 助手搜索 + +{'助手搜索'} + +- 在助手列表的顶部,您可以通过助手搜索功能,方便地使用关键词定位到您所需的助手。 + +## 助手固定 + +{'助手固定'} + +- 在助手菜单中,你可以使用`固定`功能将该助手固定在顶部。 +- 固定助手后,助手列表的上方将出现一个固定区域,显示所有已固定的助手列表。 +- 对于已固定的助手,你可以选择`解除固定`,将其移出固定区域。 diff --git a/DigitalHumanWeb/docs/usage/agents/concepts.mdx b/DigitalHumanWeb/docs/usage/agents/concepts.mdx new file mode 100644 index 0000000..3589579 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/concepts.mdx @@ -0,0 +1,41 @@ +--- +title: Improving User Interaction Efficiency with Agents in LobeChat +description: >- + Discover how LobeChat's innovative approach with Agents enhances user + experience by providing dedicated functional modules for efficient task + handling and quick access to historical conversations. +tags: + - LobeChat + - Agents + - User Interaction Efficiency + - Task Handling + - Historical Conversations +--- + +# Topics and Assistants + +## ChatGPT and "Topics" + +In the official ChatGPT application, there is only the concept of "topics." As shown in the image, the user's historical conversation topics are listed in the sidebar. + +{'ChatGPT + +However, in our usage, we have found that this model has many issues. For example, the information indexing of historical conversations is too scattered. Additionally, when dealing with repetitive tasks, it is difficult to have a stable entry point. For instance, if I want ChatGPT to help me translate a document, in this model, I would need to constantly create new topics and then set up the translation prompt I had previously created. When there are high-frequency tasks, this will result in a very inefficient interaction format. + +## Topics and "Agent" + +Therefore, in LobeChat, we have introduced the concept of **Agents**. An agent is a complete functional module, each with its own responsibilities and tasks. Assistants can help you handle various tasks and provide professional advice and guidance. + +{'Topics + +At the same time, we have integrated topics into each agent. The benefit of this approach is that each agent has an independent topic list. You can choose the corresponding agent based on the current task and quickly switch between historical conversation records. This method is more in line with users' habits in common chat software, improving interaction efficiency. diff --git a/DigitalHumanWeb/docs/usage/agents/concepts.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/concepts.zh-CN.mdx new file mode 100644 index 0000000..d76dcad --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/concepts.zh-CN.mdx @@ -0,0 +1,38 @@ +--- +title: 在 LobeChat 中进行话题与助手的革新 +description: 了解 LobeChat 中的话题与助手概念,如何提高用户交互效率并解决历史对话信息索引分散的问题。 +tags: + - LobeChat + - 话题与助手 + - 交互效率 + - 历史对话记录 + - 信息索引 +--- + +# 话题与助手 + +## ChatGPT 与「话题」 + +在 ChatGPT 官方应用中,只存在话题的概念,如图所示,在侧边栏中是用户的历史对话话题列表。 + +{'ChatGPT + +但在我们的使用过程中其实会发现这种模式存在很多问题,比如历史对话的信息索引过于分散问题,同时当处理一些重复任务时很难有一个稳定的入口,比如我希望有一个稳定的入口可以让 ChatGPT 帮助我翻译文档,在这个模式下,我需要不断新建新的话题同时再设置我之前创建好的翻译 Prompt 设定,当有高频任务存在时,这将是一个效率很低的交互形式。 + +## 「话题」与「助手」 + +因此在 LobeChat 中,我们引入了 **助手** 的概念。助手是一个完整的功能模块,每个助手都有自己的职责和任务。助手可以帮助你处理各种任务,并提供专业的建议和指导。 + +{'「话题」与「助手」'} + +与此同时,我们将话题索引到每个助手内部。这样做的好处是,每个助手都有一个独立的话题列表,你可以根据当前任务选择对应的助手,并快速切换历史对话记录。这种方式更符合用户对常见聊天软件的使用习惯,提高了交互的效率。 diff --git a/DigitalHumanWeb/docs/usage/agents/custom-agent.mdx b/DigitalHumanWeb/docs/usage/agents/custom-agent.mdx new file mode 100644 index 0000000..c34eac5 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/custom-agent.mdx @@ -0,0 +1,58 @@ +--- +title: Custom LobeChat Assistant Guide - Adding and Iterating Assistants +description: >- + Learn how to add assistants to your favorites list in LobeChat through the + role market or by creating custom assistants. Explore detailed steps for + creating custom assistants and quick setup tips. +tags: + - LobeChat + - Adding Assistants + - Custom Assistant + - Role Market + - Creating Assistants + - Assistant Configuration +--- + +# Custom Assistant Guide + +As the basic functional unit of LobeChat, adding and iterating assistants is very important. Now you can add assistants to your favorites list in two ways. + +## `A` Add through the role market + +If you are a beginner in Prompt writing, you might want to browse the assistant market of LobeChat first. Here, you can find commonly used assistants submitted by others and easily add them to your list with just one click, which is very convenient. + +{'Add + +## `B` Create a custom assistant + +When you need to handle specific tasks, you need to consider creating a custom assistant to help you solve the problem. You can add and configure the assistant in detail in the following ways. + + + {'Create + + {'Create + + + + **Quick Setup Tip**: You can conveniently modify the Prompt through the quick edit button in the + sidebar. + + + + {'Create + + {'Create + + +If you want to understand Prompt writing tips and common model parameter settings, you can continue to view: + + + + + + diff --git a/DigitalHumanWeb/docs/usage/agents/custom-agent.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/custom-agent.zh-CN.mdx new file mode 100644 index 0000000..2011e07 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/custom-agent.zh-CN.mdx @@ -0,0 +1,53 @@ +--- +title: LobeChat 自定义助手指南 - 添加和配置助手的最佳方法 +description: 了解如何通过角色市场或新建自定义助手将助手添加到你的常用列表中。快捷设置技巧和常见的模型参数设置也包括在内。 +tags: + - 自定义助手 + - LobeChat + - 添加助手 + - 配置助手 + - 角色市场 + - 快捷设置 + - 模型参数设置 +--- + +# 自定义助手指南 + +作为 LobeChat 的基础职能单位,助手的添加和迭代是非常重要的。现在你可以通过两种方式将助手添加到你的常用列表中 + +## `A` 通过角色市场添加 + +如果你是一个 Prompt 编写的新手,不妨先浏览一下 LobeChat 的助手市场。在这里,你可以找到其他人提交的常用助手,并且只需一键添加到你的列表中,非常方便。 + +{'通过角色市场添加'} + +## `B` 通过新建自定义助手 + +当你需要处理一些特定的任务时,你就需要考虑创建一个自定义助手来帮助你解决问题。可以通过以下方式添加并进行助手的详细配置 + + + {'通过新建自定义助手 + + {'通过新建自定义助手 + + +**快捷设置技巧**: 可以通过侧边栏的快捷编辑按钮进行 Prompt 的便捷修改 + + + {'通过新建自定义助手 + + {'通过新建自定义助手 + + +如果你希望理解 Prompt 编写技巧和常见的模型参数设置,可以继续查看: + + + + + + diff --git a/DigitalHumanWeb/docs/usage/agents/model.mdx b/DigitalHumanWeb/docs/usage/agents/model.mdx new file mode 100644 index 0000000..57f3504 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/model.mdx @@ -0,0 +1,79 @@ +--- +title: LobeChat Model Config Guide +description: >- + Explore the capabilities of ChatGPT models from gpt-3.5-turbo to gpt-4-32k, + understanding their speed, context limits, and cost. Learn about model + parameters like temperature and top-p for better output. +tags: + - ChatGPT Models + - Model Parameters + - Neural Networks + - Language Understanding + - Generation Capabilities +--- + +# Model Guide + +## ChatGPT + +- **gpt-3.5-turbo**: Currently the fastest generating ChatGPT model, it is faster but may sacrifice some text quality, with a context length of 4k. +- **gpt-4**: ChatGPT 4.0 has improved language understanding and generation capabilities compared to 3.5. It can better understand context and context, and generate more accurate and natural responses. This is thanks to improvements in the GPT-4 model, including better language modeling and deeper semantic understanding, but it may be slower than other models, with a context length of 8k. +- **gpt-4-32k**: Similar to gpt-4, the context limit is increased to 32k tokens, with a higher cost. + +## Concept of Model Parameters + +LLM seems magical, but it is essentially a probability problem. The neural network generates a bunch of candidate words from the pre-trained model based on the input text and selects the high-probability ones as output. Most of the related parameters are associated with sampling (i.e., how to select the output from the candidate words). + +### `temperature` + +This parameter controls the randomness of the model's output. The higher the value, the greater the randomness. Generally, when the same prompt is input multiple times, the model's output varies each time. + +- Set to 0: Generates a fixed output for each prompt +- Lower values: More concentrated and deterministic output +- Higher values: More random output (more creative) + + + Generally, the longer and clearer the prompt, the better the quality and confidence of the model's + output. In such cases, the temperature value can be adjusted appropriately. Conversely, if the + prompt is short and ambiguous, setting a relatively high temperature value will result in unstable + model output. + + +
+ +### `top_p` + +Top_p is also a sampling parameter, but it differs from temperature in its sampling method. Before outputting, the model generates a bunch of tokens, and these tokens are ranked based on their quality. In the top-p sampling mode, the candidate word list is dynamic, and tokens are selected from the tokens based on a percentage. Top_p introduces randomness in token selection, allowing other high-scoring tokens to have a chance of being selected, rather than always choosing the highest-scoring one. + + + Top\_p is similar to randomness, and it is generally not recommended to change it together with + the randomness of temperature. + + +
+ +### `presence_penalty` + +The presence penalty parameter can be seen as a punishment for repetitive content in the generated text. When this parameter is set high, the generation model will try to avoid producing repeated words, phrases, or sentences. Conversely, if the presence penalty parameter is set low, the generated text may contain more repetitive content. By adjusting the value of the presence penalty parameter, control over the originality and diversity of the generated text can be achieved. The importance of this parameter is mainly reflected in the following aspects: + +- Enhancing the originality and diversity of the generated text: In certain applications, such as creative writing or generating news headlines, it is necessary for the generated text to have high originality and diversity. By increasing the value of the presence penalty parameter, the amount of repeated content in the generated text can be effectively reduced, thereby enhancing its originality and diversity. +- Preventing the generation of loops and meaningless content: In some cases, the generation model may produce repetitive or meaningless text that usually fails to convey useful information. By appropriately increasing the value of the presence penalty parameter, the probability of generating such meaningless content can be reduced, thereby improving the readability and practicality of the generated text. + + + It is worth noting that the presence penalty parameter, in conjunction with other parameters such + as temperature and top-p, collectively influences the quality of the generated text. Compared to + other parameters, the presence penalty parameter primarily focuses on the originality and + repetitiveness of the text, while the temperature and top-p parameters more significantly affect + the randomness and determinism of the generated text. By adjusting these parameters reasonably, + comprehensive control over the quality of the generated text can be achieved. + + +### `frequency_penalty` + +It is a mechanism that penalizes frequently occurring new vocabulary in the text to reduce the likelihood of the model repeating the same word. The larger the value, the more likely it is to reduce repeated words. + +- `-2.0` When the morning news started broadcasting, I found that my TV now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now now **(The highest frequency word is "now", accounting for 44.79%)** +- `-1.0` He always watches the news in the early morning, in front of the TV watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch watch **(The highest frequency word is "watch", accounting for 57.69%)** +- `0.0` When the morning sun poured into the small diner, a tired postman appeared at the door, carrying a bag of letters in his hands. The owner warmly prepared a breakfast for him, and he started sorting the mail while enjoying his breakfast. **(The highest frequency word is "of", accounting for 8.45%)** +- `1.0` A girl in deep sleep was woken up by a warm ray of sunshine, she saw the first ray of morning light, surrounded by birdsong and flowers, everything was full of vitality. \_ (The highest frequency word is "of", accounting for 5.45%) +- `2.0` Every morning, he would sit on the balcony to have breakfast. Under the soft setting sun, everything looked very peaceful. However, one day, when he was about to pick up his breakfast, an optimistic little bird flew by, bringing him a good mood for the day. \_ (The highest frequency word is "of", accounting for 4.94%) diff --git a/DigitalHumanWeb/docs/usage/agents/model.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/model.zh-CN.mdx new file mode 100644 index 0000000..95264e4 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/model.zh-CN.mdx @@ -0,0 +1,74 @@ +--- +title: ChatGPT 模型指南:参数概念与应用 +description: >- + 了解 ChatGPT 模型的不同版本及参数概念,包括 temperature、top_p、presence_penalty 和 + frequency_penalty。 +tags: + - ChatGPT + - 模型指南 + - 参数概念 + - LLM + - 生成模型 +--- + +# 模型指南 + +## ChatGPT + +- **gpt-3.5-turbo**:目前最生成速度最快的 chatgpt 模型更快,但可能会牺牲一些生成文本的质量,上下文长度为 4k。 +- **gpt-4**:ChatGPT 4.0 在语言理解和生成能力方面相对于 3.5 有所提升。它可以更好地理解上下文和语境,并生成更准确、自然的回答。这得益于 GPT-4 模型的改进,包括更好的语言建模和更深入的语义理解,但它的速度可能比其他模型慢,上下文长度为 8k。 +- **gpt-4-32k**:同 gpt-4,上下文限制增加到 32k token,同时费率更高。 + +## 模型参数概念 + +LLM 看似很神奇,但本质还是一个概率问题,神经网络根据输入的文本,从预训练的模型里面生成一堆候选词,选择概率高的作为输出,相关的参数,大多都是跟采样有关(也就是要如何从候选词里选择输出)。 + +### `temperature` + +用于控制模型输出的结果的随机性,这个值越大随机性越大。一般我们多次输入相同的 prompt 之后,模型的每次输出都不一样。 + +- 设置为 0,对每个 prompt 都生成固定的输出 +- 较低的值,输出更集中,更有确定性 +- 较高的值,输出更随机(更有创意 ) + + + 一般来说,prompt 越长,描述得越清楚,模型生成的输出质量就越好,置信度越高,这时可以适当调高 + temperature 的值;反过来,如果 prompt 很短,很含糊,这时再设置一个比较高的 temperature + 值,模型的输出就很不稳定了。 + + +
+ +### `top_p` + +核采样 top_p 也是采样参数,跟 temperature 不一样的采样方式。模型在输出之前,会生成一堆 token,这些 token 根据质量高低排名,核采样模式中候选词列表是动态的,从 tokens 里按百分比选择候选词。 top_p 为选择 token 引入了随机性,让其他高分的 token 有被选择的机会,不会总是选最高分的。 + +top\_p 与随机性类似,一般来说不建议和随机性 temperature 一起更改 + +
+ +### `presence_penalty` + +Presence Penalty 参数可以看作是对生成文本中重复内容的一种惩罚。当该参数设置较高时,生成模型会尽量避免产生重复的词语、短语或句子。相反,如果 Presence Penalty 参数较低,则生成的文本可能会包含更多重复的内容。通过调整 Presence Penalty 参数的值,可以实现对生成文本的原创性和多样性的控制。参数的重要性主要体现在以下几个方面: + +- 提高生成文本的独创性和多样性:在某些应用场景下,如创意写作、生成新闻标题等,需要生成的文本具有较高的独创性和多样性。通过增加 Presence Penalty 参数的值,可以有效减少生成文本中的重复内容,从而提高文本的独创性和多样性。 +- 防止生成循环和无意义的内容:在某些情况下,生成模型可能会产生循环、重复的文本,这些文本通常无法传达有效的信息。通过适当增加 Presence Penalty 参数的值,可以降低生成这类无意义内容的概率,提高生成文本的可读性和实用性。 + + + 值得注意的是,Presence Penalty 参数与其他参数(如 Temperature 和 + top-p)共同影响着生成文本的质量。对比其他参数,Presence Penalty + 参数主要关注文本的独创性和重复性,而 Temperature 和 top-p + 参数则更多地影响着生成文本的随机性和确定性。通过合理地调整这些参数,可以实现对生成文本质量的综合控制 + + +
+ +### `frequency_penalty` + +是一种机制,通过对文本中频繁出现的新词汇施加惩罚,以减少模型重复同一词语的可能性,值越大,越有可能降低重复字词。 + +- `-2.0` 当早间新闻开始播出,我发现我家电视现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在现在 _(频率最高的词是 “现在”,占比 44.79%)_ +- `-1.0` 他总是在清晨看新闻,在电视前看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看看 _(频率最高的词是 “看”,占比 57.69%)_ +- `0.0` 当清晨的阳光洒进小餐馆时,一名疲倦的邮递员出现在门口,他的手中提着一袋信件。店主热情地为他准备了一份早餐,他在享用早餐的同时开始整理邮件。**(频率最高的词是 “的”,占比 8.45%)** +- `1.0` 一个深度睡眠的女孩被一阵温暖的阳光唤醒,她看到了早晨的第一缕阳光,周围是鸟语花香,一切都充满了生机。_(频率最高的词是 “的”,占比 5.45%)_ +- `2.0` 每天早上,他都会在阳台上坐着吃早餐。在柔和的夕阳照耀下,一切看起来都非常宁静。然而有一天,当他准备端起早餐的时候,一只乐观的小鸟飞过,给他带来了一天的好心情。 _(频率最高的词是 “的”,占比 4.94%)_ diff --git a/DigitalHumanWeb/docs/usage/agents/prompt.mdx b/DigitalHumanWeb/docs/usage/agents/prompt.mdx new file mode 100644 index 0000000..6d38cf6 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/prompt.mdx @@ -0,0 +1,110 @@ +--- +title: >- + Guide to Using Prompts in LobeChat - How to Write Effective Instructions for + Generative AI +description: >- + Learn the basic concepts of prompts and how to write well-structured and + effective instructions for generative AI. Improve the quality and + effectiveness of prompts to guide AI models accurately. +tags: + - Generative AI + - Prompts + - Writing Instructions + - Structured Prompts + - Improving AI Output +--- + +# Guide to Using Prompts + +## Basic Concepts of Prompts + +Generative AI is very useful, but it requires human guidance. In most cases, generative AI can be as capable as a new intern at a company, but it needs clear instructions to perform well. The ability to guide generative AI correctly is a very powerful skill. You can guide generative AI by sending a prompt, which is usually a text instruction. A prompt is the input provided to the assistant, and it will affect the output. A good prompt should be structured, clear, concise, and directive. + +## How to Write a Well-Structured Prompt + + + A structured prompt refers to the construction of the prompt having a clear logic and structure. + For example, if you want the model to generate an article, your prompt may need to include the + article's topic, outline, and style. + + +Let's look at a basic discussion prompt example: + +> _"What are the most urgent environmental issues facing our planet, and what actions can individuals take to help address these issues?"_ + +We can convert it into a simple prompt for the assistant to answer the following questions: placed at the front. + +```prompt +Answer the following questions: +What are the most urgent environmental issues facing our planet, and what actions can individuals take to help address these issues? +``` + +Since the results generated by this prompt are not consistent, some are only one or two sentences. A typical discussion response should have multiple paragraphs, so these results are not ideal. A good prompt should provide **specific formatting and content instructions**. You need to eliminate ambiguity in the language to improve consistency and quality. Here is a better prompt. + +```prompt +Write a highly detailed paper, including an introduction, body, and conclusion, to answer the following questions: +What are the most urgent environmental issues facing our planet, +and what actions can individuals take to help address these issues? +``` + +The second prompt generates longer output and better structure. The use of the term "paper" in the prompt is intentional, as the assistant can understand the definition of a paper, making it more likely to generate coherent, structured responses. + +## How to Improve Quality and Effectiveness + + + There are several ways to improve the quality and effectiveness of prompts: + +- **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. + +A simple method of iteration is to generate multiple outputs and review them to understand the concepts and structures being used. Once the outputs have been evaluated, you can select the most suitable ones and combine them into a coherent response. Another iterative method is to start small and **gradually expand**. This requires more than one prompt: an initial prompt for drafting the initial one or two paragraphs, followed by additional prompts to expand on the content already written. Here is a potential philosophical discussion prompt: + +> _"Is mathematics an invention or a discovery? Use careful reasoning to explain your answer."_ + +Add it to a simple prompt as follows: + +```prompt +Write an opening paragraph to answer the following question: +Is mathematics an invention or a discovery? Use careful reasoning to explain your answer. +``` + +After generating some responses, we found one that we like: + +```prompt +Philosophers and mathematicians have long debated whether mathematics is an invention or a discovery. +Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered discovered rather than invented. +For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied. +``` + +It's a good start. Then, use another prompt to expand: + +```prompt +I am writing a detailed essay to answer the following prompt: +Is mathematics an invention or a discovery? Use careful reasoning to explain your answer. Here is my current situation: Philosophers and mathematicians have long debated whether mathematics is an invention or a discovery. +Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered discovered rather than invented. +For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied. Write the next paragraph of my essay. +``` + +I used this prompt to generate several extensions and selected one that I liked, resulting in the following: + +```prompt +Philosophers and mathematicians have long debated whether mathematics is invented or discovered. +Some argue that the concepts and principles of mathematics exist independently of human thought, and therefore can be considered to be discovered rather than invented. +For example, the concepts of numbers, ratios, and geometric shapes are observed in the natural world and can be abstracted and systematically studied. +On the other hand, some believe that mathematics is largely an invention of human thought. +Mathematical principles are based on logical reasoning, which is a characteristic of human thought. +For instance, Euclidean geometry is based on abstract axioms and premises, accepted as true without the need for proof. +Therefore, geometry can be considered an invention of human thought rather than a discovery. +Similarly, mathematical formulas and equations are used to model and predict physical phenomena, which are the result of human reasoning. +``` + +Using the prompt extensions, we can iteratively write and iterate at each step. This is very useful for situations that require **generating higher quality output and incremental modifications**. + +## Further Reading + +- **Learn Prompting**: [https://learnprompting.org/en-US/docs/intro](https://learnprompting.org/en-US/docs/intro) diff --git a/DigitalHumanWeb/docs/usage/agents/prompt.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/prompt.zh-CN.mdx new file mode 100644 index 0000000..3157892 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/prompt.zh-CN.mdx @@ -0,0 +1,106 @@ +--- +title: 如何通过 LobeChat 写好结构化 Prompt - 提高生成式 AI 输出质量的关键 +description: 学习如何撰写结构化 Prompt 可以提高生成式 AI 输出的质量和效果。本文介绍了撰写有效 Prompt 的方法和技巧,以及如何逐步扩展和优化生成的结果。 +tags: + - 结构化 Prompt + - 生成式AI + - 提高输出质量 + - 撰写技巧 + - 逐步扩展 +--- + +# Prompt 使用指南 + +## Prompt 基本概念 + +生成式 AI 非常有用,但它需要人类指导。通常情况下,生成式 AI 能就像公司新来的实习生一样,非常有能力,但需要清晰的指示才能做得好。能够正确地指导生成式 AI 是一项非常强大的技能。你可以通过发送一个 prompt 来指导生成式 AI,这通常是一个文本指令。Prompt 是向助手提供的输入,它会影响输出结果。一个好的 Prompt 应该是结构化的,清晰的,简洁的,并且具有指向性。 + +## 如何写好一个结构化 prompt + + + 结构化 prompt 是指 prompt 的构造应该有明确的逻辑和结构。例如,如果你想让模型生成一篇文章,你的 + prompt 可能需要包括文章的主题,文章的大纲,文章的风格等信息。 + + +让我们看一个基本的讨论问题的例子: + +> _"我们星球面临的最紧迫的环境问题是什么,个人可以采取哪些措施来帮助解决这些问题?"_ + +我们可以将其转化为简单的助手提示,将回答以下问题:放在前面。 + +```prompt +回答以下问题: +我们星球面临的最紧迫的环境问题是什么,个人可以采取哪些措施来帮助解决这些问题? +``` + +由于这个提示生成的结果并不一致,有些只有一两个句子。一个典型的讨论回答应该有多个段落,因此这些结果并不理想。一个好的提示应该给出**具体的格式和内容指令**。您需要消除语言中的歧义以提高一致性和质量。这是一个更好的提示。 + +```prompt +写一篇高度详细的论文,包括引言、正文和结论段,回答以下问题: +我们星球面临的最紧迫的环境问题是什么, +个人可以采取哪些措施来帮助解决这些问题? +``` + +第二个提示生成了更长的输出和更好的结构。提示中使用 “论文” 一词是有意的,因为助手可以理解论文的定义,因此更有可能生成连贯的、结构化的回答。 + +
+ +## 如何提升其质量和效果 + + + 提升 prompt 质量和效果的方法主要有以下几点: + +- **尽量明确你的需求:** 模型的输出会尽可能满足你的需求,所以如果你的需求不明确,输出可能会不如预期。 +- **使用正确的语法和拼写:** 模型会尽可能模仿你的语言风格,所以如果你的语言风格有问题,输出可能也会有问题。 +- **提供足够的上下文信息:** 模型会根据你提供的上下文信息生成输出,所以如果你提供的上下文信息不足,可能无法生成你想要的结果。 + + + +在为讨论问题制定有效的提示后,您现在需要细化生成的结果。这可能涉及到调整输出以符合诸如字数等限制,或将不同生成的结果的概念组合在一起。 + +迭代的一个简单方法是生成多个输出并查看它们,以了解正在使用的概念和结构。一旦评估了输出,您就可以选择最合适的输出并将它们组合成一个连贯的回答。另一种迭代的方法是逐步开始,然后**逐步扩展**。这需要不止一个提示:一个起始提示,用于撰写最初的一两段,然后是其他提示,以扩展已经写过的内容。以下是一个潜在的哲学讨论问题: + +> _"数学是发明还是发现?用仔细的推理来解释你的答案。"_ + +将其添加到一个简单的提示中,如下所示: + +```prompt +写一个起始段回答以下问题: +数学是发明还是发现?用仔细的推理来解释你的答案。 +``` + +生成了一些回答,找到了一个我们喜欢的: + +```prompt +哲学家和数学家之间争论不休,数学是发明还是发现。 +一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。 +例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。 +``` + +是一个不错的开端。然后使用另一个提示来扩展: + +```prompt +我正在撰写一篇详细的短文,回答以下提示: +数学是发明还是发现?用仔细的推理来解释你的答案。这是我目前的情况: 哲学家和数学家之间争论不休,数学是发明还是发现。 +一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。 +例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。写下我文章的下一段。 +``` + +使用此提示生成了几个扩展,并选择了一个我喜欢的,最终得到了以下结果: + +```prompt +哲学家和数学家之间争论不休,数学是发明还是发现。 +一些人认为,数学的概念和原则独立于人类思维存在,因此可以被认为是被发现而不是被发明的。 +例如,数字、比率和几何形状的概念在自然界中被观察到,可以被抽象化和系统化地研究。 +另一方面,有人认为数学在很大程度上是人类思维的发明。 +数学原理基于逻辑推理,这是人类思维的一个特征。 +例如,欧几里德几何基于抽象的公理和前提,被接受为真实而无需证明。 +因此,可以认为几何是人类思维的发明,而不是一种发现。 +同样,数学公式和方程用于模拟和预测物理现象,这又是人类推理的结果。 +``` + +使用扩展提示,我们可以逐步地写作并在每个步骤上进行迭代。这对于需要**生成更高质量的输出并希望逐步修改**的情况非常有用。 + +## 扩展阅读 + +- **Learn Prompting**: [https://learnprompting.org/zh-Hans/docs/intro](https://learnprompting.org/zh-Hans/docs/intro) diff --git a/DigitalHumanWeb/docs/usage/agents/topics.mdx b/DigitalHumanWeb/docs/usage/agents/topics.mdx new file mode 100644 index 0000000..1c8f296 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/topics.mdx @@ -0,0 +1,27 @@ +--- +title: LobeChat Topic Usage Guide +description: >- + Learn how to save and manage topics during conversations in LobeChat, + including saving topics, accessing the topic list, and pinning favorite + topics. +tags: + - Topic Usage + - Conversation Management + - Save Topic + - Topic List + - Favorite Topics +--- + +# Topic Usage Guide + +{'Topic + +- **Save Topic:** During a conversation, if you want to save the current context and start a new topic, you can click the save button next to the send button. +- **Topic List:** Clicking on a topic in the list allows for quick switching of historical conversation records and continuing the conversation. You can also use the star icon ⭐️ to pin favorite topics to the top, or use the more button on the right to rename or delete topics. diff --git a/DigitalHumanWeb/docs/usage/agents/topics.zh-CN.mdx b/DigitalHumanWeb/docs/usage/agents/topics.zh-CN.mdx new file mode 100644 index 0000000..2a90338 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/agents/topics.zh-CN.mdx @@ -0,0 +1,25 @@ +--- +title: LobeChat 话题使用指南 - 保存话题、快速切换历史记录 +description: 学习如何在 LobeChat 中保存话题、快速切换历史记录,并对话题进行收藏、重命名和删除操作。 +tags: + - 话题使用指南 + - 保存话题 + - 快速切换历史记录 + - 话题收藏 + - 话题重命名 + - 话题删除 +--- + +# 话题使用指南 + +{'话题使用指南'} + +- **保存话题:** 在聊天过程中,如果想要保存当前上下文并开启新的话题,可以点击发送按钮旁边的保存按钮。 +- **话题列表:** 点击列表中的话题可以快速切换历史对话记录,并继续对话。你还可以通过点击星标图标 ⭐️ 将话题收藏置顶,或者通过右侧更多按钮对话题进行重命名和删除操作。 diff --git a/DigitalHumanWeb/docs/usage/features/agent-market.mdx b/DigitalHumanWeb/docs/usage/features/agent-market.mdx new file mode 100644 index 0000000..fca028f --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/agent-market.mdx @@ -0,0 +1,40 @@ +--- +title: Find best Assistants in LobeChat Assistant Market +description: >- + Explore a vibrant community of carefully designed assistants in LobeChat's + Assistant Market. Contribute your wisdom and share your personally developed + assistants in this collaborative space. +tags: + - LobeChat + - Assistant Market + - Community + - Collaboration + - Assistants +--- + +# Assistant Market + +{'Assistant + +In LobeChat's Assistant Market, creators can discover a vibrant and innovative community that brings together numerous carefully designed assistants. These assistants not only play a crucial role in work scenarios but also provide great convenience in the learning process. Our market is not just a showcase platform, but also a collaborative space. Here, everyone can contribute their wisdom and share their personally developed assistants. + + + By [🤖/🏪 submitting agents](https://github.com/lobehub/lobe-chat-agents), you can easily submit + your assistant works to our platform. We particularly emphasize that LobeChat has established a + sophisticated automated internationalization (i18n) workflow, which excels in seamlessly + converting your assistants into multiple language versions. This means that regardless of the + language your users are using, they can seamlessly experience your assistant. + + + + We welcome all users to join this ever-growing ecosystem and participate in the iteration and + optimization of assistants. Together, let's create more interesting, practical, and innovative + assistants, further enriching the diversity and practicality of assistants. + diff --git a/DigitalHumanWeb/docs/usage/features/agent-market.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/agent-market.zh-CN.mdx new file mode 100644 index 0000000..91d6927 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/agent-market.zh-CN.mdx @@ -0,0 +1,36 @@ +--- +title: 在 LobeChat 助手市场找到创新 AI 助手 +description: >- + LobeChat助手市场是一个充满活力和创新的社区,汇聚了众多精心设计的助手,为工作场景和学习提供便利。欢迎提交你的助手作品,共同创造更多有趣、实用且具有创新性的助手。 +tags: + - LobeChat + - 助手市场 + - 创新社区 + - 协作空间 + - 助手作品 + - 自动化国际化 + - 多语言版本 +--- + +# 助手市场 + +{'助手市场'} + +在 LobeChat 的助手市场中,创作者们可以发现一个充满活力和创新的社区,它汇聚了众多精心设计的助手,这些助手不仅在工作场景中发挥着重要作用,也在学习过程中提供了极大的便利。我们的市场不仅是一个展示平台,更是一个协作的空间。在这里,每个人都可以贡献自己的智慧,分享个人开发的助手。 + + + 通过 [🤖/🏪 提交助手](https://github.com/lobehub/lobe-chat-agents) + ,你可以轻松地将你的助手作品提交到我们的平台。我们特别强调的是,LobeChat + 建立了一套精密的自动化国际化(i18n)工作流程, + 它的强大之处在于能够无缝地将你的助手转化为多种语言版本。这意味着,不论你的用户使用何种语言,他们都能无障碍地体验到你的助手。 + + + + 我们欢迎所有用户加入这个不断成长的生态系统,共同参与到助手的迭代与优化中来。共同创造出更多有趣、实用且具有创新性的助手,进一步丰富助手的多样性和实用性。 + diff --git a/DigitalHumanWeb/docs/usage/features/auth.mdx b/DigitalHumanWeb/docs/usage/features/auth.mdx new file mode 100644 index 0000000..ba9afb9 --- /dev/null +++ b/DigitalHumanWeb/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/DigitalHumanWeb/docs/usage/features/auth.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/auth.zh-CN.mdx new file mode 100644 index 0000000..983c0c7 --- /dev/null +++ b/DigitalHumanWeb/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/DigitalHumanWeb/docs/usage/features/database.mdx b/DigitalHumanWeb/docs/usage/features/database.mdx new file mode 100644 index 0000000..83ef17b --- /dev/null +++ b/DigitalHumanWeb/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/DigitalHumanWeb/docs/usage/features/database.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/database.zh-CN.mdx new file mode 100644 index 0000000..5716320 --- /dev/null +++ b/DigitalHumanWeb/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/DigitalHumanWeb/docs/usage/features/local-llm.mdx b/DigitalHumanWeb/docs/usage/features/local-llm.mdx new file mode 100644 index 0000000..a84df3c --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/local-llm.mdx @@ -0,0 +1,56 @@ +--- +title: Using Local LLM in LobeChat +description: >- + Experience groundbreaking AI support with a local LLM in LobeChat powered by + Ollama AI. Start conversations effortlessly and enjoy unprecedented + interaction speed! +tags: + - Local Large Language Model + - Ollama AI + - LobeChat + - AI communication + - Natural Language Processing + - Docker deployment +--- + +# Local Large Language Model (LLM) Support + +{'Ollama + +Available in >=0.127.0, currently only supports Docker deployment + +With the release of LobeChat v0.127.0, we are excited to introduce a groundbreaking feature - Ollama AI support! 🤯 With the powerful infrastructure of [Ollama AI](https://ollama.ai/) and the [community's collaborative efforts](https://github.com/lobehub/lobe-chat/pull/1265), you can now engage in conversations with a local LLM (Large Language Model) in LobeChat! 🤩 + +We are thrilled to introduce this revolutionary feature to all LobeChat users at this special moment. The integration of Ollama AI not only signifies a significant technological leap for us but also reaffirms our commitment to continuously pursue more efficient and intelligent communication. + +### How to Start a Conversation with Local LLM? + +The startup process is exceptionally simple! By running the following Docker command, you can experience conversations with a local LLM in LobeChat: + +```bash +docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434/v1 lobehub/lobe-chat +``` + +Yes, it's that simple! 🤩 You don't need to go through complicated configurations or worry about a complex installation process. We have prepared everything for you. With just one command, you can engage in deep conversations with a local AI. + +### Experience Unprecedented Interaction Speed + +With the powerful capabilities of Ollama AI, LobeChat has greatly improved its efficiency in natural language processing. Both processing speed and response time have reached new heights. This means that your conversational experience will be smoother, without any waiting, and with instant responses. + +### Why Choose a Local LLM? + +Compared to cloud-based solutions, a local LLM provides higher privacy and security. All your conversations are processed locally, without passing through any external servers, ensuring the security of your data. Additionally, local processing can reduce network latency, providing you with a more immediate communication experience. + +### 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/DigitalHumanWeb/docs/usage/features/local-llm.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/local-llm.zh-CN.mdx new file mode 100644 index 0000000..c48643a --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/local-llm.zh-CN.mdx @@ -0,0 +1,48 @@ +--- +title: 在 LobeChat 中使用本地大语言模型(LLM) +description: LobeChat 支持本地 LLM,使用 Ollama AI集成带来高效智能沟通。体验本地大语言模型的隐私性、安全性和即时交流 +tags: + - '本地大语言模型,LLM,LobeChat v0.127.0,Ollama AI,Docker 部署' +--- + +# 支持本地大语言模型(LLM) + +{'Ollama + +在 >=v0.127.0 版本中可用,目前仅支持 Docker 部署 + +随着 LobeChat v0.127.0 的发布,我们迎来了一个激动人心的特性 —— Ollama AI 支持!🤯 在 [Ollama AI](https://ollama.ai/) 强大的基础设施和 [社区的共同努力](https://github.com/lobehub/lobe-chat/pull/1265) 下,现在您可以在 LobeChat 中与本地 LLM (Large Language Model) 进行交流了!🤩 + +我们非常高兴能在这个特别的时刻,向所有 LobeChat 用户介绍这项革命性的特性。Ollama AI 的集成不仅标志着我们技术上的一个巨大飞跃,更是向用户承诺,我们将不断追求更高效、更智能的沟通方式。 + +### 如何启动与本地 LLM 的对话? + +启动过程异常简单!您只需运行以下 Docker 命令行,就可以在 LobeChat 中体验与本地 LLM 的对话了: + +```bash +docker run -d -p 3210:3210 -e OLLAMA_PROXY_URL=http://host.docker.internal:11434/v1 lobehub/lobe-chat +``` + +是的,就是这么简单!🤩 您不需要进行繁杂的配置,也不必担心复杂的安装过程。我们已经为您准备好了一切,只需一行命令,即可开启与本地 AI 的深度对话。 + +### 体验前所未有的交互速度 + +借助 Ollama AI 的强大能力,LobeChat 在进行自然语言处理方面的效率得到了极大的提升。无论是处理速度还是响应时间,都达到了新的高度。这意味着您的对话体验将更加流畅,无需等待,即时得到回应。 + +### 为什么选择本地 LLM? + +与基于云的解决方案相比,本地 LLM 提供了更高的隐私性和安全性。您的所有对话都在本地处理,不经过任何外部服务器,确保了您的数据安全性。此外,本地处理还能减少网络延迟,为您带来更加即时的交流体验。 + +### 开启您的 LobeChat & Ollama AI 之旅 + +现在,就让我们一起开启这段激动人心的旅程吧!通过 LobeChat 与 Ollama AI 的协作,探索 AI 带来的无限可能。无论您是技术爱好者,还是对 AI 交流充满好奇,LobeChat 都将为您提供一场前所未有的体验。 + + + + + diff --git a/DigitalHumanWeb/docs/usage/features/mobile.mdx b/DigitalHumanWeb/docs/usage/features/mobile.mdx new file mode 100644 index 0000000..d74d728 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/mobile.mdx @@ -0,0 +1,24 @@ +--- +title: LobeChat with Mobile Device Adaptation +description: >- + Explore the enhanced mobile user experience at LobeChat with optimized designs + for smoother interactions. Share your feedback on GitHub! +tags: + - Mobile Device Adaptation + - User Experience + - Optimized Designs + - Feedback + - GitHub +--- + +# Mobile Device Adaptation + +{'Mobile + +LobeChat has undergone a series of optimized designs for mobile devices to enhance the user's mobile experience. + +Currently, we are iterating on the user experience for mobile devices to achieve a smoother and more intuitive interaction. If you have any suggestions or ideas, we warmly welcome your feedback through GitHub Issues or Pull Requests. diff --git a/DigitalHumanWeb/docs/usage/features/mobile.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/mobile.zh-CN.mdx new file mode 100644 index 0000000..5b881eb --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/mobile.zh-CN.mdx @@ -0,0 +1,23 @@ +--- +title: LobeChat 移动设备适配 - 提升用户移动体验 +description: LobeChat针对移动设备进行优化设计,版本迭代以实现更流畅直观的交互。欢迎通过GitHub Issues或Pull Requests提供反馈。 +tags: + - LobeChat + - 移动设备适配 + - 用户体验 + - 版本迭代 + - GitHub + - 反馈 +--- + +# 移动设备适配 + +{'移动端设备适配'} + +LobeChat 针对移动设备进行了一系列的优化设计,以提升用户的移动体验。 + +目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。 diff --git a/DigitalHumanWeb/docs/usage/features/more.mdx b/DigitalHumanWeb/docs/usage/features/more.mdx new file mode 100644 index 0000000..54848e9 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/more.mdx @@ -0,0 +1,33 @@ +--- +title: More Features in LobeChat - Enhancing Design and Technical Capabilities +description: >- + Explore the additional features offered, including exquisite UI design, smooth + conversation experience, fast deployment options, privacy and security + measures, and custom domain support. +tags: + - UI Design + - Conversation Experience + - Deployment + - Privacy + - Custom Domain +--- + +# More Features + +In addition to the above features, our design and technical capabilities will provide you with more assurance in usage: + +- [x] 💎 **Exquisite UI Design**: Carefully designed interface with elegant appearance and smooth interaction effects, supporting light and dark themes, and adaptable to mobile devices. Supports PWA, providing an experience closer to native applications. +- [x] 🗣️ **Smooth Conversation Experience**: Responsive design brings a smooth conversation experience and supports full Markdown rendering, including code highlighting, LaTex formulas, Mermaid flowcharts, and more. +- [x] 💨 **Fast Deployment**: Use the Vercel platform or our Docker image, simply click the deploy button, and deployment can be completed within 1 minute without complex configuration processes. +- [x] 🔒 **Privacy and Security**: All data is stored locally in the user's browser, ensuring user privacy and security. +- [x] 🌐 **Custom Domain**: If users have their own domain, they can bind it to the platform for quick access to the chat assistant from anywhere. + +> ✨ As the product continues to iterate, we will bring more exciting features! + +--- + + + You can find our upcoming [Roadmap][github-project-link] plans in the Projects section. + + +[github-project-link]: https://github.com/lobehub/lobe-chat/projects diff --git a/DigitalHumanWeb/docs/usage/features/more.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/more.zh-CN.mdx new file mode 100644 index 0000000..735db76 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/more.zh-CN.mdx @@ -0,0 +1,28 @@ +--- +title: 更多 LobeChat 特性 - 提供精致 UI 设计和流畅的对话体验 +description: 了解更多产品特性,包括精致 UI 设计、流畅的对话体验和快速部署功能,为用户带来更好的体验。 +tags: + - 精致 UI 设计 + - 流畅对话体验 + - 快速部署 + - 隐私安全 + - 自定义域名 +--- + +# 更多特性 + +除了上述功能特性以外,我们的所具有的设计和技术能力将为你带来了更多使用保障: + +- [x] 💎 **精致 UI 设计**:经过精心设计的界面,具有优雅的外观和流畅的交互效果,支持亮暗色主题,适配移动端。支持 PWA,提供更加接近原生应用的体验。 +- [x] 🗣️ **流畅的对话体验**:流式响应带来流畅的对话体验,并且支持完整的 Markdown 渲染,包括代码高亮、LaTex 公式、Mermaid 流程图等。 +- [x] 💨 **快速部署**:使用 Vercel 平台或者我们的 Docker 镜像,只需点击一键部署按钮,即可在 1 分钟内完成部署,无需复杂的配置过程。 +- [x] 🔒 **隐私安全**:所有数据保存在用户浏览器本地,保证用户的隐私安全。 +- [x] 🌐 **自定义域名**:如果用户拥有自己的域名,可以将其绑定到平台上,方便在任何地方快速访问对话助手。 + +> ✨ 随着产品迭代持续更新,我们将会带来更多更多令人激动的功能! + +--- + +你可以在 Projects 中找到我们后续的 [Roadmap][github-project-link] 计划 + +[github-project-link]: https://github.com/lobehub/lobe-chat/projects diff --git a/DigitalHumanWeb/docs/usage/features/multi-ai-providers.mdx b/DigitalHumanWeb/docs/usage/features/multi-ai-providers.mdx new file mode 100644 index 0000000..c212bad --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/multi-ai-providers.mdx @@ -0,0 +1,66 @@ +--- +title: LobeChat with Multi AI Providers +description: >- + Discover how LobeChat offers diverse model service provider support, including + AWS Bedrock, Google AI Gemini series, ChatGLM, and Moonshot AI, to cater to + various user needs. Explore local model support with Ollama integration. +tags: + - LobeChat + - model service providers + - AWS Bedrock + - Google AI Gemini + - ChatGLM + - Moonshot AI + - Together AI + - local model support + - Ollama +--- + +# Multi-Model Service Provider Support + +{'Multi-Model + +Available in version 0.123.0 and later + +In the continuous development of LobeChat, we deeply understand the importance of diversity in model service providers for meeting the needs of the community when providing AI conversation services. Therefore, we have expanded our support to multiple model service providers, rather than being limited to a single one, in order to offer users a more diverse and rich selection of conversations. + +In this way, LobeChat can more flexibly adapt to the needs of different users, while also providing developers with a wider range of choices. + +## Supported Model Service Providers + +We have implemented support for the following model service providers: + +- **AWS Bedrock**: Integrated with AWS Bedrock service, supporting models such as **Claude / LLama2**, providing powerful natural language processing capabilities. [Learn more](https://aws.amazon.com/cn/bedrock) +- **Anthropic (Claude)**: Accessed Anthropic's **Claude** series models, including Claude 3 and Claude 2, with breakthroughs in multi-modal capabilities and extended context, setting a new industry benchmark. [Learn more](https://www.anthropic.com/claude) +- **Google AI (Gemini Pro, Gemini Vision)**: Access to Google's **Gemini** series models, including Gemini and Gemini Pro, to support advanced language understanding and generation. [Learn more](https://deepmind.google/technologies/gemini/) +- **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/) +- **Groq**: Accessed Groq's AI models, efficiently processing message sequences and generating responses, capable of multi-turn dialogues and single-interaction tasks. [Learn more](https://groq.com/) +- **OpenRouter**: Supports routing of models including **Claude 3**, **Gemma**, **Mistral**, **Llama2** and **Cohere**, with intelligent routing optimization to improve usage efficiency, open and flexible. [Learn more](https://openrouter.ai/) +- **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). + +## Local Model Support + +{'Local + +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/DigitalHumanWeb/docs/usage/features/multi-ai-providers.zh-CN.mdx b/DigitalHumanWeb/docs/usage/features/multi-ai-providers.zh-CN.mdx new file mode 100644 index 0000000..761f6e7 --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/multi-ai-providers.zh-CN.mdx @@ -0,0 +1,66 @@ +--- +title: LobeChat 支持多模型服务商 +description: 了解 LobeChat 在多模型服务商支持方面的最新进展,包括已支持的模型服务商和计划中的扩展,以及本地模型支持的使用方式。 +tags: + - LobeChat + - AI 会话服务 + - 模型服务商 + - 多模型支持 + - 本地模型支持 + - AWS Bedrock + - Google AI + - ChatGLM + - Moonshot AI + - 01 AI + - Together AI + - Ollama +--- + +# 多模型服务商支持 + +{'多模型服务商支持'} + +在 0.123.0 及以后版本中可用 + +在 LobeChat 的不断发展过程中,我们深刻理解到在提供 AI 会话服务时模型服务商的多样性对于满足社区需求的重要性。因此,我们不再局限于单一的模型服务商,而是拓展了对多种模型服务商的支持,以便为用户提供更为丰富和多样化的会话选择。 + +通过这种方式,LobeChat 能够更灵活地适应不同用户的需求,同时也为开发者提供了更为广泛的选择空间。 + +## 已支持的模型服务商 + +我们已经实现了对以下模型服务商的支持: + +- **AWS Bedrock**:集成了 AWS Bedrock 服务,支持了 **Claude / LLama2** 等模型,提供了强大的自然语言处理能力。[了解更多](https://aws.amazon.com/cn/bedrock) +- **Google AI (Gemini Pro、Gemini Vision)**:接入了 Google 的 **Gemini** 系列模型,包括 Gemini 和 Gemini Pro,以支持更高级的语言理解和生成。[了解更多](https://deepmind.google/technologies/gemini/) +- **Anthropic (Claude)**:接入了 Anthropic 的 **Claude** 系列模型,包括 Claude 3 和 Claude 2,多模态突破,超长上下文,树立行业新基准。[了解更多](https://www.anthropic.com/claude) +- **ChatGLM**:加入了智谱的 **ChatGLM** 系列模型(GLM-4/GLM-4-vision/GLM-3-turbo),为用户提供了另一种高效的会话模型选择。[了解更多](https://www.zhipuai.cn/) +- **Moonshot AI (月之暗面)**:集成了 Moonshot 系列模型,这是一家来自中国的创新性 AI 创业公司,旨在提供更深层次的会话理解。[了解更多](https://www.moonshot.cn/) +- **Together.ai**:集成部署了数百种开源模型和向量模型,无需本地部署即可随时访问这些模型。[了解更多](https://www.together.ai/) +- **01.AI (零一万物)**:集成了零一万物模型,系列 API 具备较快的推理速度,这不仅缩短了处理时间,同时也保持了出色的模型效果。[了解更多](https://www.lingyiwanwu.com/) +- **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)。 + +## 本地模型支持 + +{'本地模型支持'} + +为了满足特定用户的需求,LobeChat 还基于 [Ollama](https://ollama.ai) 支持了本地模型的使用,让用户能够更灵活地使用自己的或第三方的模型,详见 [本地模型支持](/zh/docs/usage/features/local-llm)。 + + + + + diff --git a/DigitalHumanWeb/docs/usage/features/plugin-system.mdx b/DigitalHumanWeb/docs/usage/features/plugin-system.mdx new file mode 100644 index 0000000..80165cf --- /dev/null +++ b/DigitalHumanWeb/docs/usage/features/plugin-system.mdx @@ -0,0 +1,89 @@ +--- +title: Plugin System in LobeChat +description: >- + Explore the diverse plugin ecosystem of LobeChat, extending its capabilities + to provide real-time information, interact with various platforms, and + simplify user interactions. +tags: + - LobeChat + - Plugin Ecosystem + - Assistant Functionality + - Plugin Development + - SDK + - Chat Application +--- + +# Plugin System + +{'Plugin + +The plugin ecosystem of LobeChat is an important extension of its core functionality, greatly enhancing the practicality and flexibility of the LobeChat assistant. + +