* ✨ feat: add build-in web search support for Wenxin
* 🐛 fix: fix web_search calling issue
* ✨ feat: add support wenxin `search_results` stream
* ✨ feat: add `search_info` stream support for Hunyuan
* 🔨 chore: minor logic
* 🔨 chore: add unit test
* 🐛 fix: try to fix ci error
* 🐛 fix: fix ci error
* Add unit tests for applyUrlRules function to cover various scenarios and edge cases.
* Add unit tests for applyUrlRules function to cover various URL transformation scenarios.
---------
Co-authored-by: gru-agent[bot] <185149714+gru-agent[bot]@users.noreply.github.com>
* add claude3.7 and bedrock
* add descriptions
* add reasoning to claude 3.7
* add claude 3.7 to bedrock
* added abilities
* retrieve deleted claude 3.5 v1 to bedrock
* reorderd abilities and added max output
* fix lint
---------
Co-authored-by: arvinxx <arvinx@foxmail.com>
* 💄 style: add `kimi-latest` for Moonshot
* 💄 style: update model list
* 💄 style: update model desc and cachedInput
* 💄 style: fix no model enabled
* 💄 style: update check model
* ✨ feat: Add configurable PDF processing method with Unstructured
* 🔧 fix: Update import path for env utility in ContentChunk module
* feat: add USE_UNSTRUCTURED_FOR_PDF environment variable to knowledge config
* Delete src/server/utils/env.ts
* feat: implement ChunkingRuleParser for file type and service mapping
* refactor: remove USE_UNSTRUCTURED_FOR_PDF from knowledge environment configuration
* test: add unit tests for ChunkingRuleParser functionality
* refactor: remove isUsingUnstructured method from ContentChunk class
* refactor: update ChunkingService type and clean up ContentChunk rules
* refactor: simplify ChunkingRuleParser and update ContentChunk module
* refactor: update ContentChunk module import for ChunkingService
* ♻️ refactor: refactor model fetch behavior
* 🐛 fix: fix gemini thinking model set functionCall tag
* 🐛 fix: fix Spark fc tag missing
* ✨ feat: add model fetch support for Tencent Cloud
* ♻️ refactor: refactor import `LOBE_DEFAULT_MODEL_LIST` with async method - Part 1
* ♻️ refactor: refactor import LOBE_DEFAULT_MODEL_LIST with async method - Part 2
* 🔨 chore: add vision, reasoning, fc default value
* ♻️ refactor: improve knownModel matching
* 🐛 fix: fix ci error
* Add unit tests for aiProviderRouter functionality in aiProvider.test.ts
* Add export for aiProviderProcedure in aiProvider.ts.
* Update aiProvider.ts
* ✨ feat: Support include_reasoning for OpenRouter provider's models. Solves #5766
* ✨ feat: Support display OpenRouter's "reasoning" output by transforming
its "reasoning" to be consistent with most other platforms: reasoning outputs wrapped by <think> XML tag.
* Revert openrouter stream transformer: Capture reasoning content inside openai stream processor
* Address PR comments: r1 does not support functional calling
* add unittest for openrouter reasoning stream handling
* fix: ensure that reasoning_content is a non-empty string when dealing with Aliyun Bailian
* fix: improve handling of reasoning_content and content in OpenAI stream transformation
* test: add openai reasoning test in aliyun bailian api
* make rewrite with local
* try longitude
* refactor the isMobile condition
* support use longitude as theme detector
* improve dockerfile
* improve geo
* improve geo
* improve geo
* vercel functions
* clean log
* skip api request at first
* turn back status in rewrite
This upgrade includes two changes:
For users deploying with Vercel using next-auth, it is necessary to add the environment variable `NEXT_PUBLIC_ENABLE_NEXT_AUTH=1` to ensure Next Auth is enabled; other users are not affected.
For users using clerk in self-built images, it is necessary to additionally configure `NEXT_PUBLIC_ENABLE_NEXT_AUTH=0` to disable Next Auth
Other standard deployment scenarios (using Clerk in Vercel and using next-auth in Docker) are not affected
For More detail, refer to https://github.com/lobehub/lobe-chat/issues/5804
本次升级存在两个变更:
- 针对使用 Vercel 部署中使用 next-auth 的用户,需要额外添加 `NEXT_PUBLIC_ENABLE_NEXT_AUTH=1` 环境变量来确保开启 Next Auth
- 针对使用自构建镜像中使用 clerk 的用户,需要额外配置 `NEXT_PUBLIC_ENABLE_NEXT_AUTH=0` 环境变量来关闭 Next Auth
其他标准部署场景(Vercel 中使用 Clerk 与 Docker 中使用 next-auth )不受影响
变更详情原因查看 https://github.com/lobehub/lobe-chat/issues/5804
* ✨ feat: Enhance LobeArtifact processing and rehype plugin
- Add test cases for artifact processing with adjacent lobeThinking tags
- Modify utils to insert empty line between lobeThinking and lobeArtifact
- Implement rehype plugin for transforming LobeArtifact tags in markdown
* ✨ feat: Improve LobeArtifact processing with advanced code block removal
- Add comprehensive test cases for artifact processing with various code block scenarios
- Enhance utils to handle fenced code blocks within and around lobeArtifact tags
- Support removing code blocks for HTML and other artifact types
* ✨ feat: Enhance LobeArtifact code block removal tests
- Add comprehensive test cases for processWithArtifact function
- Cover scenarios with HTML and tool_code code blocks
- Test handling of code blocks with content before and after
- Verify processing of artifacts with and without surrounding code blocks
* ✨ feat: Improve LobeArtifact code block processing regex
- Enhance regex in processWithArtifact to handle more complex code block scenarios
- Support better extraction of content before, within, and after code blocks
- Improve handling of artifacts with surrounding text and multiple tags
* ✨ feat: Add artifact processing and selector tests
- Enhance `processWithArtifact` with debug logging and improved code block handling
- Add comprehensive test cases for artifact-related selectors in chat store
- Implement tests for message content, artifact code extraction, and tag closure detection
* ✨ feat: Improve artifact code block extraction in selectors
- Add support for removing markdown code block wrapping in artifact content
- Update `artifactCode` selector to handle HTML and other code block scenarios
- Enhance test coverage for artifact code extraction with markdown-wrapped content
* 🔇 refactor: Remove debug console logs from processWithArtifact
- Clean up unnecessary console.log statements in artifact processing utility
- Improve code readability and performance by removing debug logging
- Maintain existing logic for artifact tag and code block processing
---------
Co-authored-by: yale <yale@example.com>
* 🐛 fix: fix pnpm cannot be installed via corepack due to key id mismatch
* 🔨 chore: workaround need update corepack to latest
* 🔨 chore: drop `jq` deps, use `sed` instead
* 💄 style: fix model fetch match tag error & add model fetch support for Hunyuan
* 💄 style: add `qvq-72b-preview` vision model
* 💄 style: add vision tag
* 💄 style: update Hunyuan model list
* 🐛 fix: fix Hunyuan model fetch ci error
* 💄 style: remove fc tag for Hunyuan vision model
* 🐛 fix: fix ci error
* 🔨 chore: support non-pglite mode
* 🐛 fix: improve validation for provider and model in parseFilesConfig
* 🐛 fix: update embeddings configuration test to reflect changes in model parsing
* 🐛 fix: update configuration keys from queryModel to queryMode and enhance parsing tests
* 🐛 fix: enhance error handling for invalid environment variable formats in parseFilesConfig
* feat: 添加嵌入模型配置支持,更新相关文档和测试
* feat: 重构文件配置,更新默认设置和相关测试
* ♻ Code Refactoring
- Update the file configuration and standardize the model naming to camel case.
* fix provider url
* improve fetch model list issue
* fix builtin model sort and displayName
* fix user enabled models
* fix model name
* fix model displayName name
* Update deepseek.ts
Update Deepseek V3 and description from deepseek official WeChat
Pricing has not been updated yet; it needs to be updated in 45 days
* Update deepseek.ts
Update deepseek price
* ✨ feat: pglite 迁移实现
refactor modal name
pin pglite@0.2.13
add serverExternalPackages for pglite
fix tests
update model
remove migration
back previous test file
* 💚 build: fix build with ReactScan
* clean
* refactor with isDBinit
* fix test
* refactor db
* update tests
* fix test and build
* add tests
* add tests
* add test for files
* add test for chunks
* remove unused method
* add message tests
* 💄 style: update SiliconCloud model list
* 💄 style: update model tag
* 💄 style: update model tag
* 💄 style: update qwen model list, add `qwq-32b-preview`
* 💄 style: update model list
* 🐛 fix: fix typo
* 🐛 fix: fix `CLOUDFLARE_MODEL_LIST` not working
* ♻️ refactor: get `*_MODEL_LIST` from env
* 🔨 chore: udpate CI for testing `*_MODEL_LIST` from env
* 🔨 chore: improve const
* ```
Add initial placeholder file
Created an initial placeholder file '1.txt' to set up project structure. This file will serve as a base for future content.
```
* Update `docs/usage/features/database.zh-CN.mdx`
* Delete 1.txt
* Delete .nvmrc
* feat: Add Cloudflare as a model provider
This commit adds support for Cloudflare as a model provider. It includes changes to the `ModelProvider` enum, the `UserKeyVaults` interface, the `getServerGlobalConfig` function, the `DEFAULT_LLM_CONFIG` constant, the `getLLMConfig` function, the `AgentRuntime` class, and the `DEFAULT_MODEL_PROVIDER_LIST` constant.
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix icon
* fix
* Create .nvmrc
* Delete src/config/modelProviders/.nvmrc
* CF -> CLOUDFLARE
* revert
* chore: Update agentRuntime.ts and auth.ts to support Cloudflare account ID in payload
* Add provider setting
* fix
* Update cloudflare.ts
* fix
* Update cloudflare.ts
* accountID
* fix
* i18n
* save changes
* commit check
* disable function calling for now
* does not catch errors when fetching models
* ready to add base url
* commit check
* revert change
* revert string boolean check
* fix type error on Vercel.
refer to https://github.com/vercel/next.js/issues/38736#issuecomment-1278917422
* i18n by groq/llama-3.1-8b-instant
* rename env var
* add test
* Revert changes that are not relavant to Cloudflare and result in merge conflicts.
* add test for models()
* move helper code to standalone file
* add test for helper methods
* remove encoder
* Merge main into cf-chat-m
* remove brand
* remove template comment
* add provider card
* Update lobe-icons
* Fix setting layout
* minor modification of model list
---------
Co-authored-by: sxjeru <sxjeru@gmail.com>
* if enable login and not signed in, return unauthorized error
* if enable login and not signed in, return unauthorized error
* if enable login and not signed in, return unauthorized error
* if enable login and not signed in, return unauthorized error, add test method.
* if enable login and not signed in, return unauthorized error, add test method.
* if enable login and not signed in, return unauthorized error, add test method.
* 修正引包。
* 改成mockImplementationOnce
* add sessionToken for bedrock model
* Support google model list
* update relate sessionToken info
* update description and revert gg model list
* update description
* change session token is a custom field
* support google model list
* Hide chunking button for unsupported files
* fix
* fix
* fix
* fix
* fix
* update UT
* fix
* fix
* fix
* feat: Add client credentials for Microsoft Entra ID SSO provider
Add client ID, client secret, and issuer for the Microsoft Entra ID SSO provider in the next-auth library.
* fix env vars
* Fix
* remove onetime reference
* 当未把s3存储桶设成公共读时,需要每次生成带签名的预览地址,默认有效期2小时。
* If bucket is not set public read, the preview address needs to be regenerated each time
* If bucket is not set public read, the preview address needs to be regenerated each time,fix test ts,add param to defined s3 preview url expires in.
* fix ci test
---------
Co-authored-by: Arvin Xu <arvinx@foxmail.com>
# the format is `plugin-identifier:key1=value1;key2=value2`, multiple settings fields are separated by semicolons `;`, multiple plugin settings are separated by commas `,`.
- **ローカルデータベース**:データとプライバシー保護に対するより多くの制御を希望するユーザーに適しています。LobeChatはCRDT(Conflict-Free Replicated Data Type)技術を使用してマルチデバイス同期を実現しています。これはシームレスなデータ同期体験を提供することを目的とした実験的な機能です。
- [`12` Support Local / Remote Database](#12-support-local--remote-database)
- [`13` Support Multi-User Management](#13-support-multi-user-management)
- [`14` Progressive Web App (PWA)](#14-progressive-web-app-pwa)
- [`15` Mobile Device Adaptation](#15-mobile-device-adaptation)
- [`16` Custom Themes](#16-custom-themes)
- [`*` What's more](#-whats-more)
- [⚡️ Performance](#️-performance)
- [🛳 Self Hosting](#-self-hosting)
@@ -111,9 +114,48 @@ Whether for users or professional developers, LobeHub will be your AI Agent play
## ✨ Features
[![][image-feat-cot]][docs-feat-cot]
### `1` [Chain of Thought][docs-feat-cot]
Experience AI reasoning like never before. Watch as complex problems unfold step by step through our innovative Chain of Thought (CoT) visualization. This breakthrough feature provides unprecedented transparency into AI's decision-making process, allowing you to observe how conclusions are reached in real-time.
By breaking down complex reasoning into clear, logical steps, you can better understand and validate the AI's problem-solving approach. Whether you're debugging, learning, or simply curious about AI reasoning, CoT visualization transforms abstract thinking into an engaging, interactive experience.
Introducing a more natural and flexible way to chat with AI. With Branch Conversations, your discussions can flow in multiple directions, just like human conversations do. Create new conversation branches from any message, giving you the freedom to explore different paths while preserving the original context.
Choose between two powerful modes:
- **Continuation Mode:** Seamlessly extend your current discussion while maintaining valuable context
- **Standalone Mode:** Start fresh with a new topic based on any previous message
This groundbreaking feature transforms linear conversations into dynamic, tree-like structures, enabling deeper exploration of ideas and more productive interactions.
[![][back-to-top]](#readme-top)
[![][image-feat-artifacts]][docs-feat-artifacts]
### `3` [Artifacts Support][docs-feat-artifacts]
Experience the power of Claude Artifacts, now integrated into LobeChat. This revolutionary feature expands the boundaries of AI-human interaction, enabling real-time creation and visualization of diverse content formats.
Create and visualize with unprecedented flexibility:
- Generate and display dynamic SVG graphics
- Build and render interactive HTML pages in real-time
- Produce professional documents in multiple formats
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.
@@ -131,7 +173,7 @@ LobeChat supports file upload and knowledge base functionality. You can upload v
[![][image-feat-privoder]][docs-feat-provider]
### `2` [Multi-Model Service Provider Support][docs-feat-provider]
### `5` [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.
@@ -141,21 +183,56 @@ In this way, LobeChat can more flexibly adapt to the needs of different users, w
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**. [Learn 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)
<!-- PROVIDER LIST -->
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).
- **[OpenAI](https://lobechat.com/discover/provider/openai)**: OpenAI is a global leader in artificial intelligence research, with models like the GPT series pushing the frontiers of natural language processing. OpenAI is committed to transforming multiple industries through innovative and efficient AI solutions. Their products demonstrate significant performance and cost-effectiveness, widely used in research, business, and innovative applications.
- **[Ollama](https://lobechat.com/discover/provider/ollama)**: Ollama provides models that cover a wide range of fields, including code generation, mathematical operations, multilingual processing, and conversational interaction, catering to diverse enterprise-level and localized deployment needs.
- **[Anthropic](https://lobechat.com/discover/provider/anthropic)**: Anthropic is a company focused on AI research and development, offering a range of advanced language models such as Claude 3.5 Sonnet, Claude 3 Sonnet, Claude 3 Opus, and Claude 3 Haiku. These models achieve an ideal balance between intelligence, speed, and cost, suitable for various applications from enterprise workloads to rapid-response scenarios. Claude 3.5 Sonnet, as their latest model, has excelled in multiple evaluations while maintaining a high cost-performance ratio.
- **[Bedrock](https://lobechat.com/discover/provider/bedrock)**: Bedrock is a service provided by Amazon AWS, focusing on delivering advanced AI language and visual models for enterprises. Its model family includes Anthropic's Claude series, Meta's Llama 3.1 series, and more, offering a range of options from lightweight to high-performance, supporting tasks such as text generation, conversation, and image processing for businesses of varying scales and needs.
- **[Google](https://lobechat.com/discover/provider/google)**: Google's Gemini series represents its most advanced, versatile AI models, developed by Google DeepMind, designed for multimodal capabilities, supporting seamless understanding and processing of text, code, images, audio, and video. Suitable for various environments from data centers to mobile devices, it significantly enhances the efficiency and applicability of AI models.
- **[DeepSeek](https://lobechat.com/discover/provider/deepseek)**: DeepSeek is a company focused on AI technology research and application, with its latest model DeepSeek-V2.5 integrating general dialogue and code processing capabilities, achieving significant improvements in human preference alignment, writing tasks, and instruction following.
- **[HuggingFace](https://lobechat.com/discover/provider/huggingface)**: The HuggingFace Inference API provides a fast and free way for you to explore thousands of models for various tasks. Whether you are prototyping for a new application or experimenting with the capabilities of machine learning, this API gives you instant access to high-performance models across multiple domains.
- **[OpenRouter](https://lobechat.com/discover/provider/openrouter)**: OpenRouter is a service platform providing access to various cutting-edge large model interfaces, supporting OpenAI, Anthropic, LLaMA, and more, suitable for diverse development and application needs. Users can flexibly choose the optimal model and pricing based on their requirements, enhancing the AI experience.
- **[Cloudflare Workers AI](https://lobechat.com/discover/provider/cloudflare)**: Run serverless GPU-powered machine learning models on Cloudflare's global network.
- **[GitHub](https://lobechat.com/discover/provider/github)**: With GitHub Models, developers can become AI engineers and leverage the industry's leading AI models.
<details><summary><kbd>See more providers (+27)</kbd></summary>
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI is a platform providing a variety of large language models and AI image generation API services, flexible, reliable, and cost-effective. It supports the latest open-source models like Llama3 and Mistral, offering a comprehensive, user-friendly, and auto-scaling API solution for generative AI application development, suitable for the rapid growth of AI startups.
- **[PPIO](https://lobechat.com/discover/provider/ppio)**: PPIO supports stable and cost-efficient open-source LLM APIs, such as DeepSeek, Llama, Qwen etc.
- **[Together AI](https://lobechat.com/discover/provider/togetherai)**: Together AI is dedicated to achieving leading performance through innovative AI models, offering extensive customization capabilities, including rapid scaling support and intuitive deployment processes to meet various enterprise needs.
- **[Fireworks AI](https://lobechat.com/discover/provider/fireworksai)**: Fireworks AI is a leading provider of advanced language model services, focusing on functional calling and multimodal processing. Its latest model, Firefunction V2, is based on Llama-3, optimized for function calling, conversation, and instruction following. The visual language model FireLLaVA-13B supports mixed input of images and text. Other notable models include the Llama series and Mixtral series, providing efficient multilingual instruction following and generation support.
- **[Groq](https://lobechat.com/discover/provider/groq)**: Groq's LPU inference engine has excelled in the latest independent large language model (LLM) benchmarks, redefining the standards for AI solutions with its remarkable speed and efficiency. Groq represents instant inference speed, demonstrating strong performance in cloud-based deployments.
- **[Perplexity](https://lobechat.com/discover/provider/perplexity)**: Perplexity is a leading provider of conversational generation models, offering various advanced Llama 3.1 models that support both online and offline applications, particularly suited for complex natural language processing tasks.
- **[Mistral](https://lobechat.com/discover/provider/mistral)**: Mistral provides advanced general, specialized, and research models widely used in complex reasoning, multilingual tasks, and code generation. Through functional calling interfaces, users can integrate custom functionalities for specific applications.
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs builds foundational models and AI systems for enterprises, accelerating the application of generative AI in production.
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage focuses on developing AI models for various business needs, including Solar LLM and document AI, aiming to achieve artificial general intelligence (AGI) for work. It allows for the creation of simple conversational agents through Chat API and supports functional calling, translation, embedding, and domain-specific applications.
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI is a company dedicated to building artificial intelligence to accelerate human scientific discovery. Our mission is to advance our collective understanding of the universe.
- **[Qwen](https://lobechat.com/discover/provider/qwen)**: Tongyi Qianwen is a large-scale language model independently developed by Alibaba Cloud, featuring strong natural language understanding and generation capabilities. It can answer various questions, create written content, express opinions, and write code, playing a role in multiple fields.
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: An enterprise-level one-stop platform for large model and AI-native application development and services, providing the most comprehensive and user-friendly toolchain for the entire process of generative artificial intelligence model development and application development.
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: A large language model developed by Tencent, equipped with powerful Chinese creative capabilities, logical reasoning abilities in complex contexts, and reliable task execution skills.
- **[ZhiPu](https://lobechat.com/discover/provider/zhipu)**: Zhipu AI offers an open platform for multimodal and language models, supporting a wide range of AI application scenarios, including text processing, image understanding, and programming assistance.
- **[SiliconCloud](https://lobechat.com/discover/provider/siliconcloud)**: SiliconFlow is dedicated to accelerating AGI for the benefit of humanity, enhancing large-scale AI efficiency through an easy-to-use and cost-effective GenAI stack.
- **[01.AI](https://lobechat.com/discover/provider/zeroone)**: 01.AI focuses on AI 2.0 era technologies, vigorously promoting the innovation and application of 'human + artificial intelligence', using powerful models and advanced AI technologies to enhance human productivity and achieve technological empowerment.
- **[Spark](https://lobechat.com/discover/provider/spark)**: iFlytek's Spark model provides powerful AI capabilities across multiple domains and languages, utilizing advanced natural language processing technology to build innovative applications suitable for smart hardware, smart healthcare, smart finance, and other vertical scenarios.
- **[SenseNova](https://lobechat.com/discover/provider/sensenova)**: SenseNova, backed by SenseTime's robust infrastructure, offers efficient and user-friendly full-stack large model services.
- **[Stepfun](https://lobechat.com/discover/provider/stepfun)**: StepFun's large model possesses industry-leading multimodal and complex reasoning capabilities, supporting ultra-long text understanding and powerful autonomous scheduling search engine functions.
- **[Moonshot](https://lobechat.com/discover/provider/moonshot)**: Moonshot is an open-source platform launched by Beijing Dark Side Technology Co., Ltd., providing various natural language processing models with a wide range of applications, including but not limited to content creation, academic research, intelligent recommendations, and medical diagnosis, supporting long text processing and complex generation tasks.
- **[Baichuan](https://lobechat.com/discover/provider/baichuan)**: Baichuan Intelligence is a company focused on the research and development of large AI models, with its models excelling in domestic knowledge encyclopedias, long text processing, and generative creation tasks in Chinese, surpassing mainstream foreign models. Baichuan Intelligence also possesses industry-leading multimodal capabilities, performing excellently in multiple authoritative evaluations. Its models include Baichuan 4, Baichuan 3 Turbo, and Baichuan 3 Turbo 128k, each optimized for different application scenarios, providing cost-effective solutions.
- **[Minimax](https://lobechat.com/discover/provider/minimax)**: MiniMax is a general artificial intelligence technology company established in 2021, dedicated to co-creating intelligence with users. MiniMax has independently developed general large models of different modalities, including trillion-parameter MoE text models, voice models, and image models, and has launched applications such as Conch AI.
- **[InternLM](https://lobechat.com/discover/provider/internlm)**: An open-source organization dedicated to the research and development of large model toolchains. It provides an efficient and user-friendly open-source platform for all AI developers, making cutting-edge large models and algorithm technologies easily accessible.
- **[Higress](https://lobechat.com/discover/provider/higress)**: Higress is a cloud-native API gateway that was developed internally at Alibaba to address the issues of Tengine reload affecting long-lived connections and the insufficient load balancing capabilities for gRPC/Dubbo.
- **[Gitee AI](https://lobechat.com/discover/provider/giteeai)**: Gitee AI's Serverless API provides AI developers with an out of the box large model inference API service.
- **[Taichu](https://lobechat.com/discover/provider/taichu)**: The Institute of Automation, Chinese Academy of Sciences, and Wuhan Artificial Intelligence Research Institute have launched a new generation of multimodal large models, supporting comprehensive question-answering tasks such as multi-turn Q\&A, text creation, image generation, 3D understanding, and signal analysis, with stronger cognitive, understanding, and creative abilities, providing a new interactive experience.
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI is an AI model and service platform launched by 360 Company, offering various advanced natural language processing models, including 360GPT2 Pro, 360GPT Pro, 360GPT Turbo, and 360GPT Turbo Responsibility 8K. These models combine large-scale parameters and multimodal capabilities, widely applied in text generation, semantic understanding, dialogue systems, and code generation. With flexible pricing strategies, 360 AI meets diverse user needs, supports developer integration, and promotes the innovation and development of intelligent applications.
</details>
> 📊 Total providers: [<kbd>**37**</kbd>](https://lobechat.com/discover/providers)
<!-- PROVIDER LIST -->
At the same time, we are also planning to support more model service providers. 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).
<div align="right">
@@ -165,7 +242,7 @@ At the same time, we are also planning to support more model service providers,
[![][image-feat-local]][docs-feat-local]
### `3` [Local Large Language Model (LLM) Support][docs-feat-local]
### `6` [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.
@@ -181,7 +258,7 @@ To meet the specific needs of users, LobeChat also supports the use of local mod
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.
@@ -216,7 +293,7 @@ Users can choose the voice that suits their personal preferences or specific sce
[![][image-feat-t2i]][docs-feat-t2i]
### `6` [Text to Image Generation][docs-feat-t2i]
### `9` [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.
@@ -230,7 +307,7 @@ This enables a more private and immersive creative process, allowing for the sea
[![][image-feat-plugin]][docs-feat-plugin]
### `7` [Plugin System (Function Calling)][docs-feat-plugin]
### `10` [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.
@@ -246,14 +323,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext
| [Tongyi wanxiang Image Generator](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **YoungTx** on **2024-08-09**</sup> | This plugin uses Alibaba's Tongyi Wanxiang model to generate images based on text prompts.<br/>`image``tongyi``wanxiang` |
| [Shopping tools](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **shoppingtools** on **2024-07-19**</sup> | Search for products on eBay & AliExpress, find eBay events & coupons. Get prompt examples.<br/>`shopping``e-bay``ali-express``coupons` |
| [Savvy Trader AI](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **savvytrader** on **2024-06-27**</sup> | Realtime stock, crypto and other investment data.<br/>`stock``analyze` |
| [Search1API](https://chat-preview.lobehub.com/settings/agent)<br/><sup>By **fatwang2** on **2024-05-06**</sup> | Search aggregation service, specifically designed for LLMs<br/>`web``search` |
| [Web](https://lobechat.com/discover/plugin/web)<br/><sup>By **Proghit** on **2025-01-24**</sup> | Smart web search that reads and analyzes pages to deliver comprehensive answers from Google results.<br/>`web``search` |
| [MintbaseSearch](https://lobechat.com/discover/plugin/mintbasesearch)<br/><sup>By **mintbase** on **2024-12-31**</sup> | Find any NFT data on the NEAR Protocol.<br/>`crypto``nft` |
| [Bing_websearch](https://lobechat.com/discover/plugin/Bingsearch-identifier)<br/><sup>By **FineHow** on **2024-12-22**</sup> | Search for information from the internet base BingApi<br/>`bingsearch` |
| [PortfolioMeta](https://lobechat.com/discover/plugin/StockData)<br/><sup>By **portfoliometa** on **2024-12-22**</sup> | Analyze stocks and get comprehensive real-time investment data and analytics.<br/>`stock` |
> 📊 Total plugins: [<kbd>**49**</kbd>](https://github.com/lobehub/lobe-chat-plugins)
> 📊 Total plugins: [<kbd>**47**</kbd>](https://lobechat.com/discover/plugins)
<!-- PLUGIN LIST -->
@@ -265,7 +342,7 @@ In addition, these plugins are not limited to news aggregation, but can also ext
[![][image-feat-agent]][docs-feat-agent]
### `8` [Agent Market (GPTs)][docs-feat-agent]
### `11` [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.
@@ -285,14 +362,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
| [Algorithm Answer Mentor](https://chat-preview.lobehub.com/market?agent=leetcode-tutor)<br/><sup>By **[Stark-X](https://github.com/Stark-X)** on **2024-10-21**</sup> | Specializes in LeetCode algorithm solutions and user guidance<br/>`algorithm``problem-solving``programming``education` |
| [Psychologist](https://chat-preview.lobehub.com/market?agent=psychological-counselor)<br/><sup>By **[JIANGTUNAN](https://github.com/JIANGTUNAN)** on **2024-10-21**</sup> | An experienced psychologist, warmly and patiently listening to your story.<br/>`psychological-counseling``consultation``sharing``friendly``doctor``counselor` |
| [Boxing Training Master](https://chat-preview.lobehub.com/market?agent=boxing-master)<br/><sup>By **[Luyi-2333](https://github.com/Luyi-2333)** on **2024-10-15**</sup> | Expert in boxing training guidance and personalized plan development<br/>`boxing-training``personalized-plans``fitness-guidance``progress-evaluation``technique-improvement``health-and-nutrition` |
| [Coconut](https://chat-preview.lobehub.com/market?agent=deep-thinker-ai)<br/><sup>By **[hia1234](https://github.com/hia1234)** on **2024-10-15**</sup> | A chatbot that undergoes several reviews of its responses, checking whether there is a basis for its statements and actively requesting feedback while engaging in repeated interactions.<br/>`programming``general` |
| [Xiao Zhi French Translation Assistant](https://lobechat.com/discover/assistant/xiao-zhi-french-translation-asst-v-1)<br/><sup>By **[WeR-Best](https://github.com/WeR-Best)** on **2025-02-10**</sup> | A friendly, professional, and empathetic AI assistant for French translation<br/>`ai-assistant``french-translation``cross-cultural-communication``creativity` |
| [Language Charm Learning Mentor](https://lobechat.com/discover/assistant/bad-language-helper)<br/><sup>By **[Guducat](https://github.com/Guducat)** on **2025-02-06**</sup> | Specializes in teaching the charm of language and witty responses<br/>`language-learning``dialogue-examples` |
| [Astrology Researcher](https://lobechat.com/discover/assistant/fate-researcher)<br/><sup>By **[Jack980506](https://github.com/Jack980506)** on **2025-02-06**</sup> | Expert in BaZi astrology<br/>`astrology``ba-zi``traditional-culture` |
> 📊 Total agents: [<kbd>**420**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
> 📊 Total agents: [<kbd>**487**</kbd> ](https://lobechat.com/discover/assistants)
<!-- AGENT LIST -->
@@ -304,7 +381,7 @@ Our marketplace is not just a showcase platform but also a collaborative space.
[![][image-feat-database]][docs-feat-database]
### `9` [Support Local / Remote Database][docs-feat-database]
### `12` [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:
@@ -321,7 +398,7 @@ Regardless of which database you choose, LobeChat can provide you with an excell
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.
@@ -378,7 +455,7 @@ We have carried out a series of optimization designs for mobile devices to enhan
[![][image-feat-theme]][docs-feat-theme]
### `13` [Custom Themes][docs-feat-theme]
### `16` [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.
@@ -484,25 +561,22 @@ If you have deployed your own project following the one-click deployment steps i
We provide a Docker image for deploying the LobeChat service on your own private device. Use the following command to start the LobeChat service:
1. create a folder to for storage files
```fish
$ docker run -d-p3210:3210\
-eOPENAI_API_KEY=sk-xxxx \
-eACCESS_CODE=lobe66 \
--name lobe-chat \
lobehub/lobe-chat
$ mkdir lobe-chat-db &&cd lobe-chat-db
```
> \[!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:
2. init the LobeChat infrastructure
```fish
$ docker run -d-p3210:3210\
-eOPENAI_API_KEY=sk-xxxx \
-eOPENAI_PROXY_URL=https://api-proxy.com/v1 \
-eACCESS_CODE=lobe66 \
--name lobe-chat \
lobehub/lobe-chat
bash<(curl-fsSL https://lobe.li/setup.sh)
```
3. Start the LobeChat service
```fish
docker compose up -d
```
> \[!NOTE]
@@ -595,7 +669,7 @@ If you would like to learn more details, please feel free to look at our [📘 D
## 🤝 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.
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]
>
@@ -692,6 +766,7 @@ This project is [Apache 2.0](./LICENSE) licensed.
- **[Anthropic](https://lobechat.com/discover/provider/anthropic)**: Anthropic 是一家专注于人工智能研究和开发的公司,提供了一系列先进的语言模型,如 Claude 3.5 Sonnet、Claude 3 Sonnet、Claude 3 Opus 和 Claude 3 Haiku。这些模型在智能、速度和成本之间取得了理想的平衡,适用于从企业级工作负载到快速响应的各种应用场景。Claude 3.5 Sonnet 作为其最新模型,在多项评估中表现优异,同时保持了较高的性价比。
- **[Bedrock](https://lobechat.com/discover/provider/bedrock)**: Bedrock 是亚马逊 AWS 提供的一项服务,专注于为企业提供先进的 AI 语言模型和视觉模型。其模型家族包括 Anthropic 的 Claude 系列、Meta 的 Llama 3.1 系列等,涵盖从轻量级到高性能的多种选择,支持文本生成、对话、图像处理等多种任务,适用于不同规模和需求的企业应用。
- **[Google](https://lobechat.com/discover/provider/google)**: Google 的 Gemini 系列是其最先进、通用的 AI 模型,由 Google DeepMind 打造,专为多模态设计,支持文本、代码、图像、音频和视频的无缝理解与处理。适用于从数据中心到移动设备的多种环境,极大提升了 AI 模型的效率与应用广泛性。
- **[HuggingFace](https://lobechat.com/discover/provider/huggingface)**: HuggingFace Inference API 提供了一种快速且免费的方式,让您可以探索成千上万种模型,适用于各种任务。无论您是在为新应用程序进行原型设计,还是在尝试机器学习的功能,这个 API 都能让您即时访问多个领域的高性能模型。
- **[OpenRouter](https://lobechat.com/discover/provider/openrouter)**: OpenRouter 是一个提供多种前沿大模型接口的服务平台,支持 OpenAI、Anthropic、LLaMA 及更多,适合多样化的开发和应用需求。用户可根据自身需求灵活选择最优的模型和价格,助力 AI 体验的提升。
- **[GitHub](https://lobechat.com/discover/provider/github)**: 通过 GitHub 模型,开发人员可以成为 AI 工程师,并使用行业领先的 AI 模型进行构建。
<details><summary><kbd>See more providers (+27)</kbd></summary>
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI 是一个提供多种大语言模型与 AI 图像生成的 API 服务的平台,灵活、可靠且具有成本效益。它支持 Llama3、Mistral 等最新的开源模型,并为生成式 AI 应用开发提供了全面、用户友好且自动扩展的 API 解决方案,适合 AI 初创公司的快速发展。
- **[PPIO](https://lobechat.com/discover/provider/ppio)**: PPIO 派欧云提供稳定、高性价比的开源模型 API 服务,支持 DeepSeek 全系列、Llama、Qwen 等行业领先大模型。
- **[Together AI](https://lobechat.com/discover/provider/togetherai)**: Together AI 致力于通过创新的 AI 模型实现领先的性能,提供广泛的自定义能力,包括快速扩展支持和直观的部署流程,满足企业的各种需求。
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage 专注于为各种商业需求开发 AI 模型,包括 Solar LLM 和文档 AI,旨在实现工作的人造通用智能(AGI)。通过 Chat API 创建简单的对话代理,并支持功能调用、翻译、嵌入以及特定领域应用。
| [Cron 表达式助手](https://lobechat.com/discover/assistant/crontab-generate)<br/><sup>By **[edgesider](https://github.com/edgesider)** on **2025-02-17**</sup> | Crontab 表达式生成<br/>`crontab``时间表达``触发时间``生成器``技术辅助` |
| [小智法语翻译助手](https://lobechat.com/discover/assistant/xiao-zhi-french-translation-asst-v-1)<br/><sup>By **[WeR-Best](https://github.com/WeR-Best)** on **2025-02-10**</sup> | 友好、专业、富有同理心的法语翻译 AI 助手<br/>`ai助手``法语翻译``跨文化交流``创造力` |
| [语言魅力学习导师](https://lobechat.com/discover/assistant/bad-language-helper)<br/><sup>By **[Guducat](https://github.com/Guducat)** on **2025-02-06**</sup> | 擅长教学语言的魅力与花样回复<br/>`语言学习``对话示例` |
| [命理研究员](https://lobechat.com/discover/assistant/fate-researcher)<br/><sup>By **[Jack980506](https://github.com/Jack980506)** on **2025-02-06**</sup> | 精通八字命<br/>`命理学``八字``传统文化` |
> 📊 Total agents: [<kbd>**420**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
> 📊 Total agents: [<kbd>**487**</kbd> ](https://lobechat.com/discover/assistants)
# If the language is not supported, default to English
# Function to show messages
show_message(){
localkey="$1"
case$key in
choose_language)
echo"Please choose a language / 请选择语言:"
echo"(0) English"
echo"(1) 简体中文"
;;
downloading)
case$LANGUAGE in
zh_CN)
echo"正在下载文件..."
;;
*)
echo"Downloading files..."
;;
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
;;
security_secrect_regenerate)
case$LANGUAGE in
zh_CN)
echo"重新生成安全密钥..."
;;
*)
echo"Regenerate security secrets..."
;;
esac
;;
security_secrect_regenerate_failed)
case$LANGUAGE in
zh_CN)
echo"无法重新生成安全密钥:"
;;
*)
echo"Failed to regenerate security secrets: "
;;
esac
;;
host_regenerate)
case$LANGUAGE in
zh_CN)
echo"✔️ 已更新部署模式配置"
;;
*)
echo"✔️ Updated deployment mode configuration"
;;
esac
;;
host_regenerate_failed)
case$LANGUAGE in
zh_CN)
echo"无法重新生成服务器域名:"
;;
*)
echo"Failed to regenerate server host: "
;;
esac
;;
security_secrect_regenerate_report)
case$LANGUAGE in
zh_CN)
echo"安全密钥生成结果如下:"
;;
*)
echo"Security secret generation results are as follows:"
;;
esac
;;
tips_download_failed)
case$LANGUAGE in
zh_CN)
echo"$2 下载失败,请检查网络连接。"
;;
*)
echo"$2 Download failed, please check the network connection."
;;
esac
;;
tips_already_installed)
case$LANGUAGE in
zh_CN)
echo"检测到您已经运行过 LobeChat Database,本安装程序只能完成初始化配置,并不能重复安装。如果你需要重新安装,请删除 data 和 s3_data 文件夹。"
;;
*)
echo"It is detected that you have run LobeChat Database. This installation program can only complete the initialization configuration and cannot be reinstalled. If you need to reinstall, please delete the data and s3_data folders."
;;
esac
;;
tips_run_command)
case$LANGUAGE in
zh_CN)
echo"您已经完成了所有配置。请运行以下命令启动LobeChat:"
;;
*)
echo"You have completed all configurations. 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 "
echo"Failed to initialize the database. To avoid your data being initialized repeatedly, run the following command to unmount the initial configuration file of Casdoor when you first start successfully:"
echo"(0) Domain mode (no need to specify the port when accessing), you need to use the reverse proxy service LobeChat, MinIO, Casdoor, and assign a domain name respectively;"
echo"(1) Port mode (need to specify the port when accessing, such as using IP access, or domain name + port access), you need to open the specified port;"
echo"(2) Local mode (for local testing only)"
echo"If you are confused about these contents, you can choose to deploy in local mode first, and then modify according to the document guide later."
title: LobeChat Plugin Ecosystem - Functionality Extensions and Development Resources
description: >-
Discover how the LobeChat plugin ecosystem enhances the utility and
flexibility of the LobeChat assistant, along with the development resources
and plugin development guidelines provided.
tags:
- LobeChat
- Plugins
- Real-time Information
- Voice Options
---
# Supported Plugin System
The LobeChat plugin ecosystem is a significant extension of its core functionalities, greatly enhancing the utility and flexibility of the LobeChat assistant.
By leveraging plugins, the LobeChat assistants are capable of accessing and processing real-time information, such as searching online for data and providing users with timely and relevant insights.
Moreover, these plugins are not solely limited to news aggregation; they can also extend to other practical functionalities, such as quickly retrieving documents, generating images, obtaining data from various platforms such as Bilibili and Steam, and interacting with an array of third-party services.
To learn more, please refer to the [Plugin Usage](/en/docs/usage/plugins/basic). Additionally, quality voice options (OpenAI Audio, Microsoft Edge Speech) are available to cater to users from different regions and cultural backgrounds. Users can select suitable voices based on personal preferences or specific situations, providing a personalized communication experience.
LobeChat supports various large language models with visual recognition
capabilities, allowing users to upload or drag and drop images. The assistant
will recognize the content and engage in intelligent dialogue, creating a more
intelligent and diverse chat environment.
tags:
- Visual Recognition
- LobeChat
- GPT-4 Vision
- Google Gemini Pro
- Multimodal Interaction
---
# Supported Models for Visual Recognition
LobeChat now supports several large language models with visual recognition capabilities, including OpenAI's [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision), Google Gemini Pro vision, and Zhiyuan GLM-4 Vision. This empowers LobeChat with multimodal interaction capabilities. Users can effortlessly upload images or drag and drop them into the chat window, where the assistant can recognize the image content and engage in intelligent dialogue, building a smarter and more diverse chat experience.
This feature opens up new avenues for interaction, allowing communication that extends beyond text to include rich visual elements. Whether sharing images during everyday use or interpreting graphics in specific industries, the assistant delivers an exceptional conversational experience. Additionally, we have carefully selected a range of high-quality voice options (OpenAI Audio, Microsoft Edge Speech) to cater to users from different regions and cultural backgrounds. Users can choose a suitable voice based on personal preferences or specific contexts, thus receiving a more personalized communication experience.
LobeChat supports Text-to-Speech (TTS) and Speech-to-Text (STT) technologies,
offering high-quality voice options for a personalized communication
experience. Learn more about Lobe TTS Toolkit.
tags:
- TTS
- STT
- Voice Conversations
- LobeChat
- Audio Technology
---
# Supporting TTS & STT Voice Conversations
LobeChat supports Text-to-Speech (TTS) and Speech-to-Text (STT) technologies, allowing our application to transform textual information into clear voice output. Users can interact with our conversational agents as if they were talking to a real person. There are various voice options for users to choose from, providing the right audio source for their assistant. Additionally, for those who prefer auditory learning or seek to gain information while on the go, TTS offers an excellent solution.
In LobeChat, we have carefully curated a selection of high-quality voice options (OpenAI Audio, Microsoft Edge Speech) to cater to users from different regions and cultural backgrounds. Users can select suitable voices based on personal preferences or specific scenarios, thus achieving a personalized communication experience.
LobeChat now supports the latest text-to-image generation technology, allowing
users to directly invoke the text-to-image tool during conversations with the
assistant for creative purposes. By utilizing AI tools such as DALL-E 3,
MidJourney, and Pollinations, assistants can turn your ideas into images,
making the creative process more intimate and immersive.
tags:
- Text-to-Image
- LobeChat
- AI Tools
- DALL-E 3
- MidJourney
---
# Support for Text-to-Image Generation
The latest text-to-image generation technology is now supported, enabling LobeChat users to directly use the text-to-image tool during conversations with their assistant. By harnessing the capabilities of AI tools like [`DALL-E 3`](https://openai.com/dall-e-3), [`MidJourney`](https://www.midjourney.com/), and [`Pollinations`](https://pollinations.ai/), assistants can now transform your ideas into images. This allows for a more intimate and immersive creative process.
title: LobeChat Supports Multi-User Management with Clerk and Next-Auth
description: >-
LobeChat offers various user authentication and management solutions,
including Clerk and Next-Auth, to meet the diverse needs of different users.
tags:
- User Management
- Next-Auth
- Clerk
- Authentication
- Multi-Factor Authentication
---
# Support for Multi-User Management with Clerk and Next-Auth
In modern applications, user management and authentication are crucial features. To cater to the diverse needs of users, LobeChat provides two primary user authentication and management solutions: `next-auth` and `Clerk`. Whether you're looking for simple user registration and login or need more advanced multi-factor authentication and user management, LobeChat can flexibly accommodate your requirements.
## Next-Auth: A Flexible and Powerful Authentication Library
LobeChat integrates `next-auth`, a flexible and powerful authentication library that supports various authentication methods, including OAuth, email login, and credential-based login. With `next-auth`, you can easily implement the following features:
- **User Registration and Login**: Supports multiple authentication methods to meet different user needs.
- **Session Management**: Efficiently manage user sessions to ensure security.
- **Social Login**: Quick login options for various social media platforms.
- **Data Security**: Protects user data privacy and security.
## Clerk: A Modern User Management Platform
For users who require more advanced user management capabilities, LobeChat also supports [Clerk](https://clerk.com), a modern user management platform. Clerk offers a richer set of features, helping you achieve enhanced security and flexibility:
- **Multi-Factor Authentication (MFA)**: Provides an additional layer of security.
- **User Profile Management**: Easily manage user information and settings.
- **Login Activity Monitoring**: Real-time monitoring of user login activities to ensure account security.
- **Scalability**: Supports complex user management needs.
title: LobeChat Supports Ollama for Local Large Language Model (LLM) Calls
description: LobeChat v0.127.0 supports using Ollama to call local large language models.
tags:
- Ollama AI
- LobeChat
- Local LLMs
- AI Conversations
- GPT-4
---
# Support for Ollama Calls to Local Large Language Models 🦙
With the release of LobeChat v0.127.0, we're excited to introduce a fantastic new feature—Ollama AI support! 🤯 Thanks to the robust infrastructure provided by [Ollama AI](https://ollama.ai/) and the [efforts of the community](https://github.com/lobehub/lobe-chat/pull/1265), you can now interact with local LLMs (Large Language Models) within LobeChat! 🤩
We are thrilled to unveil this revolutionary feature to all LobeChat users at this special moment. The integration of Ollama AI not only represents a significant leap in our technology but also reaffirms our commitment to continuously seek more efficient and intelligent ways of communication with our users.
## 💡 How to Start a Conversation with Local LLMs?
If you're facing challenges with private deployments, we strongly recommend trying out the LobeChat Cloud service. We offer comprehensive model support to help you easily embark on your AI conversation journey.
Experience the newly upgraded LobeChat v1.6 and feel the powerful conversational capabilities brought by GPT-4!
```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 intricate installation processes. We've prepared everything for you; just one command is all it takes to start deep conversations with local AI.
title: 'LobeChat 1.0: New Architecture and New Possibilities'
description: >-
LobeChat 1.0 brings a brand-new architecture and features for server-side
databases and user authentication management, opening up new possibilities. On
this basis, LobeChat Cloud has entered beta testing.
tags:
- LobeChat
- Version 1.0
- Server-Side Database
- User Authentication
- Cloud Beta Testing
---
# LobeChat 1.0: New Architecture and New Possibilities
Since announcing our move towards version 1.0 in March, we’ve been busy upgrading every aspect of our platform. After two months of intensive development, we are excited to announce the official release of LobeChat 1.0! Let’s take a look at our new features.
## Server-Side Database Support
The most significant feature of LobeChat 1.0 is the support for server-side databases. In the 0.x era, the lack of persistent storage on the server side made it challenging, if not impossible, to implement many features that users urgently needed, such as knowledge bases, cross-device synchronization, and private assistant markets.
## User Authentication Management
In the 0.x era, the most requested feature to be paired with server-side databases was user authentication management. Previously, we had integrated next-auth and Clerk as our authentication solutions. In response to demands for multi-user management, we have restructured the settings interface into a user panel, consolidating relevant user information within the new user interface.
## LobeChat Cloud Beta Testing
LobeChat Cloud is our commercial version based on the open-source LobeChat, and all the features from version 1.0 are now live in LobeChat Cloud, which has entered beta testing. If you’re interested, you can join our waitlist here. During the beta testing period, a limited number of access slots will be released daily for testing opportunities.
title: 'LobeChat Fully Enters the GPT-4 Era: GPT-4o Mini Officially Launched'
description: >-
LobeChat v1.6 has been released with support for GPT-4o mini, while LobeChat
Cloud services have been fully upgraded to provide users with a more powerful
AI conversation experience.
tags:
- LobeChat
- GPT-4o Mini
- AI Conversation
- Cloud Service
---
# GPT-4o Mini Makes a Stunning Debut, Ushering in a New GPT-4 Era 🚀
We are excited to announce that LobeChat v1.6 is now officially released! This update brings thrilling and significant upgrades:
## 🌟 Major Updates
- **GPT-4o Mini Officially Launched**: OpenAI's entire model lineup has been upgraded to GPT-4
- **LobeChat Cloud Service Upgrade**:
- GPT-3.5-turbo has been upgraded to GPT-4o Mini as the default model
- Providing users with a superior conversation experience
## 🎯 Cloud Service Highlights
LobeChat Cloud offers you a convenient one-stop AI conversation service:
- 📦 **Ready to Use**: Free registration for immediate experience
- 🤖 **Multi-Model Support**:
- GPT-4o Mini
- GPT-4o
- Claude 3.5 Sonnet
- Gemini 1.5 Pro
## 💡 Usage Recommendations
If you encounter difficulties with private deployment, we highly recommend trying the LobeChat Cloud service. We provide comprehensive model support to help you easily embark on your AI conversation journey.
Come and experience the newly upgraded LobeChat v1.6, and feel the powerful conversational capabilities brought by GPT-4!
title: LobeChat Database Docker Image Official Release
description: >-
LobeChat v1.8.0 launches the official database Docker image, supporting cloud
data synchronization and user management, along with comprehensive
self-deployment documentation.
tags:
- LobeChat
- Docker Image
- Cloud Deployment
- Database
- Postgres
---
# LobeChat Database Docker Image: The Final Piece of the Cloud Deployment Puzzle
We are excited to announce the official release of the long-awaited database Docker image for LobeChat v1.8.0! This marks a significant milestone in our server database offerings, providing users with a complete cloud deployment solution.
## 🚀 Core Features
- **Lightweight Deployment**: The Docker image is only 90MB, yet offers full database functionality.
- **Optimized Performance**: Pre-configured with Server Postgres and NextAuth authentication system to ensure optimal connectivity performance.
- **Cloud Synchronization**: Enjoy a seamless cloud data synchronization experience right after deployment.
- **Flexible Authentication**: Supports integration with third-party SSO service providers like Auth0.
## 📘 Upgraded Deployment Documentation
To ensure users can complete the deployment smoothly, we have optimized the structure of our deployment documentation:
- Clear introduction to the framework concepts
- Detailed deployment case studies
- Comprehensive self-deployment operation guide
You can start deploying your own LobeChat service by visiting the [official documentation](https://lobehub.com/en/docs/self-hosting/server-database).
## 🔮 Future Outlook
Our knowledge base feature is also in development, so stay tuned for more exciting updates!
This update marks a significant breakthrough for LobeChat in cloud deployment solutions, making private deployment easier than ever. We appreciate the community's patience, and we will continue to strive to provide users with a better experience.
LobeChat Launches Knowledge Base Feature: A New Experience in Intelligent File
Management and Dialogue
description: >-
LobeChat introduces a brand new knowledge base feature that supports all types
of file management, intelligent vectorization, and file dialogue, making
knowledge management and information retrieval easier and smarter.
tags:
- LobeChat
- Knowledge Base
- File Management
- Open Source
- Cloud Version
---
# Major Release of Knowledge Base Feature: A Revolution in Intelligent File Management and Dialogue
We are excited to announce that the highly anticipated LobeChat knowledge base feature is now officially launched! 🎉 This feature is now available in both the open-source version and the Cloud version (lobechat.com).
## A Brand New File Management Experience
- 📁 **Dedicated File Access**: A new "Files" primary menu has been added to the left sidebar, providing convenient access and management of files.
- 📄 **Support for All File Types**: Upload and store various types of files, including documents, images, audio, and video.
- 👀 **Powerful Preview Functionality**: Built-in support for online previews of multiple formats, including PDF, Excel, Word, PPT, and TXT.
- 🔄 **Expandable Preview Architecture**: The preview component is built on an open-source solution, allowing for future expansion to support more file types.
## Intelligent Knowledge Base Management
- 📚 **Unlimited Knowledge Bases**: Create an unlimited number of knowledge bases to meet different scenario needs.
- 🔍 **Intelligent Vectorization**: Automatically chunk and vectorize files, supporting fragment preview functionality.
- 💡 **Innovative Interaction**: Integrate the Portal interaction paradigm for quick preview and retrieval of file content.
- 🔮 **Promising Future**: The architecture reserves space for expansion, with plans to support intelligent processing of multimedia files such as audio, images, and video.
## Convenient User Experience
- 💪 **Ready to Use**: Supports direct file uploads in the dialogue box, making operations simple and intuitive.
- ☁️ **Two Versions Available**: Offers both an open-source self-hosted version and an official Cloud version to meet different user needs.
All features are open-sourced on the [GitHub repository](https://github.com/lobehub/lobe-chat). We invite you to visit [LobeChat Cloud](http://lobechat.com) to experience the full functionality.
title: LobeChat Perfectly Adapts to OpenAI O1 Series Models
description: >-
LobeChat v1.17.0 now supports OpenAI's latest o1-preview and o1-mini models,
bringing users enhanced coding and mathematical capabilities.
tags:
- OpenAI O1
- LobeChat
- AI Models
- Code Writing
- Mathematical Problem Solving
---
# OpenAI O1 Series Models Now Available on LobeChat
We are excited to announce that LobeChat v1.17.0 fully supports OpenAI's newly launched O1 series models. Whether you are a community edition user or a [Cloud version](https://lobechat.com) subscriber, you can experience this significant update.
## New Model Support
- ✨ OpenAI o1-preview
- ✨ OpenAI o1-mini
## Enhanced Capabilities
The O1 series models excel in the following areas:
- 💻 Code writing and comprehension
- 🔢 Mathematical problem solving
- 🎯 More precise task execution
- ⚡️ Optimized performance
## Experience It Now
- 🌐 Cloud version subscribers can start using it immediately
- 🔧 Self-hosted users can begin experiencing it by updating to v1.17.0
This update marks an important step for LobeChat in supporting the latest AI models. We look forward to seeing how the O1 series models can help users unlock new possibilities!
title: 'Major Update: LobeChat Enters the Era of Artifacts'
description: >-
LobeChat v1.19 brings significant updates, including full feature support for
Claude Artifacts, a brand new discovery page design, and support for GitHub
Models providers, greatly enhancing the capabilities of the AI assistant.
tags:
- LobeChat
- AI Assistant
- Artifacts
- GitHub Models
- Interactive Experience
---
# Major Update: LobeChat Enters the Era of Artifacts
We are excited to announce the official release of LobeChat v1.19! This update introduces several important features that elevate the interactive experience of the AI assistant.
## 🎨 Artifacts Support: Unlocking New Creative Dimensions
In this version, we have nearly fully replicated the core features of Claude Artifacts. Now, you can experience the following in LobeChat:
- SVG graphic generation and display
- HTML page generation and real-time rendering
- Document generation in more formats
It is worth mentioning that the Python code execution feature has also been developed and will be available in future versions. At that time, users will be able to utilize both Claude Artifacts and OpenAI Code Interpreter, significantly enhancing the practicality of the AI assistant.
## 🔍 New Discovery Page: Explore More Possibilities
The discovery page has undergone a major upgrade, now featuring a richer variety of content categories:
- AI Assistant Marketplace
- Plugin Showcase
- Model List
- Provider Introductions
This redesign not only increases the information density of the page but also opens a new window for users to explore AI capabilities. In the future, we plan to further expand the functionality of the discovery page, potentially adding:
- Knowledge Base Sharing
- Artifacts Showcases
- Curated Conversation Sharing
## 🚀 GitHub Models Support: More Model Choices
Thanks to community member [@CloudPassenger](https://github.com/CloudPassenger) for their contributions, LobeChat now supports GitHub Models providers. Users simply need to:
1. Prepare a GitHub Personal Access Token (PAT)
2. Configure provider information in the settings
3. Start using free models available on GitHub Models
The addition of this feature greatly expands the range of models available to users, providing more options for AI conversations in different scenarios.
## 🔜 Future Outlook
We will continue to focus on enhancing the functionality and user experience of LobeChat. In upcoming versions, we plan to:
- Improve the Python code execution feature
- Add support for more types of Artifacts
- Expand the content dimensions of the discovery page
Thank you to every user for your support and feedback. Let’s look forward to more surprises from LobeChat together!
LobeChat v1.26.0 launches the persistent assistant sidebar feature, supporting
quick key switching for easy access to frequently used assistants,
significantly enhancing efficiency.
tags:
- Persistent Assistant
- Sidebar Feature
- User Experience
- Workflow Optimization
---
# Persistent Assistant Sidebar: Creating a More Convenient Conversation Experience
In version v1.26.0, we are excited to introduce a long-awaited new feature — the persistent assistant sidebar. This feature aims to enhance user access to frequently used assistants, making your reliable helpers easily accessible.
## Feature Highlights
- **Quick Switching**: Supports quick switching between different assistants using keyboard shortcuts, making your workflow smoother.
- **Space Optimization**: Activating the sidebar automatically hides the conversation list, providing you with a larger conversation area.
- **Intelligent Display**: Automatically syncs pinned assistants to the sidebar, ensuring that important assistants are always within view.
Currently, this feature is in the experimental stage and is disabled by default. To experience it, you can enable it by adding the environment variable `FEATURE_FLAGS=+pin_list`.
We have already enabled this feature in the Cloud version, and we welcome all users to try it out and provide feedback. You can share your experiences in [GitHub Discussions](https://github.com/lobehub/lobe-chat/discussions/4515) to help us refine this feature further.
## Design Philosophy
The core goal of this update is to optimize work efficiency. By effectively utilizing the sidebar space, we make frequently used assistants easily accessible while hiding the conversation list to expand the conversation area, providing users with a more focused dialogue experience.
We hope this new feature will significantly enhance your user experience. Welcome to upgrade to version v1.26.0 and start experiencing it!
title: LobeChat Supports Sharing Conversations in Text Format (Markdown/JSON)
description: >-
LobeChat v1.28.0 introduces support for exporting conversations in Markdown
and OpenAI format JSON, making it easy to convert conversation content into
note materials, development debugging data, and training corpora,
significantly enhancing the reusability of conversation content.
tags:
- Text Format Export
- Markdown Export
- OpenAI JSON
---
# Upgraded Conversation Sharing: Support for Text Format Export
In the latest version v1.28.0, we have launched the text format export feature for conversation content, now supporting exports in both Markdown and OpenAI format JSON.
The Markdown export feature meets users' needs for directly using conversation content in note-taking and document writing. You can easily save valuable conversation content and manage it across various note-taking applications for reuse.

Additionally, we support exporting conversations in JSON format that complies with OpenAI messages specifications. This format can be used directly for API debugging and serves as high-quality training data for models.

It is particularly noteworthy that we retain the original data of Tools Calling within the conversation, which is crucial for enhancing the model's tool invocation capabilities.
This update greatly expands the sharing and application scenarios for conversation content, and we hope these new features will enhance your user experience.
LobeChat now allows you to create new conversation branches from any message,
freeing your thoughts.
tags:
- Branching Conversations
- LobeChat
- Chat Features
---
# Exciting Launch of Branching Conversations Feature 🎉
We are thrilled to announce that LobeChat has introduced a brand new branching conversations feature, making your conversation experience smoother and more natural:
## Key Features
- **Message Branching**: Create new conversation branches from any message
- **Dual Mode Switching**:
- Continuation Mode: Maintain the original context to continue the discussion
- Standalone Mode: Start a completely new topic based on the selected message
## How to Use
1. Click the "Create Branch" button on the right side of any message
2. Start a new conversation branch
## Feedback and Suggestions
If you have any suggestions or thoughts about the branching conversations feature, feel free to share your feedback with us in the [Feature Feedback](https://github.com/lobehub/lobe-chat/discussions).
title: LobeChat Supports User Data Statistics and Activity Sharing
description: >-
LobeChat now supports multi-dimensional user data statistics and activity
sharing
tags:
- LobeChat
- User Statistics
- Activity Sharing
- AI Data
---
# User Data Statistics and Activity Sharing 💯
Want to know about your activity performance on LobeChat?
Now, you can comprehensively understand your AI data through the statistics feature, and even generate personal activity sharing images to share your LobeChat activity with friends.
## 📊 Data Statistics
- **Statistics**: Number of Assistants / Topics / Messages / Total Word Count
- **Rankings**:
- Model Usage Rate `Top 10`
- Assistant Usage Rate `Top 10`
- Topic Content Volume `Top 10`
- **Heat Map**: Activity distribution over the past year
- **User Activity Sharing**: Generate personal activity sharing images
## 👉 How to Use
1. Requires `PgLite` or `Database` mode
2. Click on your profile picture to enter "Account" - "Data Statistics" page
title: LobeChat Launches New AI Provider Management System
description: >-
LobeChat has revamped its AI Provider Management System, now supporting custom
AI providers and models.
tags:
- LobeChat
- AI Provider
- Provider Management
- Multimodal
---
# New AI Provider Management System 🎉
We are excited to announce that LobeChat has launched a brand new AI Provider Management System, now available in both the open-source version and the Cloud version ([lobechat.com](https://lobechat.com)):
## 🚀 Key Updates
- 🔮 **Custom AI Providers**: You can now add, remove, or edit AI providers as needed.
- ⚡️ **Custom Model and Capability Configuration**: Easily add your own models to meet personalized requirements.
- 🌈 **Multimodal Support**: The new AI Provider Management System fully supports various modalities, including language, images, voice, and more. Stay tuned for video and music generation features!
## 📢 Feedback and Support
If you have any suggestions or thoughts about the new AI Provider Management System, feel free to engage with us in GitHub Discussions.
LobeChat Integrates DeepSeek R1, Bringing a Revolutionary Chain of Thought
Experience
description: >-
LobeChat v1.49.12 fully supports the DeepSeek R1 model, providing users with
an unprecedented interactive experience in the chain of thought.
tags:
- LobeChat
- DeepSeek
- Chain of Thought
---
# Perfect Integration of DeepSeek R1 and it's Deep Thinking Experience 🎉
After nearly 10 days of meticulous refinement, LobeChat has fully integrated the DeepSeek R1 model in version v1.49.12, offering users a revolutionary interactive experience in the chain of thought!
## 🚀 Major Updates
- 🤯 **Comprehensive Support for DeepSeek R1**: Now fully integrated in both the Community and Cloud versions ([lobechat.com](https://lobechat.com)).
- 🧠 **Real-Time Chain of Thought Display**: Transparently presents the AI's reasoning process, making the resolution of complex issues clear and visible.
- ⚡️ **Deep Thinking Experience**: Utilizing Chain of Thought technology, it provides more insightful AI conversations.
- 💫 **Intuitive Problem Analysis**: Makes the analysis of complex issues clear and easy to understand.
## 🌟 How to Use
1. Upgrade to LobeChat v1.49.12 or visit [lobechat.com](https://lobechat.com).
2. Select the DeepSeek R1 model in the settings.
3. Experience a whole new level of intelligent conversation!
## 📢 Feedback and Support
If you encounter any issues while using the application or have suggestions for new features, feel free to engage with us through GitHub Discussions. Let's work together to create a better LobeChat!
@@ -27,28 +27,30 @@ By setting the environment variables `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` and `CL
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,microsoft-entra-id,authentik`. |
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | Required | This is used to enable the NextAuth service. Set it to `1` toenable it; changing this setting requires recompiling the application. Users deploying with the `lobehub/lobe-chat-database` image have this configuration added by default. |
| `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,microsoft-entra-id,authentik`. |
Currently supported identity verification services include:
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.
@@ -15,67 +16,47 @@ Go to [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) to register
## Get Environment Variables
<Steps>
### Add Public and Private Key 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.
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.
<Image alt={'Find the corresponding public and private key environment variables in Clerk'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'} />
<Image
alt={'Find the corresponding public and private key environment variables 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.
### Create and Configure Webhook in 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.
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.
<Image alt={'Add Webhooks endpoint in Clerk'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'} />
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.
</Callout>
>
</Image>
<Image alt={'Configure URL and user events when adding Clerk Webhooks'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'} />
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.
### Add Webhook Secret to Environment Variables
<Callout type={'warning'}>The `https://` in the URL is essential to maintain the integrity of the URL.</Callout>
After creating, you can find the secret of this Webhook in the bottom right corner:
<Image
alt={'Configure URL and user events when adding Clerk Webhooks'}
在 endppint 中填写你的项目 URL,如 `https://your-project.com/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。
在 endppint 中填写你的项目 URL,如 `https://your-project.com/api/webhooks/clerk`。然后在订阅事件(Subscribe to events)中,勾选 user 的三个事件(`user.created` 、`user.deleted`、`user.updated`),然后点击创建。
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.
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.
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.
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.
You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is
consistent with the deployed URL.
</Callout>
<Callout type={'important'}>
You can fill in or modify Allowed Callback URLs after deployment, but make sure the filled URL is
consistent with the deployed URL.
</Callout>
### Add Users
### 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.
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.
When deploying LobeChat, you need to configure the following 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` |
| `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` |
<Callout type={'tip'}>
You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variable#auth0).
</Callout>
</Callout>
</Steps>
<Callout>
@@ -102,19 +81,13 @@ If your enterprise or organization already has a unified identity authentication
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].
<Image
alt="Connecting to an Existing Single Sign-On Service"
<Image alt="Connecting to an Existing Single Sign-On Service" src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec" />
### Configuring Social Login
If your enterprise or organization needs to support external user logins, you can configure social login services in Authentication -> Social.
<Image alt="Connecting to an Existing Single Sign-On Service" src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec" />
### 配置社交登录
如果你的企业或组织需要支持外部人员登录,可以在 Authentication -> Social 中,配置社交登录服务。
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.
We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at [https://lobe.example.com/](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:
Now, let's open and edit the configuration file of your Authelia instance:
Add a new lobe-chat item under identity_providers -> oidc:
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'.
## 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'.
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.
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.
Save the configuration file and restart the Authelia service. Now we have completed the Authelia configuration.
### Configure Environment Variables
### Configure Environment Variables
When deploying LobeChat, you need to configure the following 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 |
| `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](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](https://chat.example.com/api/auth) |
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authelia) for details about the variables.
</Callout>
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authelia) for details about the variables.
## 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'.
## 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'.
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 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`.
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.
Copy the URL of `OpenID Configuration Issuer` and save it.
### Configure Environment Variables
### Configure Environment Variables
When deploying LobeChat, you need to configure the following 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` |
| `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` |
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authentik) for details about the variables.
[Casdoor](https://github.com/casdoor/casdoor) is an open-source authentication service that is rich in features and easy to use.
<Callout type={'tip'}>
If you want to privately deploy Casdoor, we recommend using Docker Compose to deploy it together with the LobeChat database version, allowing LobeChat to share the same Postgres instance.
If you want to privately deploy Casdoor, we recommend using Docker Compose to deploy it together
with the LobeChat database version, allowing LobeChat to share the same Postgres instance.
</Callout>
## Casdoor Configuration Process
@@ -34,20 +35,20 @@ If you are deploying using a public network, the following assumptions apply:
<Steps>
### Create a Casdoor Application
Access your privately deployed Casdoor WebUI (default is `http://localhost:8000/`) to enter the console. The default account is `admin`, and the password is `123`.
Access your privately deployed Casdoor WebUI (default is `http://localhost:8000/`) to enter the console. The default account is `admin`, and the password is `123`.
Go to `Authentication` -> `Applications`, create a `LobeChat` application or directly modify the built-in `built-in` application. You can explore other fields, but you must configure at least the following fields:
Go to `Authentication` -> `Applications`, create a `LobeChat` application or directly modify the built-in `built-in` application. You can explore other fields, but you must configure at least the following fields:
- Name, Display Name: `LobeChat`
- Redirect URLs:
- Local Development Environment: `http://localhost:3210/api/auth/callback/casdoor`
- Local Network IP Deployment: `http://LOBECHAT_IP:3210/api/auth/callback/casdoor`
- Public Network Environment: `https://lobe.example.com/api/auth/callback/casdoor`
- Name, Display Name: `LobeChat`
- Redirect URLs:
- Local Development Environment: `http://localhost:3210/api/auth/callback/casdoor`
- Local Network IP Deployment: `http://LOBECHAT_IP:3210/api/auth/callback/casdoor`
- Public Network Environment: `https://lobe.example.com/api/auth/callback/casdoor`
There are also some optional fields that can enhance user experience:
There are also some optional fields that can enhance user experience:
- Logo: `https://lobehub.com/icon-192x192.png`
- Form CSS, Form CSS (Mobile):
- Logo: `https://lobehub.com/icon-192x192.png`
- Form CSS, Form CSS (Mobile):
```html
<style>
@@ -87,36 +88,69 @@ There are also some optional fields that can enhance user experience:
box-shadow: none;
}
}
</style>
```
Then, copy the `Client ID` and `Client Secret` and save them.
Then, copy the `Client ID` and `Client Secret` and save them.
### Configure Environment Variables
### Disable User Registration
Set the obtained `Client ID` and `Client Secret` as `AUTH_CASDOOR_ID` and `AUTH_CASDOOR_SECRET` in the LobeChat environment variables.
Go to `Identity` -> `Applications`, select the `LobeChat` application, and set `Allow Register` to `false`.
Configure `AUTH_CASDOOR_ISSUER` in the LobeChat environment variables as follows:
<Callout type={'warning'}>
Disabling user registration is necessary to prevent users from registering through the Casdoor login page.
</Callout>
- `http://localhost:8000/` if you are in a local development environment.
- `http://CASDOOR_IP:8000/` if you are privately deploying Casdoor in a local network.
- `https://lobe-auth-api.example.com/` if you are deploying Casdoor in a public network environment.
### Configure Webhook (Optional)
When deploying LobeChat, you need to configure the following environment variables:
> Available on Casdoor `>=1.843.0`.
| Environment Variable | Type | Description |
| --- | --- | --- |
| `NEXT_AUTH_SECRET` | Required | A key for encrypting 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. Fill in `casdoor` for using Casdoor. |
| `AUTH_CASDOOR_ID` | Required | The client ID from the Casdoor application details page. |
| `AUTH_CASDOOR_SECRET` | Required | The client secret from the Casdoor application details page. |
| `AUTH_CASDOOR_ISSUER` | Required | The OpenID Connect issuer for the Casdoor provider. |
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification and needs to be set only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
Configure the Casdoor webhook so that LobeChat can receive notifications when user information is updated.
Go to `Admin` -> `Webhooks`, add a webhook, and fill in the following fields:
> The secret is generated by yourself, you can visit [https://generate-secret.vercel.app/10](https://generate-secret.vercel.app/10) to generate a 10 bit secret.
- Event: `update-user`
Save and Exit, then copy the Webhook secret and fill it in the environment variable \`CASDOOR\_WEBHOOK\_SECRET.
### Configure Environment Variables
Set the obtained `Client ID` and `Client Secret` as `AUTH_CASDOOR_ID` and `AUTH_CASDOOR_SECRET` in the LobeChat environment variables.
Configure `AUTH_CASDOOR_ISSUER` in the LobeChat environment variables as follows:
- `http://localhost:8000/` if you are in a local development environment.
- `http://CASDOOR_IP:8000/` if you are privately deploying Casdoor in a local network.
- `https://lobe-auth-api.example.com/` if you are deploying Casdoor in a public network environment.
When deploying LobeChat, you need to configure the following environment variables:
| `NEXT_AUTH_SECRET` | Required | A key for encrypting 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. Fill in `casdoor` for using Casdoor. |
| `AUTH_CASDOOR_ID` | Required | The client ID from the Casdoor application details page. |
| `AUTH_CASDOOR_SECRET` | Required | The client secret from the Casdoor application details page. |
| `AUTH_CASDOOR_ISSUER` | Required | The OpenID Connect issuer for the Casdoor provider. |
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification and needs to be set only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
| `CASDOOR_WEBHOOK_SECRET` | Optional | A key used to verify whether the request sent by Casdoor is legal. |
<Callout type={'tip'}>
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#casdoor) for details on related variables.
</Callout>
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#casdoor) for
details on related variables.
</Callout>
</Steps>
<Callout type={'info'}>Once deployed successfully, users will be able to authenticate via Casdoor and use LobeChat.</Callout>
<Callout type={'info'}>
Once deployed successfully, users will be able to authenticate via Casdoor and use LobeChat.
### Creating an Application in Cloudflare Zero Trust
### 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`.
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`.
First, we need to visit `https://one.dash.cloudflare.com/` and navigate to `Access - Applications`.
At this point, you have successfully created a SaaS application named `LobeChat SSO` in Cloudflare Zero Trust.
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).
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).
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.
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.
When deploying LobeChat, you need to configure the following 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` |
| `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` |
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Cloudflare%20Zero%20Trust) for details about the variables.
Set whether it is accessible publicly or only accessible to yourself.
Click "Create Github App".
<Image alt="Set whether it is accessible publicly or only accessible to yourself" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
After successful creation, click "Generate a new client secret" to create a client secret.
After successful creation, save the `Client ID` and `Client Secret`.
### Configure Environment Variables
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
When deploying LobeChat, you need to configure the following environment variables:
### Configure 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` |
When deploying LobeChat, you need to configure the following environment variables:
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
| `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` |
<Callout type={'tip'}>
Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
| `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` |
| `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` |
| `LOGTO_WEBHOOK_SIGNING_KEY` | Optional | The key used to verify the legality of Webhook requests sent by Logto. |
<Callout type={'tip'}>
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#logto) for details on related variables.
</Callout>
</Callout>
</Steps>
### Troubleshooting
If you encounter issues during the Logto deployment process, refer to the following common problems:
- `Only roles with the xxx attribute may create roles`:
Check your database user's permissions and ensure that the user in your Logto database has the `admin` role to create roles.
- Error executing `logto db seed` on third-party databases like `Neon`:
Try using the `logto db seed --encrypt-base-role` command.
- Database seeding failed:
Try skipping the seeding process with the `--skip-seed` parameter.
- `Error: role xxx already exists`:
Delete the existing role in the database.
- Database migration failed after a version upgrade:
Try using the command `npx @logto/cli db alteration deploy $version` (e.g., `npx @logto/cli db alteration deploy 1.22.0`).
- I am using Docker deployment and want a one-click upgrade:
Execute the custom command in the container: `sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
<Callout type={'info'}>
After successful deployment, users will be able to authenticate via Logto and use LobeChat.
In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new 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)`.
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:
In the `Redirect URI (optional)` section, for the application type, select `Web`, and in the Callback URL, enter:
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.
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.
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.
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.
Please make sure to save your client secret as this is your only chance to view it.
</Callout>
<Callout type={'important'}>
Please make sure to save your client secret as this is your only chance to view it.
</Callout>
### Add Users
### 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.
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
### Configure Environment Variables
When deploying LobeChat, you need to configure the following 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 `microsoft-entra-id` for Microsoft Entra ID. |
| `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
| `AUTH_MICROSOFT_ENTRA_ID_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` |
<Callout type={'tip'}>
You can refer to [📘 environment
variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
| `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 `microsoft-entra-id` for Microsoft Entra ID. |
| `AUTH_MICROSOFT_ENTRA_ID_ID` | Required | Client ID of the Microsoft Entra ID application. |
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | Required | Client Secret of the Microsoft Entra ID application. |
| `AUTH_MICROSOFT_ENTRA_ID_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` |
<Callout type={'tip'}>
You can refer to [📘 environment
variables](/docs/self-hosting/environment-variable#microsoft-entra-id) for details on related
title: Configure Wechat Authentication Service in LobeChat
description: >-
Learn how to configure Wechat authentication service in LobeChat, including
creating a new Wechat App, setting permissions, and environment variables.
tags:
- Wechat Authentication
- Wechat App
- Environment Variable Configuration
- Single Sign-On
- LobeChat
---
# Configure Wechat Authentication Service
## Wechat Configuration Process
<Steps>
### Create a Wechat Application
Click [here](https://open.weixin.qq.com/cgi-bin/index) and then click "Management Center", "Website Application", and "Create Website Application" in sequence.
Fill in the information as required by the official website prompts and submit for review.
After successful creation, click "Application Details" to obtain the AppID and AppSecret.
### Configure Environment Variables
When deploying LobeChat, you need to configure the following environment variables:
| `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. |
| `WECHAT_CLIENT_ID` | Required | Client ID from the Wechat website application details page |
| `WECHAT_CLIENT_SECRET` | Required | Client Secret from the Wechat website application 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` |
<Callout type={'tip'}>
Go to [📘 Environment Variables](/en/docs/self-hosting/environment-variables/auth#wechat) for more details about related variables.
</Callout>
</Steps>
<Callout type={'info'}>
After successful deployment, users will be able to authenticate through the WeChat Open Platform
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.
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.
When deploying LobeChat, you need to configure the following 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` |
| `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` |
<Callout type={'tip'}>
You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variables/auth#zitadel).
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.