mirror of
https://github.com/lobehub/lobe-chat.git
synced 2026-06-19 13:54:10 +00:00
Compare commits
787 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 69dac2fc6e | |||
| 75c88425e0 | |||
| 30b2639c4b | |||
| 81867c413c | |||
| f1ffc2c60c | |||
| a9eadafd9f | |||
| 0e1146aa8d | |||
| 997ba159d2 | |||
| ab8aa0a485 | |||
| 00cba71e27 | |||
| 86544a8455 | |||
| f3c49cfd6a | |||
| b6eeba5850 | |||
| 963f7889de | |||
| 541f27591a | |||
| 3fb966cf37 | |||
| 17d0a0fade | |||
| 14a98748bb | |||
| 38c564337a | |||
| 2382a35810 | |||
| 3d3c2ce72f | |||
| 7f82512b54 | |||
| f678ca7c63 | |||
| d9410b57c1 | |||
| 471e3ed499 | |||
| d4b3581289 | |||
| 80e291068f | |||
| cd30fcc32d | |||
| d5a8fcb816 | |||
| 94eb4ddf25 | |||
| 300bf463ea | |||
| 5824745ba1 | |||
| 9f099529f6 | |||
| 00a33bf702 | |||
| 8f54b67085 | |||
| a79ab7abe5 | |||
| 847cd330a7 | |||
| e170384593 | |||
| 5693e6839a | |||
| 15d96d52a4 | |||
| 468482e6c0 | |||
| fc1ed4a4d1 | |||
| cb26cde322 | |||
| f9310fca43 | |||
| 7f8c3791a4 | |||
| c814c31b52 | |||
| 8c170024b2 | |||
| 27e4980a05 | |||
| 4011a1e5fa | |||
| eceb618fd8 | |||
| 57d56d3ada | |||
| eb6b0b2118 | |||
| 71a638e61e | |||
| ccb56cd9ff | |||
| b0d6af2882 | |||
| 2e7ef1e79f | |||
| 5ee59e3c91 | |||
| 1a0330c23e | |||
| 28ee9d48e3 | |||
| dfd1f093fe | |||
| 6f7cf45493 | |||
| 9c4c72338c | |||
| 0c242515af | |||
| a5fc7146e8 | |||
| 307eeb0ba4 | |||
| 23a3fdaee9 | |||
| f4726438da | |||
| 53f20f511f | |||
| 969de07a94 | |||
| 54ebd3dd5a | |||
| 15d8a3564b | |||
| 958693d7a3 | |||
| 87ad586c4a | |||
| 0fb7ff82c7 | |||
| 6b25f28e66 | |||
| d38ab02677 | |||
| b51b4fd2b3 | |||
| 27e1452d17 | |||
| c599fcc3aa | |||
| e01686cf23 | |||
| f7a7c1e5e9 | |||
| 5e02602457 | |||
| 8bf1b9062a | |||
| 347f821266 | |||
| 3ec3af025b | |||
| 44aab4d809 | |||
| 5ba7f4152c | |||
| 9cabc7b99d | |||
| ffea8bf4e8 | |||
| c9f90a6ca5 | |||
| 4a9980bcd8 | |||
| 8263956cb7 | |||
| ad01dd2975 | |||
| 061613830c | |||
| 55b541615c | |||
| 302e7d7439 | |||
| 53b5e06df7 | |||
| 7a84ad9b8d | |||
| 55679a0f6f | |||
| 8ef42f3b69 | |||
| 9669a02f14 | |||
| fa938f9b12 | |||
| 357b4d4320 | |||
| dd6863e34e | |||
| d1039d6838 | |||
| 3bcb5c01a7 | |||
| ec4c7820f7 | |||
| 57fd3e9842 | |||
| 6f1e599e2f | |||
| 4af5b2775c | |||
| 095ceb24f0 | |||
| cb0a3bc2fc | |||
| 257a87e664 | |||
| e4663ece64 | |||
| efde928302 | |||
| 8c768ed12c | |||
| 8d6b78f9f8 | |||
| 47efd1ba43 | |||
| 9a14ee6211 | |||
| 80bf865e77 | |||
| 41fd9829b1 | |||
| a76d2bff77 | |||
| 3659bbc2cb | |||
| 0f6c7fa6fb | |||
| 250bbcbd55 | |||
| bc9829fa1f | |||
| 41acc241e2 | |||
| e82a2de4a4 | |||
| c8db2bb273 | |||
| 69f85558b7 | |||
| 2c336cf3da | |||
| ae84362fdf | |||
| 74a09e27ff | |||
| 237cc76318 | |||
| 27d00ff2ec | |||
| 00922134c1 | |||
| e65bb09792 | |||
| ef45b3604d | |||
| b61b5fcb03 | |||
| 337fcffdb2 | |||
| fb18f5a95c | |||
| 3f9498e2d1 | |||
| 93d982f992 | |||
| 86f563f51a | |||
| ad0fe99947 | |||
| 469bd10cc4 | |||
| 0d4e62558a | |||
| 7cd78d0efd | |||
| 8c8af6b8af | |||
| 406cd46b3a | |||
| f4fcc81128 | |||
| 9db7791056 | |||
| c477588f95 | |||
| f1b97cdf81 | |||
| d08990e2e0 | |||
| 9e31a98352 | |||
| d47c2c6d7a | |||
| 2b1aca9ed1 | |||
| 4485171b5c | |||
| d4b93c895a | |||
| 3bc2d721be | |||
| 3ff6c3b4aa | |||
| 19e02d6d42 | |||
| d44ee11758 | |||
| 9579e41d54 | |||
| 325c44ac79 | |||
| d3dba17eaf | |||
| 704c7c8eab | |||
| 5aa59c0609 | |||
| 2bc30ea2a8 | |||
| e9df49dfc8 | |||
| bef09e4db2 | |||
| 1d1de88589 | |||
| 4d0bba8738 | |||
| bc70f93b18 | |||
| 02136f5a62 | |||
| fbf9fb1f1f | |||
| 3e051dd6c0 | |||
| 5f7599a6ba | |||
| 6ef421b209 | |||
| 3ecdba1a1b | |||
| 7e6aaa0344 | |||
| 8d53670c0b | |||
| 8490b8c07e | |||
| 7841122aed | |||
| 89b7da071d | |||
| 94087ada5f | |||
| f7a713848f | |||
| 3219c547a7 | |||
| 56c36cdae0 | |||
| 87a6185494 | |||
| 7b6ab1d038 | |||
| 6667334496 | |||
| 4168e5a9a5 | |||
| 28cb7fec0a | |||
| d49329a052 | |||
| 5d59f0d4dc | |||
| 84d3e96563 | |||
| c9cb7d917c | |||
| 59bdf12b1e | |||
| 097038ef17 | |||
| d4b4b288ca | |||
| 88531dbb37 | |||
| cab591dc63 | |||
| a6aa88ec47 | |||
| 3fc61bb1f4 | |||
| ccb0003bff | |||
| b30f55705f | |||
| fbe9ec0e48 | |||
| 057f45586b | |||
| 276ef26d37 | |||
| 7a458b9e31 | |||
| b91fb84876 | |||
| 2ac3dff653 | |||
| 3a51aeaeda | |||
| 5bacc9dcc0 | |||
| 864b5b6711 | |||
| dd61bce75c | |||
| ef02986e69 | |||
| 36ef241984 | |||
| c99908dc2f | |||
| 47d27a39a5 | |||
| c5e2a30aaf | |||
| 6a35f55ebc | |||
| 74849f77bf | |||
| 0b9e9bf8c1 | |||
| 4fb98da08f | |||
| 7b74abc3ae | |||
| 0218b31278 | |||
| 352cb90eb6 | |||
| f394b216d9 | |||
| da965f67af | |||
| a0a95927d4 | |||
| b3f4f13b9c | |||
| c5d372f525 | |||
| fc67a3404a | |||
| cb9104d2f9 | |||
| 5f96a506c9 | |||
| 2fc2043bc1 | |||
| cc2f536658 | |||
| b5360d5cfb | |||
| bac6739b8c | |||
| 5bb76ba13c | |||
| 577daddb7d | |||
| 45977c3d4d | |||
| 2d7803a84a | |||
| 6b97177d4b | |||
| 4003b8ebed | |||
| 261d068028 | |||
| 4e66ea3086 | |||
| 07364c9196 | |||
| b49f3e9025 | |||
| 61692b93c3 | |||
| 1fc7ca6d1f | |||
| e190db47d3 | |||
| fe9bc16842 | |||
| 977301b71d | |||
| 4e2c80124f | |||
| 25c80d1548 | |||
| 32f442d65f | |||
| c3b9fa525e | |||
| d6c6cdaa09 | |||
| 1fde7b23f1 | |||
| d7bdb62a83 | |||
| ddbe482b25 | |||
| 8d40d71ce2 | |||
| dab282ffa9 | |||
| a46eadf2d8 | |||
| e061a209cb | |||
| 63f2149fa4 | |||
| 09bf8f0a05 | |||
| 895d8ee237 | |||
| 938e32f53e | |||
| 30e010fe14 | |||
| 2dc712a9be | |||
| e5dc0996cf | |||
| e4733fb209 | |||
| 0285d958fd | |||
| 4ae2080a1f | |||
| 118f8327f8 | |||
| 6b4c15b8ce | |||
| 728c0c6263 | |||
| 373a24c472 | |||
| 995017b61a | |||
| f444e66a59 | |||
| e9e8da414c | |||
| b62c48a715 | |||
| c6b9250448 | |||
| 3e8d9c56a7 | |||
| a3e2e58632 | |||
| f4cbc6fb36 | |||
| e5c0959f30 | |||
| 37b70f0f2d | |||
| 93bd401a6c | |||
| 2c99f2f9a6 | |||
| 588cba75ff | |||
| daa60e9af3 | |||
| 8aea602ca4 | |||
| 6398362ad0 | |||
| 49376381ea | |||
| cc2cd35d65 | |||
| 2ebcf3066a | |||
| 961e8e0601 | |||
| 57bfa6aa2a | |||
| 35fa3ee5c4 | |||
| b61cec7444 | |||
| 1509763ad7 | |||
| 426aaf8df0 | |||
| b5276def88 | |||
| 446db7a203 | |||
| 302f85be84 | |||
| adeb9863af | |||
| 4a96a05109 | |||
| b13e9bab42 | |||
| b197f8e977 | |||
| 51ea929815 | |||
| c2278d1657 | |||
| a20aad04d7 | |||
| a4ce534120 | |||
| 13d975e48a | |||
| 4584a6c354 | |||
| 6a89a8c2ba | |||
| 40df6c2215 | |||
| d1e5662316 | |||
| 3ce0485652 | |||
| 4bafe8cc70 | |||
| 848cf4fdfd | |||
| 1708e325ac | |||
| 6b6bd5ce5c | |||
| cdb0425940 | |||
| ecb04c9d50 | |||
| ab796a79d6 | |||
| bf6699c422 | |||
| 5b83f2e76d | |||
| 7fd883dc86 | |||
| 4c2aaf6705 | |||
| e684f10fdc | |||
| d57392e12d | |||
| d07423814b | |||
| f19a981fdc | |||
| 3e4a875997 | |||
| 48e3b85029 | |||
| 8ed48c93f2 | |||
| 017a2998f0 | |||
| 2243bbb049 | |||
| 5a012e4996 | |||
| a75100f4c7 | |||
| 0737775d03 | |||
| 771279ce72 | |||
| 257fda1231 | |||
| 9bef2fb52b | |||
| 49a3f682ed | |||
| be0d7f6329 | |||
| 6b5713abf3 | |||
| 6ab727e3d3 | |||
| c888a2d67a | |||
| 43b8274471 | |||
| cfbadca690 | |||
| b78328eee0 | |||
| 4aff39640f | |||
| 55bc785277 | |||
| 87555bcae9 | |||
| 8c4ce2696d | |||
| 1e53ae781b | |||
| 03ae464fc5 | |||
| 7e89b2dc94 | |||
| d421e9321e | |||
| 15d12df942 | |||
| 718f477e3f | |||
| 10c2af180e | |||
| e503aa259e | |||
| 025d0bcd62 | |||
| 474f7964b7 | |||
| f9556e42c5 | |||
| 63b22ce739 | |||
| 0667ec2873 | |||
| 437a477b20 | |||
| bfd9317feb | |||
| aabec1fe1d | |||
| d07b4a2303 | |||
| e0e231c7a8 | |||
| 6ec6b08fd7 | |||
| ee48e30758 | |||
| 8b4cd1309b | |||
| ac4109364e | |||
| 3414fdd2c5 | |||
| d11af79c61 | |||
| 79ddef3ef7 | |||
| aafa727811 | |||
| 4b44e4bcf1 | |||
| f4d0e34545 | |||
| 959dd883c0 | |||
| 3bf6bdc17d | |||
| 3e2e7eeb5a | |||
| dcb465eab7 | |||
| 5af600a53d | |||
| 3696aa6eac | |||
| 5cc967ad95 | |||
| 3cdcb95431 | |||
| d7c3edba71 | |||
| 1d19aa6fac | |||
| 79964b73c4 | |||
| 9085207f6e | |||
| 6482f8a332 | |||
| d8b522d338 | |||
| 500dca3223 | |||
| cf7a2d642e | |||
| 0d7e6651d7 | |||
| ae4aa0e2e1 | |||
| 0d7e364bc5 | |||
| ac317ded63 | |||
| 91912cf725 | |||
| 3957ac2f46 | |||
| f8bdf82f03 | |||
| 9be3cd4231 | |||
| 892f9613b1 | |||
| 4079495897 | |||
| 1fb62e84d9 | |||
| ae9c802e16 | |||
| eea2d2cc69 | |||
| 704de4a029 | |||
| 0c4d937c0c | |||
| 9df47a3990 | |||
| 5de327de75 | |||
| 80de12ff49 | |||
| 0676d0a77a | |||
| 8a185d363a | |||
| a53af9f0d6 | |||
| 32d484a3a9 | |||
| 073fc65dfd | |||
| f399197364 | |||
| b71206d784 | |||
| 0b5b945f18 | |||
| 4108795ace | |||
| 9f9408411f | |||
| 540d199f18 | |||
| 056d50e55b | |||
| 6e8d1a7fa9 | |||
| 3f2a7c4472 | |||
| fc13b42fe2 | |||
| cbc5967d37 | |||
| 29d14b6b12 | |||
| 723b89dd3e | |||
| 2a3840bb1e | |||
| 5aa4bec6e8 | |||
| 9e43450658 | |||
| 89803a5ced | |||
| fcbc7b929d | |||
| c299d78760 | |||
| 2aaa57dafb | |||
| 6457060bae | |||
| 9b321e6a32 | |||
| 260c0fd5ec | |||
| 2f5d95e004 | |||
| dcca8d87e3 | |||
| 419977b59b | |||
| d0f54629c8 | |||
| 283ef89734 | |||
| e529108ff6 | |||
| a1149301a3 | |||
| b0db95d312 | |||
| 85d6035810 | |||
| 40d599eb8a | |||
| 899a6e6387 | |||
| aa74d20244 | |||
| b5fed64672 | |||
| 7171ab84a1 | |||
| 00f9d34001 | |||
| 620df2f20d | |||
| 985869c32a | |||
| 670c79708f | |||
| 4509b7a3df | |||
| f7fa432bfb | |||
| a93007f322 | |||
| 8e316bdc3c | |||
| 8bdd72cb53 | |||
| ae49c68215 | |||
| 9bb387e451 | |||
| 27edbb234f | |||
| 6610361681 | |||
| db860b56e0 | |||
| adecae5227 | |||
| d8693220d0 | |||
| 673109ba46 | |||
| f7524248c5 | |||
| 1eaf48ce89 | |||
| e40690817e | |||
| 1a3d1d7013 | |||
| 096501d92b | |||
| 8b681906b7 | |||
| f1dbf8d693 | |||
| e99b06007b | |||
| 9b7bd9906f | |||
| edbad23c23 | |||
| 4cf08e0caf | |||
| e84853c1e6 | |||
| badcb7bf8a | |||
| 4e3013a0f0 | |||
| 159f25526d | |||
| 1953220ac6 | |||
| dc2a291cce | |||
| 7d782b1165 | |||
| a90a75e613 | |||
| db4e9c7fbb | |||
| 80fd5a8027 | |||
| e2b35502bf | |||
| dedd7840d6 | |||
| 283157a84b | |||
| d330c2e4d3 | |||
| 5556eee106 | |||
| 8903aed12b | |||
| f899c824d3 | |||
| 48a97a48ab | |||
| 3499403fa0 | |||
| 0e1a022607 | |||
| ee61653481 | |||
| 6a88524222 | |||
| 76d97fca25 | |||
| 95cd8227dc | |||
| ed4e048557 | |||
| a6a6e6b9f9 | |||
| 39410f8910 | |||
| 353153822b | |||
| 7c38c413e3 | |||
| 2905cb5734 | |||
| 2b7076b2f7 | |||
| 74d96da257 | |||
| d3d26d70bd | |||
| 53f3595dfe | |||
| 5cf358420e | |||
| d74653e5a3 | |||
| cc088449ce | |||
| d00d75dc17 | |||
| b63765ccce | |||
| cffce51a57 | |||
| 28ebb97d3a | |||
| 7da05cec8c | |||
| 6eb26d1701 | |||
| e447045185 | |||
| 44e81e23f1 | |||
| 492cfd4657 | |||
| 1f236c5253 | |||
| 60f7079779 | |||
| 58a86fc3bc | |||
| 43d5fdeb2c | |||
| ddacca0e0f | |||
| 64ea5391b6 | |||
| 696ae8f907 | |||
| c72eceebec | |||
| e5d81eadd5 | |||
| ec08854013 | |||
| 61c1d33b41 | |||
| 496036bf99 | |||
| 182f8d9b57 | |||
| abab5e2eba | |||
| 2bec8766a5 | |||
| 7f2dc6e1c6 | |||
| ff91b326d0 | |||
| 8ab4a30b3f | |||
| ae39c3593b | |||
| 355e275f4b | |||
| 6d479ed54d | |||
| cd09a074af | |||
| 6a786eba80 | |||
| 2415215ab0 | |||
| b719522fb1 | |||
| 8268a0c2eb | |||
| 0f31920db9 | |||
| 4b41ad494e | |||
| 75d3b6a00d | |||
| ed56c5e010 | |||
| 9b3213719b | |||
| e5cda3abd3 | |||
| 4b8a550be4 | |||
| 71cc32bdc2 | |||
| 403265888b | |||
| 4fe4e899bd | |||
| 9942fb345d | |||
| 0361628166 | |||
| b6df3009e6 | |||
| deb03ad8d7 | |||
| 3c4b7eac7e | |||
| a2704edd38 | |||
| 91042429c4 | |||
| 789da45b4b | |||
| 41b3d12dca | |||
| e3702a691f | |||
| 3c54b72c0b | |||
| 5d4355c1de | |||
| 58c60de55d | |||
| 994568fda3 | |||
| 8c9e4de42d | |||
| 70e5272a4e | |||
| dad50e5498 | |||
| f652ccd2b9 | |||
| d8afe47c91 | |||
| 13c3455414 | |||
| 38b55ba0dc | |||
| f4822a15e2 | |||
| d4dc3f219d | |||
| eaeeb57fb7 | |||
| 27bd861d04 | |||
| df02b2bbf8 | |||
| 6d91457906 | |||
| 1794074eb3 | |||
| c5ce33367a | |||
| 63c571b275 | |||
| b89aeebe13 | |||
| 02b91a5f76 | |||
| cda7e439d1 | |||
| b2f3c33f66 | |||
| 45ad962d63 | |||
| acbc5d82cc | |||
| f98bb5abc1 | |||
| 7008022d9a | |||
| 9353744747 | |||
| 7b075efda8 | |||
| ccdd68eb90 | |||
| 0784156dab | |||
| 07e23962d8 | |||
| 2734cf3b75 | |||
| 59b1448b20 | |||
| 1b78642f6a | |||
| 66d4edda41 | |||
| 223e3e40db | |||
| 2e84a4ec4b | |||
| 3fef83e3c6 | |||
| 8f7d907e36 | |||
| 0bb7833de7 | |||
| 6e027e8f0b | |||
| 6dc10b0639 | |||
| 462e09b7a1 | |||
| c9715300ec | |||
| 2203fd4eff | |||
| a42b7b7fa0 | |||
| d0275fdc40 | |||
| 7bfd431ba8 | |||
| e99685aff1 | |||
| c5db091a9a | |||
| e5b4b60c3d | |||
| ebdd626b7f | |||
| 17aca7df8a | |||
| 944435df9b | |||
| 979849cf7b | |||
| a6eff23f61 | |||
| 2b98c07170 | |||
| 637fbf48a5 | |||
| 55a64b8fd5 | |||
| 38bb45cb39 | |||
| a189c8193f | |||
| 51798603f7 | |||
| 7749703280 | |||
| f56dab7a48 | |||
| cc8a7f4a43 | |||
| f5ed8f8777 | |||
| ab68c3c375 | |||
| ea59e243bb | |||
| d60c09b707 | |||
| 06c235b426 | |||
| 0d4536dec1 | |||
| 3534c0df3d | |||
| 807574be1c | |||
| 86760c04c3 | |||
| 4fc4fa65e4 | |||
| cf693f4e4c | |||
| ae1b6c3066 | |||
| 414477fe77 | |||
| dc286158f5 | |||
| e75c71add8 | |||
| d9f43f7117 | |||
| 0c7dd825ff | |||
| 018896502b | |||
| 91be2a4b6d | |||
| fa1a07f8c8 | |||
| e7324ea3a0 | |||
| a32673249a | |||
| 92789cd401 | |||
| 8c024127c2 | |||
| 2f83f7a8c0 | |||
| 6dbc9c51f6 | |||
| 9b38c9cb3b | |||
| ac839ff159 | |||
| cbe469a804 | |||
| de203d7ffd | |||
| 413aa581a3 | |||
| b4a160b680 | |||
| 261e14ae4b | |||
| 98ae7b897d | |||
| a33c75b22a | |||
| 73a4e3d6bc | |||
| 2595879656 | |||
| 08f505f1f9 | |||
| aa07c405a2 | |||
| 0e073ad9b2 | |||
| b4808f877e | |||
| a638238333 | |||
| e3f65d728d | |||
| d8c05ce412 | |||
| 95240008f8 | |||
| f98375cd98 | |||
| 05528356d8 | |||
| 5c9933bdf2 | |||
| bcea92077d | |||
| a20dfbdb8e | |||
| a0014ec587 | |||
| 4d539b6803 | |||
| b5e1146a6a | |||
| b11d08e820 | |||
| 2bb59e27c4 | |||
| 6315d2cd29 | |||
| b5042c3857 | |||
| 99c2251b1b | |||
| b2cfeb446e | |||
| dd1dc8907b | |||
| 4ff0b74ac9 | |||
| ee9b8cd6eb | |||
| bd534fc02a | |||
| 00cee010e3 | |||
| 416f6c97ae | |||
| eb26c79f53 | |||
| dfab4ce8ab | |||
| 5a37c93712 | |||
| eed9357ab5 | |||
| 0ac5802d1e | |||
| b2ffdb8aa5 | |||
| d8da56fba7 | |||
| da11b557ed | |||
| 0f57f1edb2 | |||
| 90494bec6e | |||
| 32013b49fb | |||
| df082e5618 | |||
| 7c4f0f202d | |||
| 78fac8bbad | |||
| 1726d8523e | |||
| b49e6239b4 | |||
| 47870a42e2 | |||
| ddd3b539cd | |||
| d99fdf5b3c | |||
| 1f9e86e916 | |||
| 9b303e0c6c | |||
| 72df0234c2 | |||
| 0249da7a7a | |||
| 0b19c2097b | |||
| aa4f619d10 | |||
| a58e672561 | |||
| f3893a3d88 | |||
| 4d1a4cd800 | |||
| 3cffc7e5fc | |||
| d4a46cccc6 | |||
| b7edbd319c | |||
| 8a8eabc0b9 | |||
| 3e4262deb3 | |||
| 00dc29b97c | |||
| cf4609558c | |||
| 800e51a712 | |||
| 6a663a72e8 | |||
| e65a192b57 | |||
| 4d083435b4 | |||
| c6e03ec8b2 | |||
| a09962cd04 | |||
| 9c5822a1fe | |||
| fcccd57adb | |||
| 08c4537f58 | |||
| 2b1b2a2213 | |||
| 4d25a14cc2 | |||
| ea116c28ea | |||
| da0e8a8cb0 | |||
| aec67b4c5f | |||
| dc15d0023c | |||
| b2775b571b | |||
| 4a49bc7009 | |||
| 69085acfd1 | |||
| 552d3fbfa7 | |||
| 90865706cc | |||
| f50b8de2a0 | |||
| f05225046c | |||
| 2c3331a591 | |||
| 45aac54df6 | |||
| 35c459c33d | |||
| 8e0b634505 | |||
| 62ba16b116 | |||
| 90e0198cab | |||
| 7f8a1b6ea4 | |||
| 0578d6dc6c | |||
| 19c426b3d8 | |||
| dc76d6f8fc | |||
| 6f3331d462 |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/universal:2",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/node:1": {}
|
||||
}
|
||||
}
|
||||
+18
-4
@@ -6,7 +6,7 @@
|
||||
|
||||
|
||||
########################################
|
||||
######## Model Provider Service ########
|
||||
########## AI Provider Service #########
|
||||
########################################
|
||||
|
||||
### OpenAI ###
|
||||
@@ -33,7 +33,7 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
||||
# AZURE_ENDPOINT=https://docs-test-001.openai.azure.com
|
||||
|
||||
# Azure's API version, follows the YYYY-MM-DD format
|
||||
# AZURE_API_VERSION=2024-06-01
|
||||
# AZURE_API_VERSION=2024-10-21
|
||||
|
||||
|
||||
### Anthropic Service ####
|
||||
@@ -106,6 +106,7 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
||||
|
||||
### DeepSeek AI ####
|
||||
|
||||
# DEEPSEEK_PROXY_URL=https://api.deepseek.com/v1
|
||||
# DEEPSEEK_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
### Qwen AI ####
|
||||
@@ -121,6 +122,15 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
||||
|
||||
# SILICONCLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
|
||||
### TencentCloud AI ####
|
||||
|
||||
# TENCENT_CLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
### PPIO ####
|
||||
|
||||
# PPIO_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
########################################
|
||||
############ Market Service ############
|
||||
########################################
|
||||
@@ -189,6 +199,7 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
||||
|
||||
|
||||
# NextAuth related configurations
|
||||
# NEXT_PUBLIC_ENABLE_NEXT_AUTH=1
|
||||
# NEXT_AUTH_SECRET=
|
||||
|
||||
# Auth0 configurations
|
||||
@@ -207,5 +218,8 @@ OPENAI_API_KEY=sk-xxxxxxxxx
|
||||
# DATABASE_URL=postgres://username:password@host:port/database
|
||||
|
||||
# use `openssl rand -base64 32` to generate a key for the encryption of the database
|
||||
# we use this key to encrypt the user api key
|
||||
# KEY_VAULTS_SECRET=xxxxx/xxxxxxxxxxxxxx=
|
||||
# we use this key to encrypt the user api key and proxy url
|
||||
#KEY_VAULTS_SECRET=xxxxx/xxxxxxxxxxxxxx=
|
||||
|
||||
# Specify the Embedding model and Reranker model(unImplemented)
|
||||
# DEFAULT_FILES_CONFIG="embedding_model=openai/embedding-text-3-small,reranker_model=cohere/rerank-english-v3.0,query_mode=full_text"
|
||||
|
||||
@@ -5,7 +5,7 @@ labels: ['🐛 Bug']
|
||||
body:
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: '📦 Environment'
|
||||
label: '📦 Platform'
|
||||
multiple: true
|
||||
options:
|
||||
- 'Official Preview'
|
||||
@@ -13,16 +13,26 @@ body:
|
||||
- 'Zeabur'
|
||||
- 'Sealos'
|
||||
- 'Netlify'
|
||||
- 'Docker'
|
||||
- 'Self hosting Docker'
|
||||
- 'Other'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: '📦 Deploymenet mode'
|
||||
multiple: true
|
||||
options:
|
||||
- 'client db (lobe-chat image)'
|
||||
- 'client pgelite db (lobe-chat-pglite image)'
|
||||
- 'server db(lobe-chat-database image)'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: '📌 Version'
|
||||
validations:
|
||||
required: true
|
||||
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: '💻 Operating System'
|
||||
|
||||
@@ -2,7 +2,15 @@ name: '🐛 反馈缺陷'
|
||||
description: '反馈一个问题缺陷'
|
||||
title: '[Bug] '
|
||||
labels: ['🐛 Bug']
|
||||
type: Bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
在创建新的 Issue 之前,请先[搜索已有问题](https://github.com/lobehub/lobe-chat/issues),如果发现已有类似的问题,请给它 **👍 点赞**,这样可以帮助我们更快地解决问题。
|
||||
如果你在使用过程中遇到问题,可以尝试以下方式获取帮助:
|
||||
- 在 [GitHub Discussions](https://github.com/lobehub/lobe-chat/discussions) 的版块发起讨论。
|
||||
- 在 [LobeChat 社区](https://discord.gg/AYFPHvv2jT) 提问,与其他用户交流。
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: '📦 部署环境'
|
||||
@@ -17,6 +25,16 @@ body:
|
||||
- 'Other'
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: '📦 部署模式'
|
||||
multiple: true
|
||||
options:
|
||||
- '客户端模式(lobe-chat 镜像)'
|
||||
- '客户端 Pglite 模式(lobe-chat-pglite 镜像)'
|
||||
- '服务端模式(lobe-chat-database 镜像)'
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
attributes:
|
||||
label: '📌 软件版本'
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
contact_links:
|
||||
- name: Questions and ideas | 问题和想法
|
||||
- name: Ask a question for self-hosting | 咨询自部署问题
|
||||
url: https://github.com/lobehub/lobe-chat/discussions/new?category=self-hosting-%E7%A7%81%E6%9C%89%E5%8C%96%E9%83%A8%E7%BD%B2
|
||||
about: Please post questions, and ideas in discussions. | 请在讨论区发布问题和想法。
|
||||
- name: Questions and ideas | 其他问题和想法
|
||||
url: https://github.com/lobehub/lobe-chat/discussions/new/choose
|
||||
about: Please post questions, and ideas in discussions. | 请在讨论区发布问题和想法。
|
||||
|
||||
@@ -4,43 +4,158 @@ on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
pull_request:
|
||||
types: [synchronize, labeled, unlabeled]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
REGISTRY_IMAGE: lobehub/lobe-chat-database
|
||||
PR_TAG_PREFIX: pr-
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
# 添加 PR label 触发条件
|
||||
if: |
|
||||
(github.event_name == 'pull_request' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'Build Docker')) ||
|
||||
github.event_name != 'pull_request'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
os: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
os: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build ${{ matrix.platform }} Image
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
- name: Prepare
|
||||
run: |
|
||||
platform=${{ matrix.platform }}
|
||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
- name: Log in to Docker Hub
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# 为 PR 生成特殊的 tag
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
# PR 构建使用特殊的 tag
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
# release 构建使用版本号
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: lobehub/lobe-chat-database
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=tag
|
||||
- name: Get commit SHA
|
||||
if: github.ref == 'refs/heads/main'
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Build and export
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
context: .
|
||||
file: ./Dockerfile.database
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
rm -rf /tmp/digests
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digest-${{ env.PLATFORM_PAIR }}
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
name: Merge
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/digests
|
||||
pattern: digest-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
# 为 merge job 添加 PR metadata 生成
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile.database # 指定使用 Dockerfile.database 文件
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
name: Publish Docker Pglite Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
pull_request:
|
||||
types: [synchronize, labeled, unlabeled]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
REGISTRY_IMAGE: lobehub/lobe-chat-pglite
|
||||
PR_TAG_PREFIX: pr-
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# 添加 PR label 触发条件
|
||||
if: |
|
||||
(github.event_name == 'pull_request' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'Build Docker')) ||
|
||||
github.event_name != 'pull_request'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
os: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
os: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build ${{ matrix.platform }} Image
|
||||
steps:
|
||||
- name: Prepare
|
||||
run: |
|
||||
platform=${{ matrix.platform }}
|
||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# 为 PR 生成特殊的 tag
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
# PR 构建使用特殊的 tag
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
# release 构建使用版本号
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Get commit SHA
|
||||
if: github.ref == 'refs/heads/main'
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build and export
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
context: .
|
||||
file: ./Dockerfile.pglite
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
rm -rf /tmp/digests
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digest-${{ env.PLATFORM_PAIR }}
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
name: Merge
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/digests
|
||||
pattern: digest-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# 为 merge job 添加 PR metadata 生成
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||
+140
-24
@@ -4,42 +4,158 @@ on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
pull_request:
|
||||
types: [synchronize, labeled, unlabeled]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
REGISTRY_IMAGE: lobehub/lobe-chat
|
||||
PR_TAG_PREFIX: pr-
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: Push Docker image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
build:
|
||||
# 添加 PR label 触发条件
|
||||
if: |
|
||||
(github.event_name == 'pull_request' &&
|
||||
contains(github.event.pull_request.labels.*.name, 'Build Docker')) ||
|
||||
github.event_name != 'pull_request'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- platform: linux/amd64
|
||||
os: ubuntu-latest
|
||||
- platform: linux/arm64
|
||||
os: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: Build ${{ matrix.platform }} Image
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
- name: Prepare
|
||||
run: |
|
||||
platform=${{ matrix.platform }}
|
||||
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
- name: Log in to Docker Hub
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
# 为 PR 生成特殊的 tag
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
# PR 构建使用特殊的 tag
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
# release 构建使用版本号
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: lobehub/lobe-chat
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=ref,event=tag
|
||||
- name: Get commit SHA
|
||||
if: github.ref == 'refs/heads/main'
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Build and export
|
||||
id: build
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: ${{ matrix.platform }}
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
build-args: |
|
||||
SHA=${{ steps.vars.outputs.sha_short }}
|
||||
outputs: type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||
|
||||
- name: Export digest
|
||||
run: |
|
||||
rm -rf /tmp/digests
|
||||
mkdir -p /tmp/digests
|
||||
digest="${{ steps.build.outputs.digest }}"
|
||||
touch "/tmp/digests/${digest#sha256:}"
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: digest-${{ env.PLATFORM_PAIR }}
|
||||
path: /tmp/digests/*
|
||||
if-no-files-found: error
|
||||
retention-days: 1
|
||||
|
||||
merge:
|
||||
name: Merge
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout base
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download digests
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/digests
|
||||
pattern: digest-*
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
# 为 merge job 添加 PR metadata 生成
|
||||
- name: Generate PR metadata
|
||||
if: github.event_name == 'pull_request'
|
||||
id: pr_meta
|
||||
run: |
|
||||
branch_name="${{ github.head_ref }}"
|
||||
sanitized_branch=$(echo "${branch_name}" | sed -E 's/[^a-zA-Z0-9_.-]+/-/g')
|
||||
echo "pr_tag=${sanitized_branch}-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
images: ${{ env.REGISTRY_IMAGE }}
|
||||
tags: |
|
||||
type=raw,value=${{ env.PR_TAG_PREFIX }}${{ steps.pr_meta.outputs.pr_tag }},enable=${{ github.event_name == 'pull_request' }}
|
||||
type=semver,pattern={{version}},enable=${{ github.event_name != 'pull_request' }}
|
||||
type=raw,value=latest,enable=${{ github.event_name != 'pull_request' }}
|
||||
|
||||
- name: Docker login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_USER }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Create manifest list and push
|
||||
working-directory: /tmp/digests
|
||||
run: |
|
||||
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
||||
$(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
@@ -18,28 +18,20 @@ on:
|
||||
jobs:
|
||||
lighthouse-badger-advanced:
|
||||
name: ${{ matrix.NAME }}
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 8
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- NAME: 'LobeChat | Welcome'
|
||||
URLS: 'https://chat-preview.lobehub.com/welcome'
|
||||
BADGES_ARGS: '-b pagespeed -o lighthouse/welcome -r'
|
||||
COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Welcome'
|
||||
- NAME: 'LobeChat | Chat'
|
||||
URLS: 'https://chat-preview.lobehub.com/chat'
|
||||
URLS: 'https://lobechat.com/chat'
|
||||
BADGES_ARGS: '-b pagespeed -o lighthouse/chat -r'
|
||||
COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Chat'
|
||||
- NAME: 'LobeChat | Market'
|
||||
URLS: 'https://chat-preview.lobehub.com/market'
|
||||
BADGES_ARGS: '-b pagespeed -o lighthouse/market -r'
|
||||
COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Market'
|
||||
- NAME: 'LobeChat | Settings'
|
||||
URLS: 'https://chat-preview.lobehub.com/settings'
|
||||
BADGES_ARGS: '-b pagespeed -o lighthouse/settings -r'
|
||||
COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Settings'
|
||||
URLS: 'https://lobechat.com/discover'
|
||||
BADGES_ARGS: '-b pagespeed -o lighthouse/discover -r'
|
||||
COMMIT_MESSAGE: '🤖 chore: Lighthouse Results | Discover'
|
||||
|
||||
steps:
|
||||
- name: Preparatory Tasks
|
||||
|
||||
@@ -68,3 +68,4 @@ public/swe-worker*
|
||||
*.patch
|
||||
*.pdf
|
||||
vertex-ai-key.json
|
||||
.pnpm-store
|
||||
@@ -0,0 +1,6 @@
|
||||
const config = require('@lobehub/lint').remarklint;
|
||||
|
||||
module.exports = {
|
||||
...config,
|
||||
plugins: ['remark-mdx', ...config.plugins],
|
||||
};
|
||||
+5419
File diff suppressed because it is too large
Load Diff
+24
-12
@@ -67,8 +67,9 @@ ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package.json pnpm-workspace.yaml ./
|
||||
COPY .npmrc ./
|
||||
COPY packages ./packages
|
||||
|
||||
RUN \
|
||||
# If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
|
||||
@@ -79,15 +80,14 @@ RUN \
|
||||
fi \
|
||||
# Set the registry for corepack
|
||||
&& export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \
|
||||
# Update corepack to latest (nodejs/corepack#612)
|
||||
&& npm i -g corepack@latest \
|
||||
# Enable corepack
|
||||
&& corepack enable \
|
||||
# Use pnpm for corepack
|
||||
&& corepack use pnpm \
|
||||
&& corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \
|
||||
# Install the dependencies
|
||||
&& pnpm i \
|
||||
# Add sharp dependencies
|
||||
&& mkdir -p /deps \
|
||||
&& pnpm add sharp --prefix /deps
|
||||
&& pnpm i
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -99,13 +99,9 @@ FROM busybox:latest AS app
|
||||
|
||||
COPY --from=base /distroless/ /
|
||||
|
||||
COPY --from=builder /app/public /app/public
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=builder /app/.next/standalone /app/
|
||||
COPY --from=builder /app/.next/static /app/.next/static
|
||||
COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm
|
||||
|
||||
# Copy server launcher
|
||||
COPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js
|
||||
@@ -129,6 +125,10 @@ ENV NODE_ENV="production" \
|
||||
NODE_TLS_REJECT_UNAUTHORIZED="" \
|
||||
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
# Make the middleware rewrite through local as default
|
||||
# refs: https://github.com/lobehub/lobe-chat/issues/5876
|
||||
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"
|
||||
|
||||
# set hostname to localhost
|
||||
ENV HOSTNAME="0.0.0.0" \
|
||||
PORT="3210"
|
||||
@@ -177,6 +177,8 @@ ENV \
|
||||
HUNYUAN_API_KEY="" HUNYUAN_MODEL_LIST="" \
|
||||
# InternLM
|
||||
INTERNLM_API_KEY="" INTERNLM_MODEL_LIST="" \
|
||||
# Jina
|
||||
JINA_API_KEY="" JINA_MODEL_LIST="" JINA_PROXY_URL="" \
|
||||
# Minimax
|
||||
MINIMAX_API_KEY="" MINIMAX_MODEL_LIST="" \
|
||||
# Mistral
|
||||
@@ -185,6 +187,8 @@ ENV \
|
||||
MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
|
||||
# Novita
|
||||
NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
|
||||
# Nvidia NIM
|
||||
NVIDIA_API_KEY="" NVIDIA_MODEL_LIST="" NVIDIA_PROXY_URL="" \
|
||||
# Ollama
|
||||
ENABLED_OLLAMA="" OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \
|
||||
# OpenAI
|
||||
@@ -193,8 +197,12 @@ ENV \
|
||||
OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
|
||||
# Perplexity
|
||||
PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
|
||||
# PPIO
|
||||
PPIO_API_KEY="" PPIO_MODEL_LIST="" \
|
||||
# Qwen
|
||||
QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
|
||||
# SambaNova
|
||||
SAMBANOVA_API_KEY="" SAMBANOVA_MODEL_LIST="" \
|
||||
# SenseNova
|
||||
SENSENOVA_API_KEY="" SENSENOVA_MODEL_LIST="" \
|
||||
# SiliconCloud
|
||||
@@ -209,14 +217,18 @@ ENV \
|
||||
TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
|
||||
# Upstage
|
||||
UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
|
||||
# vLLM
|
||||
VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
|
||||
# Wenxin
|
||||
WENXIN_ACCESS_KEY="" WENXIN_SECRET_KEY="" WENXIN_MODEL_LIST="" \
|
||||
WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
|
||||
# xAI
|
||||
XAI_API_KEY="" XAI_MODEL_LIST="" XAI_PROXY_URL="" \
|
||||
# 01.AI
|
||||
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
|
||||
# Zhipu
|
||||
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST=""
|
||||
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" \
|
||||
# Tencent Cloud
|
||||
TENCENT_CLOUD_API_KEY="" TENCENT_CLOUD_MODEL_LIST=""
|
||||
|
||||
USER nextjs
|
||||
|
||||
|
||||
+34
-14
@@ -38,6 +38,7 @@ FROM base AS builder
|
||||
ARG USE_CN_MIRROR
|
||||
ARG NEXT_PUBLIC_BASE_PATH
|
||||
ARG NEXT_PUBLIC_SERVICE_MODE
|
||||
ARG NEXT_PUBLIC_ENABLE_NEXT_AUTH
|
||||
ARG NEXT_PUBLIC_SENTRY_DSN
|
||||
ARG NEXT_PUBLIC_ANALYTICS_POSTHOG
|
||||
ARG NEXT_PUBLIC_POSTHOG_HOST
|
||||
@@ -49,6 +50,7 @@ ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
|
||||
ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"
|
||||
|
||||
ENV NEXT_PUBLIC_SERVICE_MODE="${NEXT_PUBLIC_SERVICE_MODE:-server}" \
|
||||
NEXT_PUBLIC_ENABLE_NEXT_AUTH="${NEXT_PUBLIC_ENABLE_NEXT_AUTH:-1}" \
|
||||
APP_URL="http://app.com" \
|
||||
DATABASE_DRIVER="node" \
|
||||
DATABASE_URL="postgres://postgres:password@localhost:5432/postgres" \
|
||||
@@ -74,8 +76,9 @@ ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json ./
|
||||
COPY package.json pnpm-workspace.yaml ./
|
||||
COPY .npmrc ./
|
||||
COPY packages ./packages
|
||||
|
||||
RUN \
|
||||
# If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
|
||||
@@ -86,15 +89,19 @@ RUN \
|
||||
fi \
|
||||
# Set the registry for corepack
|
||||
&& export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \
|
||||
# Update corepack to latest (nodejs/corepack#612)
|
||||
&& npm i -g corepack@latest \
|
||||
# Enable corepack
|
||||
&& corepack enable \
|
||||
# Use pnpm for corepack
|
||||
&& corepack use pnpm \
|
||||
&& corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \
|
||||
# Install the dependencies
|
||||
&& pnpm i \
|
||||
# Add sharp and db migration dependencies
|
||||
# Add db migration dependencies
|
||||
&& mkdir -p /deps \
|
||||
&& pnpm add sharp pg drizzle-orm --prefix /deps
|
||||
&& cd /deps \
|
||||
&& pnpm init \
|
||||
&& pnpm add pg drizzle-orm
|
||||
|
||||
COPY . .
|
||||
|
||||
@@ -106,23 +113,20 @@ FROM busybox:latest AS app
|
||||
|
||||
COPY --from=base /distroless/ /
|
||||
|
||||
COPY --from=builder /app/public /app/public
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=builder /app/.next/standalone /app/
|
||||
COPY --from=builder /app/.next/static /app/.next/static
|
||||
|
||||
# copy dependencies
|
||||
COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm
|
||||
COPY --from=builder /deps/node_modules/pg /app/node_modules/pg
|
||||
COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm
|
||||
|
||||
# Copy database migrations
|
||||
COPY --from=builder /app/src/database/migrations /app/migrations
|
||||
COPY --from=builder /app/scripts/migrateServerDB/docker.cjs /app/docker.cjs
|
||||
COPY --from=builder /app/scripts/migrateServerDB/errorHint.js /app/errorHint.js
|
||||
|
||||
# copy dependencies
|
||||
COPY --from=builder /deps/node_modules/.pnpm /app/node_modules/.pnpm
|
||||
COPY --from=builder /deps/node_modules/pg /app/node_modules/pg
|
||||
COPY --from=builder /deps/node_modules/drizzle-orm /app/node_modules/drizzle-orm
|
||||
|
||||
# Copy server launcher
|
||||
COPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js
|
||||
|
||||
@@ -145,6 +149,10 @@ ENV NODE_ENV="production" \
|
||||
NODE_TLS_REJECT_UNAUTHORIZED="" \
|
||||
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
# Make the middleware rewrite through local as default
|
||||
# refs: https://github.com/lobehub/lobe-chat/issues/5876
|
||||
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"
|
||||
|
||||
# set hostname to localhost
|
||||
ENV HOSTNAME="0.0.0.0" \
|
||||
PORT="3210"
|
||||
@@ -212,6 +220,8 @@ ENV \
|
||||
HUNYUAN_API_KEY="" HUNYUAN_MODEL_LIST="" \
|
||||
# InternLM
|
||||
INTERNLM_API_KEY="" INTERNLM_MODEL_LIST="" \
|
||||
# Jina
|
||||
JINA_API_KEY="" JINA_MODEL_LIST="" JINA_PROXY_URL="" \
|
||||
# Minimax
|
||||
MINIMAX_API_KEY="" MINIMAX_MODEL_LIST="" \
|
||||
# Mistral
|
||||
@@ -220,6 +230,8 @@ ENV \
|
||||
MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
|
||||
# Novita
|
||||
NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
|
||||
# Nvidia NIM
|
||||
NVIDIA_API_KEY="" NVIDIA_MODEL_LIST="" NVIDIA_PROXY_URL="" \
|
||||
# Ollama
|
||||
ENABLED_OLLAMA="" OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \
|
||||
# OpenAI
|
||||
@@ -228,8 +240,12 @@ ENV \
|
||||
OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
|
||||
# Perplexity
|
||||
PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
|
||||
# PPIO
|
||||
PPIO_API_KEY="" PPIO_MODEL_LIST="" \
|
||||
# Qwen
|
||||
QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
|
||||
# SambaNova
|
||||
SAMBANOVA_API_KEY="" SAMBANOVA_MODEL_LIST="" \
|
||||
# SenseNova
|
||||
SENSENOVA_API_KEY="" SENSENOVA_MODEL_LIST="" \
|
||||
# SiliconCloud
|
||||
@@ -244,14 +260,18 @@ ENV \
|
||||
TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
|
||||
# Upstage
|
||||
UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
|
||||
# vLLM
|
||||
VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
|
||||
# Wenxin
|
||||
WENXIN_ACCESS_KEY="" WENXIN_SECRET_KEY="" WENXIN_MODEL_LIST="" \
|
||||
WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
|
||||
# xAI
|
||||
XAI_API_KEY="" XAI_MODEL_LIST="" XAI_PROXY_URL="" \
|
||||
# 01.AI
|
||||
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
|
||||
# Zhipu
|
||||
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST=""
|
||||
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" \
|
||||
# Tencent Cloud
|
||||
TENCENT_CLOUD_API_KEY="" TENCENT_CLOUD_MODEL_LIST=""
|
||||
|
||||
USER nextjs
|
||||
|
||||
|
||||
@@ -0,0 +1,238 @@
|
||||
## Set global build ENV
|
||||
ARG NODEJS_VERSION="22"
|
||||
|
||||
## Base image for all building stages
|
||||
FROM node:${NODEJS_VERSION}-slim AS base
|
||||
|
||||
ARG USE_CN_MIRROR
|
||||
|
||||
ENV DEBIAN_FRONTEND="noninteractive"
|
||||
|
||||
RUN \
|
||||
# If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
|
||||
if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \
|
||||
sed -i "s/deb.debian.org/mirrors.ustc.edu.cn/g" "/etc/apt/sources.list.d/debian.sources"; \
|
||||
fi \
|
||||
# Add required package
|
||||
&& apt update \
|
||||
&& apt install ca-certificates proxychains-ng -qy \
|
||||
# Prepare required package to distroless
|
||||
&& mkdir -p /distroless/bin /distroless/etc /distroless/etc/ssl/certs /distroless/lib \
|
||||
# Copy proxychains to distroless
|
||||
&& cp /usr/lib/$(arch)-linux-gnu/libproxychains.so.4 /distroless/lib/libproxychains.so.4 \
|
||||
&& cp /usr/lib/$(arch)-linux-gnu/libdl.so.2 /distroless/lib/libdl.so.2 \
|
||||
&& cp /usr/bin/proxychains4 /distroless/bin/proxychains \
|
||||
&& cp /etc/proxychains4.conf /distroless/etc/proxychains4.conf \
|
||||
# Copy node to distroless
|
||||
&& cp /usr/lib/$(arch)-linux-gnu/libstdc++.so.6 /distroless/lib/libstdc++.so.6 \
|
||||
&& cp /usr/lib/$(arch)-linux-gnu/libgcc_s.so.1 /distroless/lib/libgcc_s.so.1 \
|
||||
&& cp /usr/local/bin/node /distroless/bin/node \
|
||||
# Copy CA certificates to distroless
|
||||
&& cp /etc/ssl/certs/ca-certificates.crt /distroless/etc/ssl/certs/ca-certificates.crt \
|
||||
# Cleanup temp files
|
||||
&& rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||
|
||||
## Builder image, install all the dependencies and build the app
|
||||
FROM base AS builder
|
||||
|
||||
ARG USE_CN_MIRROR
|
||||
ARG NEXT_PUBLIC_BASE_PATH
|
||||
ARG NEXT_PUBLIC_SENTRY_DSN
|
||||
ARG NEXT_PUBLIC_ANALYTICS_POSTHOG
|
||||
ARG NEXT_PUBLIC_POSTHOG_HOST
|
||||
ARG NEXT_PUBLIC_POSTHOG_KEY
|
||||
ARG NEXT_PUBLIC_ANALYTICS_UMAMI
|
||||
ARG NEXT_PUBLIC_UMAMI_SCRIPT_URL
|
||||
ARG NEXT_PUBLIC_UMAMI_WEBSITE_ID
|
||||
|
||||
ENV NEXT_PUBLIC_CLIENT_DB="pglite"
|
||||
ENV NEXT_PUBLIC_BASE_PATH="${NEXT_PUBLIC_BASE_PATH}"
|
||||
|
||||
# Sentry
|
||||
ENV NEXT_PUBLIC_SENTRY_DSN="${NEXT_PUBLIC_SENTRY_DSN}" \
|
||||
SENTRY_ORG="" \
|
||||
SENTRY_PROJECT=""
|
||||
|
||||
# Posthog
|
||||
ENV NEXT_PUBLIC_ANALYTICS_POSTHOG="${NEXT_PUBLIC_ANALYTICS_POSTHOG}" \
|
||||
NEXT_PUBLIC_POSTHOG_HOST="${NEXT_PUBLIC_POSTHOG_HOST}" \
|
||||
NEXT_PUBLIC_POSTHOG_KEY="${NEXT_PUBLIC_POSTHOG_KEY}"
|
||||
|
||||
# Umami
|
||||
ENV NEXT_PUBLIC_ANALYTICS_UMAMI="${NEXT_PUBLIC_ANALYTICS_UMAMI}" \
|
||||
NEXT_PUBLIC_UMAMI_SCRIPT_URL="${NEXT_PUBLIC_UMAMI_SCRIPT_URL}" \
|
||||
NEXT_PUBLIC_UMAMI_WEBSITE_ID="${NEXT_PUBLIC_UMAMI_WEBSITE_ID}"
|
||||
|
||||
# Node
|
||||
ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json pnpm-workspace.yaml ./
|
||||
COPY .npmrc ./
|
||||
COPY packages ./packages
|
||||
|
||||
RUN \
|
||||
# If you want to build docker in China, build with --build-arg USE_CN_MIRROR=true
|
||||
if [ "${USE_CN_MIRROR:-false}" = "true" ]; then \
|
||||
export SENTRYCLI_CDNURL="https://npmmirror.com/mirrors/sentry-cli"; \
|
||||
npm config set registry "https://registry.npmmirror.com/"; \
|
||||
echo 'canvas_binary_host_mirror=https://npmmirror.com/mirrors/canvas' >> .npmrc; \
|
||||
fi \
|
||||
# Set the registry for corepack
|
||||
&& export COREPACK_NPM_REGISTRY=$(npm config get registry | sed 's/\/$//') \
|
||||
# Update corepack to latest (nodejs/corepack#612)
|
||||
&& npm i -g corepack@latest \
|
||||
# Enable corepack
|
||||
&& corepack enable \
|
||||
# Use pnpm for corepack
|
||||
&& corepack use $(sed -n 's/.*"packageManager": "\(.*\)".*/\1/p' package.json) \
|
||||
# Install the dependencies
|
||||
&& pnpm i
|
||||
|
||||
COPY . .
|
||||
|
||||
# run build standalone for docker version
|
||||
RUN npm run build:docker
|
||||
|
||||
## Application image, copy all the files for production
|
||||
FROM busybox:latest AS app
|
||||
|
||||
COPY --from=base /distroless/ /
|
||||
|
||||
# Automatically leverage output traces to reduce image size
|
||||
# https://nextjs.org/docs/advanced-features/output-file-tracing
|
||||
COPY --from=builder /app/.next/standalone /app/
|
||||
|
||||
# Copy server launcher
|
||||
COPY --from=builder /app/scripts/serverLauncher/startServer.js /app/startServer.js
|
||||
|
||||
RUN \
|
||||
# Add nextjs:nodejs to run the app
|
||||
addgroup -S -g 1001 nodejs \
|
||||
&& adduser -D -G nodejs -H -S -h /app -u 1001 nextjs \
|
||||
# Set permission for nextjs:nodejs
|
||||
&& chown -R nextjs:nodejs /app /etc/proxychains4.conf
|
||||
|
||||
## Production image, copy all the files and run next
|
||||
FROM scratch
|
||||
|
||||
# Copy all the files from app, set the correct permission for prerender cache
|
||||
COPY --from=app / /
|
||||
|
||||
ENV NODE_ENV="production" \
|
||||
NODE_OPTIONS="--dns-result-order=ipv4first --use-openssl-ca" \
|
||||
NODE_EXTRA_CA_CERTS="" \
|
||||
NODE_TLS_REJECT_UNAUTHORIZED="" \
|
||||
SSL_CERT_DIR="/etc/ssl/certs/ca-certificates.crt"
|
||||
|
||||
# Make the middleware rewrite through local as default
|
||||
# refs: https://github.com/lobehub/lobe-chat/issues/5876
|
||||
ENV MIDDLEWARE_REWRITE_THROUGH_LOCAL="1"
|
||||
|
||||
# set hostname to localhost
|
||||
ENV HOSTNAME="0.0.0.0" \
|
||||
PORT="3210"
|
||||
|
||||
# General Variables
|
||||
ENV ACCESS_CODE="" \
|
||||
API_KEY_SELECT_MODE="" \
|
||||
DEFAULT_AGENT_CONFIG="" \
|
||||
SYSTEM_AGENT="" \
|
||||
FEATURE_FLAGS="" \
|
||||
PROXY_URL=""
|
||||
|
||||
# Model Variables
|
||||
ENV \
|
||||
# AI21
|
||||
AI21_API_KEY="" AI21_MODEL_LIST="" \
|
||||
# Ai360
|
||||
AI360_API_KEY="" AI360_MODEL_LIST="" \
|
||||
# Anthropic
|
||||
ANTHROPIC_API_KEY="" ANTHROPIC_MODEL_LIST="" ANTHROPIC_PROXY_URL="" \
|
||||
# Amazon Bedrock
|
||||
AWS_ACCESS_KEY_ID="" AWS_SECRET_ACCESS_KEY="" AWS_REGION="" AWS_BEDROCK_MODEL_LIST="" \
|
||||
# Azure OpenAI
|
||||
AZURE_API_KEY="" AZURE_API_VERSION="" AZURE_ENDPOINT="" AZURE_MODEL_LIST="" \
|
||||
# Baichuan
|
||||
BAICHUAN_API_KEY="" BAICHUAN_MODEL_LIST="" \
|
||||
# Cloudflare
|
||||
CLOUDFLARE_API_KEY="" CLOUDFLARE_BASE_URL_OR_ACCOUNT_ID="" CLOUDFLARE_MODEL_LIST="" \
|
||||
# DeepSeek
|
||||
DEEPSEEK_API_KEY="" DEEPSEEK_MODEL_LIST="" \
|
||||
# Fireworks AI
|
||||
FIREWORKSAI_API_KEY="" FIREWORKSAI_MODEL_LIST="" \
|
||||
# Gitee AI
|
||||
GITEE_AI_API_KEY="" GITEE_AI_MODEL_LIST="" \
|
||||
# GitHub
|
||||
GITHUB_TOKEN="" GITHUB_MODEL_LIST="" \
|
||||
# Google
|
||||
GOOGLE_API_KEY="" GOOGLE_MODEL_LIST="" GOOGLE_PROXY_URL="" \
|
||||
# Groq
|
||||
GROQ_API_KEY="" GROQ_MODEL_LIST="" GROQ_PROXY_URL="" \
|
||||
# Higress
|
||||
HIGRESS_API_KEY="" HIGRESS_MODEL_LIST="" HIGRESS_PROXY_URL="" \
|
||||
# HuggingFace
|
||||
HUGGINGFACE_API_KEY="" HUGGINGFACE_MODEL_LIST="" HUGGINGFACE_PROXY_URL="" \
|
||||
# Hunyuan
|
||||
HUNYUAN_API_KEY="" HUNYUAN_MODEL_LIST="" \
|
||||
# InternLM
|
||||
INTERNLM_API_KEY="" INTERNLM_MODEL_LIST="" \
|
||||
# Jina
|
||||
JINA_API_KEY="" JINA_MODEL_LIST="" JINA_PROXY_URL="" \
|
||||
# Minimax
|
||||
MINIMAX_API_KEY="" MINIMAX_MODEL_LIST="" \
|
||||
# Mistral
|
||||
MISTRAL_API_KEY="" MISTRAL_MODEL_LIST="" \
|
||||
# Moonshot
|
||||
MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
|
||||
# Novita
|
||||
NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
|
||||
# Nvidia NIM
|
||||
NVIDIA_API_KEY="" NVIDIA_MODEL_LIST="" NVIDIA_PROXY_URL="" \
|
||||
# Ollama
|
||||
ENABLED_OLLAMA="" OLLAMA_MODEL_LIST="" OLLAMA_PROXY_URL="" \
|
||||
# OpenAI
|
||||
OPENAI_API_KEY="" OPENAI_MODEL_LIST="" OPENAI_PROXY_URL="" \
|
||||
# OpenRouter
|
||||
OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
|
||||
# Perplexity
|
||||
PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
|
||||
# Qwen
|
||||
QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
|
||||
# SambaNova
|
||||
SAMBANOVA_API_KEY="" SAMBANOVA_MODEL_LIST="" \
|
||||
# SenseNova
|
||||
SENSENOVA_API_KEY="" SENSENOVA_MODEL_LIST="" \
|
||||
# SiliconCloud
|
||||
SILICONCLOUD_API_KEY="" SILICONCLOUD_MODEL_LIST="" SILICONCLOUD_PROXY_URL="" \
|
||||
# Spark
|
||||
SPARK_API_KEY="" SPARK_MODEL_LIST="" \
|
||||
# Stepfun
|
||||
STEPFUN_API_KEY="" STEPFUN_MODEL_LIST="" \
|
||||
# Taichu
|
||||
TAICHU_API_KEY="" TAICHU_MODEL_LIST="" \
|
||||
# TogetherAI
|
||||
TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
|
||||
# Upstage
|
||||
UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
|
||||
# vLLM
|
||||
VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
|
||||
# Wenxin
|
||||
WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
|
||||
# xAI
|
||||
XAI_API_KEY="" XAI_MODEL_LIST="" XAI_PROXY_URL="" \
|
||||
# 01.AI
|
||||
ZEROONE_API_KEY="" ZEROONE_MODEL_LIST="" \
|
||||
# Zhipu
|
||||
ZHIPU_API_KEY="" ZHIPU_MODEL_LIST="" \
|
||||
# Tencent Cloud
|
||||
TENCENT_CLOUD_API_KEY="" TENCENT_CLOUD_MODEL_LIST=""
|
||||
|
||||
USER nextjs
|
||||
|
||||
EXPOSE 3210/tcp
|
||||
|
||||
ENTRYPOINT ["/bin/node"]
|
||||
|
||||
CMD ["/app/startServer.js"]
|
||||
-844
@@ -1,844 +0,0 @@
|
||||
<div align="center"><a name="readme-top"></a>
|
||||
|
||||
[![][image-banner]][vercel-link]
|
||||
|
||||
# Lobe Chat
|
||||
|
||||
オープンソースのモダンデザイン ChatGPT/LLMs UI / フレームワーク。<br/>
|
||||
音声合成、マルチモーダル、拡張可能な([function call][docs-functionc-call])プラグインシステムをサポート。<br/>
|
||||
プライベートな OpenAI ChatGPT/Claude/Gemini/Groq/Ollama チャットアプリケーションをワンクリックで**無料**でデプロイ。
|
||||
|
||||
[English](./README.md) · [简体中文](./README.zh-CN.md) · **日本語** · [公式サイト][official-site] · [変更履歴][changelog] · [ドキュメント][docs] · [ブログ][blog] · [フィードバック][github-issues-link]
|
||||
|
||||
<!-- SHIELD GROUP -->
|
||||
|
||||
[![][github-release-shield]][github-release-link]
|
||||
[![][docker-release-shield]][docker-release-link]
|
||||
[![][vercel-shield]][vercel-link]
|
||||
[![][discord-shield]][discord-link]<br/>
|
||||
[![][codecov-shield]][codecov-link]
|
||||
[![][github-action-test-shield]][github-action-test-link]
|
||||
[![][github-action-release-shield]][github-action-release-link]
|
||||
[![][github-releasedate-shield]][github-releasedate-link]<br/>
|
||||
[![][github-contributors-shield]][github-contributors-link]
|
||||
[![][github-forks-shield]][github-forks-link]
|
||||
[![][github-stars-shield]][github-stars-link]
|
||||
[![][github-issues-shield]][github-issues-link]
|
||||
[![][github-license-shield]][github-license-link]<br>
|
||||
[![][sponsor-shield]][sponsor-link]
|
||||
|
||||
**LobeChat リポジトリを共有**
|
||||
|
||||
[![][share-x-shield]][share-x-link]
|
||||
[![][share-telegram-shield]][share-telegram-link]
|
||||
[![][share-whatsapp-shield]][share-whatsapp-link]
|
||||
[![][share-reddit-shield]][share-reddit-link]
|
||||
[![][share-weibo-shield]][share-weibo-link]
|
||||
[![][share-mastodon-shield]][share-mastodon-link]
|
||||
[![][share-linkedin-shield]][share-linkedin-link]
|
||||
|
||||
<sup>新しい時代の思考と創造を先導します。あなたのために、スーパー個人のために作られました。</sup>
|
||||
|
||||
[![][github-trending-shield]][github-trending-url]
|
||||
|
||||
[![][image-overview]][vercel-link]
|
||||
|
||||
</div>
|
||||
|
||||
<details>
|
||||
<summary><kbd>目次</kbd></summary>
|
||||
|
||||
#### TOC
|
||||
|
||||
- [👋🏻 はじめに & コミュニティに参加](#-はじめに--コミュニティに参加)
|
||||
- [✨ 特徴](#-特徴)
|
||||
- [`1` マルチモデルサービスプロバイダーのサポート](#1-マルチモデルサービスプロバイダーのサポート)
|
||||
- [`2` ローカル大規模言語モデル (LLM) のサポート](#2-ローカル大規模言語モデル-llm-のサポート)
|
||||
- [`3` モデルの視覚認識](#3-モデルの視覚認識)
|
||||
- [`4` TTS & STT 音声会話](#4-tts--stt-音声会話)
|
||||
- [`5` テキストから画像生成](#5-テキストから画像生成)
|
||||
- [`6` プラグインシステム (Function Calling)](#6-プラグインシステム-function-calling)
|
||||
- [`7` エージェントマーケット (GPTs)](#7-エージェントマーケット-gpts)
|
||||
- [`8` ローカル / リモートデータベースのサポート](#8-ローカル--リモートデータベースのサポート)
|
||||
- [`9` マルチユーザ管理のサポート](#9-マルチユーザ管理のサポート)
|
||||
- [`10` プログレッシブウェブアプリ (PWA)](#10-プログレッシブウェブアプリ-pwa)
|
||||
- [`11` モバイルデバイスの適応](#11-モバイルデバイスの適応)
|
||||
- [`12` カスタムテーマ](#12-カスタムテーマ)
|
||||
- [`*` その他の特徴](#-その他の特徴)
|
||||
- [⚡️ パフォーマンス](#️-パフォーマンス)
|
||||
- [🛳 自己ホスティング](#-自己ホスティング)
|
||||
- [`A` Vercel、Zeabur、Sealos でのデプロイ](#a-vercelzeabursealos-でのデプロイ)
|
||||
- [`B` Docker でのデプロイ](#b-docker-でのデプロイ)
|
||||
- [環境変数](#環境変数)
|
||||
- [📦 エコシステム](#-エコシステム)
|
||||
- [🧩 プラグイン](#-プラグイン)
|
||||
- [⌨️ ローカル開発](#️-ローカル開発)
|
||||
- [🤝 コントリビュート](#-コントリビュート)
|
||||
- [❤️ スポンサー](#️-スポンサー)
|
||||
- [🔗 その他の製品](#-その他の製品)
|
||||
|
||||
####
|
||||
|
||||
<br/>
|
||||
|
||||
</details>
|
||||
|
||||
## 👋🏻 はじめに & コミュニティに参加
|
||||
|
||||
私たちは、AIGC のためのモダンデザインコンポーネントとツールを提供することを目指すデザインエンジニアのグループです。
|
||||
ブートストラッピングアプローチを採用することで、開発者とユーザーに対してよりオープンで透明性のある、使いやすい製品エコシステムを提供することを目指しています。
|
||||
|
||||
ユーザーやプロの開発者にとって、LobeHub はあなたの AI エージェントの遊び場となるでしょう。LobeChat は現在アクティブに開発中であり、遭遇した[問題][issues-link]についてのフィードバックを歓迎します。
|
||||
|
||||
| [![][vercel-shield-badge]][vercel-link] | インストールや登録は不要です!私たちのウェブサイトにアクセスして、直接体験してください。 |
|
||||
| :---------------------------------------- | :---------------------------------------------------------------------------------------------------------------------- |
|
||||
| [![][discord-shield-badge]][discord-link] | 私たちの Discord コミュニティに参加しましょう!ここでは、LobeHub の開発者や他の熱心なユーザーとつながることができます。 |
|
||||
|
||||
> \[!IMPORTANT]
|
||||
>
|
||||
> **スターを付けてください**。GitHub からのすべてのリリース通知を遅延なく受け取ることができます~⭐️
|
||||
|
||||
[![][image-star]][github-stars-link]
|
||||
|
||||
<details>
|
||||
<summary><kbd>スター履歴</kbd></summary>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=lobehub%2Flobe-chat&theme=dark&type=Date">
|
||||
<img width="100%" src="https://api.star-history.com/svg?repos=lobehub%2Flobe-chat&type=Date">
|
||||
</picture>
|
||||
</details>
|
||||
|
||||
## ✨ 特徴
|
||||
|
||||
[![][image-feat-privoder]][docs-feat-provider]
|
||||
|
||||
### `1` [マルチモデルサービスプロバイダーのサポート][docs-feat-provider]
|
||||
|
||||
LobeChat の継続的な開発において、AI 会話サービスを提供する際のモデルサービスプロバイダーの多様性がコミュニティのニーズを満たすために重要であることを深く理解しています。そのため、単一のモデルサービスプロバイダーに限定せず、複数のモデルサービスプロバイダーをサポートすることで、ユーザーにより多様で豊富な会話の選択肢を提供しています。
|
||||
|
||||
このようにして、LobeChat は異なるユーザーのニーズにより柔軟に対応し、開発者にも幅広い選択肢を提供します。
|
||||
|
||||
#### サポートされているモデルサービスプロバイダー
|
||||
|
||||
以下のモデルサービスプロバイダーをサポートしています:
|
||||
|
||||
<!-- PROVIDER LIST -->
|
||||
|
||||
- **[OpenAI](https://lobechat.com/discover/provider/openai)**: OpenAI は、世界をリードする人工知能研究機関であり、GPT シリーズなどのモデルを開発し、自然言語処理の最前線を推進しています。OpenAI は、革新と効率的な AI ソリューションを通じて、さまざまな業界を変革することに取り組んでいます。彼らの製品は、顕著な性能と経済性を持ち、研究、ビジネス、革新アプリケーションで広く使用されています。
|
||||
- **[Ollama](https://lobechat.com/discover/provider/ollama)**: Ollama が提供するモデルは、コード生成、数学演算、多言語処理、対話インタラクションなどの分野を広くカバーし、企業向けおよびローカライズされた展開の多様なニーズに対応しています。
|
||||
- **[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 は、Amazon AWS が提供するサービスで、企業に先進的な AI 言語モデルと視覚モデルを提供することに特化しています。そのモデルファミリーには、Anthropic の Claude シリーズや Meta の Llama 3.1 シリーズなどが含まれ、軽量から高性能までのさまざまな選択肢を提供し、テキスト生成、対話、画像処理などの多様なタスクをサポートし、異なる規模とニーズの企業アプリケーションに適しています。
|
||||
- **[Google](https://lobechat.com/discover/provider/google)**: Google の Gemini シリーズは、Google DeepMind によって開発された最先端で汎用的な AI モデルであり、多モーダル設計に特化しており、テキスト、コード、画像、音声、動画のシームレスな理解と処理をサポートします。データセンターからモバイルデバイスまでのさまざまな環境に適しており、AI モデルの効率と適用範囲を大幅に向上させています。
|
||||
- **[DeepSeek](https://lobechat.com/discover/provider/deepseek)**: DeepSeek は、人工知能技術の研究と応用に特化した企業であり、最新のモデル DeepSeek-V2.5 は、汎用対話とコード処理能力を融合させ、人間の好みの整合、ライティングタスク、指示の遵守などの面で顕著な向上を実現しています。
|
||||
- **[HuggingFace](https://lobechat.com/discover/provider/huggingface)**: HuggingFace Inference API は、数千のモデルをさまざまなタスクに対して探索するための迅速かつ無料の方法を提供します。新しいアプリケーションのプロトタイプを作成している場合でも、機械学習の機能を試している場合でも、この API は複数の分野の高性能モデルに即座にアクセスできるようにします。
|
||||
- **[OpenRouter](https://lobechat.com/discover/provider/openrouter)**: OpenRouter は、OpenAI、Anthropic、LLaMA などのさまざまな最先端の大規模モデルインターフェースを提供するサービスプラットフォームであり、多様な開発と応用のニーズに適しています。ユーザーは、自身のニーズに応じて最適なモデルと価格を柔軟に選択し、AI 体験の向上を支援します。
|
||||
- **[Cloudflare Workers AI](https://lobechat.com/discover/provider/cloudflare)**: Cloudflare のグローバルネットワーク上で、サーバーレス GPU によって駆動される機械学習モデルを実行します。
|
||||
- **[GitHub](https://lobechat.com/discover/provider/github)**: GitHub モデルを使用することで、開発者は AI エンジニアになり、業界をリードする AI モデルを使って構築できます。
|
||||
|
||||
<details><summary><kbd>See more providers (+26)</kbd></summary>
|
||||
|
||||
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI は、さまざまな大規模言語モデルと AI 画像生成の API サービスを提供するプラットフォームであり、柔軟で信頼性が高く、コスト効率に優れています。Llama3、Mistral などの最新のオープンソースモデルをサポートし、生成的 AI アプリケーションの開発に向けた包括的でユーザーフレンドリーかつ自動スケーリングの API ソリューションを提供し、AI スタートアップの急成長を支援します。
|
||||
- **[Together AI](https://lobechat.com/discover/provider/togetherai)**: Together AI は、革新的な AI モデルを通じて先進的な性能を実現することに取り組んでおり、迅速なスケーリングサポートや直感的な展開プロセスを含む広範なカスタマイズ能力を提供し、企業のさまざまなニーズに応えています。
|
||||
- **[Fireworks AI](https://lobechat.com/discover/provider/fireworksai)**: Fireworks AI は、先進的な言語モデルサービスのリーダーであり、機能呼び出しと多モーダル処理に特化しています。最新のモデル Firefunction V2 は Llama-3 に基づいており、関数呼び出し、対話、指示の遵守に最適化されています。視覚言語モデル FireLLaVA-13B は、画像とテキストの混合入力をサポートしています。他の注目すべきモデルには、Llama シリーズや Mixtral シリーズがあり、高効率の多言語指示遵守と生成サポートを提供しています。
|
||||
- **[Groq](https://lobechat.com/discover/provider/groq)**: Groq の LPU 推論エンジンは、最新の独立した大規模言語モデル(LLM)ベンチマークテストで卓越したパフォーマンスを示し、その驚異的な速度と効率で AI ソリューションの基準を再定義しています。Groq は、即時推論速度の代表であり、クラウドベースの展開で良好なパフォーマンスを発揮しています。
|
||||
- **[Perplexity](https://lobechat.com/discover/provider/perplexity)**: Perplexity は、先進的な対話生成モデルの提供者であり、さまざまな Llama 3.1 モデルを提供し、オンラインおよびオフラインアプリケーションをサポートし、特に複雑な自然言語処理タスクに適しています。
|
||||
- **[Mistral](https://lobechat.com/discover/provider/mistral)**: Mistral は、先進的な汎用、専門、研究型モデルを提供し、複雑な推論、多言語タスク、コード生成などの分野で広く使用されています。機能呼び出しインターフェースを通じて、ユーザーはカスタム機能を統合し、特定のアプリケーションを実現できます。
|
||||
- **[Ai21Labs](https://lobechat.com/discover/provider/ai21)**: AI21 Labs は企業向けに基盤モデルと人工知能システムを構築し、生成的人工知能の生産への応用を加速します。
|
||||
- **[Upstage](https://lobechat.com/discover/provider/upstage)**: Upstage は、さまざまなビジネスニーズに応じた AI モデルの開発に特化しており、Solar LLM や文書 AI を含み、人造一般知能(AGI)の実現を目指しています。Chat API を通じてシンプルな対話エージェントを作成し、機能呼び出し、翻訳、埋め込み、特定分野のアプリケーションをサポートします。
|
||||
- **[xAI](https://lobechat.com/discover/provider/xai)**: xAI は、人類の科学的発見を加速するための人工知能を構築することに専念している企業です。私たちの使命は、宇宙に対する共通の理解を促進することです。
|
||||
- **[Qwen](https://lobechat.com/discover/provider/qwen)**: 通義千問は、アリババクラウドが独自に開発した超大規模言語モデルであり、強力な自然言語理解と生成能力を持っています。さまざまな質問に答えたり、文章を創作したり、意見を表現したり、コードを執筆したりすることができ、さまざまな分野で活躍しています。
|
||||
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: 企業向けのワンストップ大規模モデルと AI ネイティブアプリケーションの開発およびサービスプラットフォームで、最も包括的で使いやすい生成的人工知能モデルの開発とアプリケーション開発の全プロセスツールチェーンを提供します。
|
||||
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: テンセントが開発した大規模言語モデルであり、強力な中国語の創作能力、複雑な文脈における論理的推論能力、そして信頼性の高いタスク実行能力を備えています。
|
||||
- **[Spark](https://lobechat.com/discover/provider/spark)**: 科大訊飛星火大モデルは、多分野、多言語の強力な AI 能力を提供し、先進的な自然言語処理技術を利用して、スマートハードウェア、スマート医療、スマート金融などのさまざまな垂直シーンに適した革新的なアプリケーションを構築します。
|
||||
- **[ZhiPu](https://lobechat.com/discover/provider/zhipu)**: 智谱 AI は、多モーダルおよび言語モデルのオープンプラットフォームを提供し、テキスト処理、画像理解、プログラミング支援など、幅広い AI アプリケーションシーンをサポートしています。
|
||||
- **[01.AI](https://lobechat.com/discover/provider/zeroone)**: 01.AI は、AI 2.0 時代の人工知能技術に特化し、「人 + 人工知能」の革新と応用を推進し、超強力なモデルと先進的な AI 技術を用いて人類の生産性を向上させ、技術の力を実現します。
|
||||
- **[SenseNova](https://lobechat.com/discover/provider/sensenova)**: 商湯日日新は、商湯の強力な基盤支援に基づき、高効率で使いやすい全スタックの大規模モデルサービスを提供します。
|
||||
- **[Stepfun](https://lobechat.com/discover/provider/stepfun)**: 階級星辰大モデルは、業界をリードする多モーダルおよび複雑な推論能力を備え、超長文の理解と強力な自律的検索エンジン機能をサポートしています。
|
||||
- **[Moonshot](https://lobechat.com/discover/provider/moonshot)**: Moonshot は、北京月之暗面科技有限公司が提供するオープンプラットフォームであり、さまざまな自然言語処理モデルを提供し、コンテンツ創作、学術研究、スマート推薦、医療診断などの広範な応用分野を持ち、長文処理や複雑な生成タスクをサポートしています。
|
||||
- **[Baichuan](https://lobechat.com/discover/provider/baichuan)**: 百川智能は、人工知能大モデルの研究開発に特化した企業であり、そのモデルは国内の知識百科、長文処理、生成創作などの中国語タスクで卓越したパフォーマンスを示し、海外の主流モデルを超えています。百川智能は、業界をリードする多モーダル能力を持ち、複数の権威ある評価で優れたパフォーマンスを示しています。そのモデルには、Baichuan 4、Baichuan 3 Turbo、Baichuan 3 Turbo 128k などが含まれ、異なるアプリケーションシーンに最適化され、高コストパフォーマンスのソリューションを提供しています。
|
||||
- **[Minimax](https://lobechat.com/discover/provider/minimax)**: MiniMax は 2021 年に設立された汎用人工知能テクノロジー企業であり、ユーザーと共に知能を共創することに取り組んでいます。MiniMax は、さまざまなモードの汎用大モデルを独自に開発しており、トリリオンパラメータの MoE テキスト大モデル、音声大モデル、画像大モデルを含んでいます。また、海螺 AI などのアプリケーションも展開しています。
|
||||
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI は、360 社が提供する AI モデルとサービスプラットフォームであり、360GPT2 Pro、360GPT Pro、360GPT Turbo、360GPT Turbo Responsibility 8K など、さまざまな先進的な自然言語処理モデルを提供しています。これらのモデルは、大規模なパラメータと多モーダル能力を組み合わせており、テキスト生成、意味理解、対話システム、コード生成などの分野で広く使用されています。柔軟な価格戦略を通じて、360 AI は多様なユーザーのニーズに応え、開発者の統合をサポートし、スマートアプリケーションの革新と発展を促進します。
|
||||
- **[Taichu](https://lobechat.com/discover/provider/taichu)**: 中科院自動化研究所と武漢人工知能研究院が新世代の多モーダル大モデルを発表し、多輪問答、テキスト創作、画像生成、3D 理解、信号分析などの包括的な問答タスクをサポートし、より強力な認知、理解、創作能力を持ち、新しいインタラクティブな体験を提供します。
|
||||
- **[InternLM](https://lobechat.com/discover/provider/internlm)**: 大規模モデルの研究と開発ツールチェーンに特化したオープンソース組織です。すべての AI 開発者に対して、高効率で使いやすいオープンプラットフォームを提供し、最先端の大規模モデルとアルゴリズム技術を身近に感じられるようにします。
|
||||
- **[SiliconCloud](https://lobechat.com/discover/provider/siliconcloud)**: SiliconFlow は、AGI を加速させ、人類に利益をもたらすことを目指し、使いやすくコスト効率の高い GenAI スタックを通じて大規模 AI の効率を向上させることに取り組んでいます。
|
||||
- **[Higress](https://lobechat.com/discover/provider/higress)**: Higress は、阿里内部で Tengine のリロードが長期接続のビジネスに悪影響を及ぼすことや、gRPC/Dubbo の負荷分散能力が不足している問題を解決するために生まれた、クラウドネイティブな API ゲートウェイです。
|
||||
- **[Gitee AI](https://lobechat.com/discover/provider/giteeai)**: Gitee AI の Serverless API は、AI 開発者に開梱即使用の大モデル推論 API サービスを提供する。
|
||||
|
||||
</details>
|
||||
|
||||
> 📊 Total providers: [<kbd>**36**</kbd>](https://lobechat.com/discover/providers)
|
||||
|
||||
<!-- PROVIDER LIST -->
|
||||
|
||||
同時に、私たちはさらに多くのモデルサービスプロバイダーをサポートする計画を立てており、サービスプロバイダーのライブラリをさらに充実させる予定です。 LobeChat があなたのお気に入りのサービスプロバイダーをサポートすることを希望する場合は、[💬 コミュニティディスカッション](https://github.com/lobehub/lobe-chat/discussions/1284)に参加してください。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-local]][docs-feat-local]
|
||||
|
||||
### `2` [ローカル大規模言語モデル (LLM) のサポート][docs-feat-local]
|
||||
|
||||
特定のユーザーのニーズに応えるために、LobeChat は[Ollama](https://ollama.ai)に基づいてローカルモデルの使用をサポートしており、ユーザーが自分自身またはサードパーティのモデルを柔軟に使用できるようにしています。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> [📘 LobeChat での Ollama の使用][docs-usage-ollama]について詳しくはこちらをご覧ください。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-vision]][docs-feat-vision]
|
||||
|
||||
### `3` [モデルの視覚認識][docs-feat-vision]
|
||||
|
||||
LobeChat は、OpenAI の最新の視覚認識機能を備えた[`gpt-4-vision`](https://platform.openai.com/docs/guides/vision)モデルをサポートしています。
|
||||
これは視覚を認識できるマルチモーダルインテリジェンスです。ユーザーは簡単に画像をアップロードしたり、画像をドラッグアンドドロップして対話ボックスに入れることができ、
|
||||
エージェントは画像の内容を認識し、これに基づいてインテリジェントな会話を行い、よりスマートで多様なチャットシナリオを作成します。
|
||||
|
||||
この機能は、新しいインタラクティブな方法を提供し、コミュニケーションがテキストを超えて視覚要素を含むことを可能にします。
|
||||
日常の使用での画像共有や特定の業界での画像解釈に関係なく、エージェントは優れた会話体験を提供します。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-tts]][docs-feat-tts]
|
||||
|
||||
### `4` [TTS & STT 音声会話][docs-feat-tts]
|
||||
|
||||
LobeChat は、テキストから音声への変換(Text-to-Speech、TTS)および音声からテキストへの変換(Speech-to-Text、STT)技術をサポートしており、
|
||||
テキストメッセージを明瞭な音声出力に変換し、ユーザーが実際の人と話しているかのように対話エージェントと対話できるようにします。
|
||||
ユーザーは、エージェントに適した音声を選択することができます。
|
||||
|
||||
さらに、TTS は聴覚学習を好む人や忙しい中で情報を受け取りたい人にとって優れたソリューションを提供します。
|
||||
LobeChat では、異なる地域や文化的背景のユーザーのニーズに応えるために、さまざまな高品質の音声オプション(OpenAI Audio、Microsoft Edge Speech)を慎重に選択しました。
|
||||
ユーザーは、個人の好みや特定のシナリオに応じて適切な音声を選択し、パーソナライズされたコミュニケーション体験を得ることができます。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-t2i]][docs-feat-t2i]
|
||||
|
||||
### `5` [テキストから画像生成][docs-feat-t2i]
|
||||
|
||||
最新のテキストから画像生成技術をサポートし、LobeChat はユーザーがエージェントとの対話中に直接画像作成ツールを呼び出すことができるようになりました。
|
||||
[`DALL-E 3`](https://openai.com/dall-e-3)、[`MidJourney`](https://www.midjourney.com/)、[`Pollinations`](https://pollinations.ai/)などの AI ツールの能力を活用することで、
|
||||
エージェントはあなたのアイデアを画像に変えることができます。
|
||||
|
||||
これにより、プライベートで没入感のある創造プロセスが可能になり、個人的な対話に視覚的なストーリーテリングをシームレスに統合することができます。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-plugin]][docs-feat-plugin]
|
||||
|
||||
### `6` [プラグインシステム (Function Calling)][docs-feat-plugin]
|
||||
|
||||
LobeChat のプラグインエコシステムは、そのコア機能の重要な拡張であり、LobeChat アシスタントの実用性と柔軟性を大幅に向上させます。
|
||||
|
||||
<video controls src="https://github.com/lobehub/lobe-chat/assets/28616219/f29475a3-f346-4196-a435-41a6373ab9e2" muted="false"></video>
|
||||
|
||||
プラグインを利用することで、LobeChat アシスタントはリアルタイムの情報を取得して処理することができ、ウェブ情報を検索し、ユーザーに即時かつ関連性の高いニュースを提供することができます。
|
||||
|
||||
さらに、これらのプラグインはニュースの集約に限定されず、他の実用的な機能にも拡張できます。たとえば、ドキュメントの迅速な検索、画像の生成、Bilibili、Steam などのさまざまなプラットフォームからのデータの取得、さまざまなサードパーティサービスとの連携などです。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> [📘 プラグインの使用][docs-usage-plugin]について詳しくはこちらをご覧ください。
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
| 最近追加 | 説明 |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
||||
| [MintbaseSearch](https://lobechat.com/discover/plugin/mintbasesearch)<br/><sup>By **mintbase** on **2024-12-31**</sup> | NEAR プロトコル上の任意の NFT データを見つける。<br/>`暗号通貨` `nft` |
|
||||
| [PortfolioMeta](https://lobechat.com/discover/plugin/StockData)<br/><sup>By **portfoliometa** on **2024-12-22**</sup> | 株を分析し、包括的なリアルタイムの投資データと分析を取得します。<br/>`stock` |
|
||||
| [Google CSE](https://lobechat.com/discover/plugin/google-cse)<br/><sup>By **vsnthdev** on **2024-12-02**</sup> | 公式の CSE API を通じて Google を検索します。<br/>`ウェブ` `検索` |
|
||||
| [話す](https://lobechat.com/discover/plugin/speak)<br/><sup>By **speak** on **2024-12-02**</sup> | Speak は、AI パワードの言語チューターで、他の言語で何でも言う方法を学ぶことができます。<br/>`教育` `言語` |
|
||||
|
||||
> 📊 Total plugins: [<kbd>**48**</kbd>](https://lobechat.com/discover/plugins)
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-agent]][docs-feat-agent]
|
||||
|
||||
### `7` [エージェントマーケット (GPTs)][docs-feat-agent]
|
||||
|
||||
LobeChat エージェントマーケットプレイスでは、クリエイターが多くの優れたエージェントを発見できる活気に満ちた革新的なコミュニティを提供しています。
|
||||
これらのエージェントは、仕事のシナリオで重要な役割を果たすだけでなく、学習プロセスでも大いに便利です。
|
||||
私たちのマーケットプレイスは、単なるショーケースプラットフォームではなく、協力の場でもあります。ここでは、誰もが自分の知恵を貢献し、開発したエージェントを共有できます。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> [🤖/🏪 エージェントを提出][submit-agents-link]することで、簡単にエージェント作品をプラットフォームに提出できます。
|
||||
> 重要なのは、LobeChat が高度な自動化国際化(i18n)ワークフローを確立しており、
|
||||
> あなたのエージェントを複数の言語バージョンにシームレスに翻訳できることです。
|
||||
> これにより、ユーザーがどの言語を話していても、エージェントを障害なく体験できます。
|
||||
|
||||
> \[!IMPORTANT]
|
||||
>
|
||||
> すべてのユーザーがこの成長するエコシステムに参加し、エージェントの反復と最適化に参加することを歓迎します。
|
||||
> 一緒に、より面白く、実用的で革新的なエージェントを作成し、エージェントの多様性と実用性をさらに豊かにしましょう。
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
| 最近追加 | 説明 |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [システム指示の専門家](https://lobechat.com/discover/assistant/instructer)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-12-04**</sup> | 効率的なシステム指示を精練し生成することに長けています<br/>`システム指示` `執筆` `詳細最適化` `ユーザーのニーズ` |
|
||||
| [日本語記憶支援者](https://lobechat.com/discover/assistant/japan-language-helper)<br/><sup>By **[sharkbear212](https://github.com/sharkbear212)** on **2024-12-04**</sup> | 日本語の五十音、ひらがな、カタカナ、単語やフレーズの説明と記憶のテクニックに特化しています<br/>`説明` `記憶テクニック` `日本語教育` |
|
||||
| [詩詞カードデザイナー](https://lobechat.com/discover/assistant/poetry-card-designer)<br/><sup>By **[lianxin255](https://github.com/lianxin255)** on **2024-12-03**</sup> | 詩詞カードのデザインに優れ、芸術感と魅力を高めます<br/>`詩詞カードデザイン` `カード` `クリエイティブ` `アート表現` |
|
||||
| [日常医師](https://lobechat.com/discover/assistant/yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | 外科診療と個別化健康管理に優れています<br/>`総合診療` `外科` `健康相談` `個別化治療` `医学教育` |
|
||||
|
||||
> 📊 Total agents: [<kbd>**453**</kbd> ](https://lobechat.com/discover/assistants)
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-database]][docs-feat-database]
|
||||
|
||||
### `8` [ローカル / リモートデータベースのサポート][docs-feat-database]
|
||||
|
||||
LobeChat は、サーバーサイドデータベースとローカルデータベースの両方の使用をサポートしています。ニーズに応じて、適切なデプロイメントソリューションを選択できます:
|
||||
|
||||
- **ローカルデータベース**:データとプライバシー保護に対するより多くの制御を希望するユーザーに適しています。LobeChat は CRDT(Conflict-Free Replicated Data Type)技術を使用してマルチデバイス同期を実現しています。これはシームレスなデータ同期体験を提供することを目的とした実験的な機能です。
|
||||
- **サーバーサイドデータベース**:より便利なユーザー体験を希望するユーザーに適しています。LobeChat は PostgreSQL をサーバーサイドデータベースとしてサポートしています。サーバーサイドデータベースの設定方法についての詳細なドキュメントは、[サーバーサイドデータベースの設定](https://lobehub.com/docs/self-hosting/advanced/server-database)をご覧ください。
|
||||
|
||||
どのデータベースを選択しても、LobeChat は優れたユーザー体験を提供します。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-auth]][docs-feat-auth]
|
||||
|
||||
### `9` [マルチユーザ管理のサポート][docs-feat-auth]
|
||||
|
||||
LobeChat はマルチユーザ管理をサポートし、異なるニーズに応じて 2 つの主要なユーザ認証および管理ソリューションを提供します:
|
||||
|
||||
- **next-auth**:LobeChat は、複数の認証方法(OAuth、メールログイン、資格情報ログインなど)をサポートする柔軟で強力な認証ライブラリである`next-auth`を統合しています。`next-auth`を使用すると、ユーザの登録、ログイン、セッション管理、ソーシャルログインなどの機能を簡単に実装し、ユーザデータのセキュリティとプライバシーを確保できます。
|
||||
|
||||
- **Clerk**:より高度なユーザ管理機能が必要なユーザ向けに、LobeChat は`Clerk`もサポートしています。`Clerk`は、現代的なユーザ管理プラットフォームであり、多要素認証(MFA)、ユーザプロファイル管理、ログイン活動の監視など、より豊富な機能を提供します。`Clerk`を使用すると、より高いセキュリティと柔軟性を得ることができ、複雑なユーザ管理ニーズに簡単に対応できます。
|
||||
|
||||
どのユーザ管理ソリューションを選択しても、LobeChat は優れたユーザー体験と強力な機能サポートを提供します。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-pwa]][docs-feat-pwa]
|
||||
|
||||
### `10` [プログレッシブウェブアプリ (PWA)][docs-feat-pwa]
|
||||
|
||||
私たちは、今日のマルチデバイス環境でユーザーにシームレスな体験を提供することの重要性を深く理解しています。
|
||||
そのため、プログレッシブウェブアプリケーション([PWA](https://support.google.com/chrome/answer/9658361))技術を採用しました。
|
||||
これは、ウェブアプリケーションをネイティブアプリに近い体験に引き上げるモダンなウェブ技術です。
|
||||
|
||||
PWA を通じて、LobeChat はデスクトップとモバイルデバイスの両方で高度に最適化されたユーザー体験を提供しながら、その軽量で高性能な特性を維持します。
|
||||
視覚的および感覚的には、インターフェースを慎重に設計し、ネイティブアプリと区別がつかないようにし、
|
||||
スムーズなアニメーション、レスポンシブレイアウト、および異なるデバイスの画面解像度に適応するようにしています。
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> PWA のインストールプロセスに慣れていない場合は、以下の手順に従って LobeChat をデスクトップアプリケーション(モバイルデバイスにも適用)として追加できます:
|
||||
>
|
||||
> - コンピュータで Chrome または Edge ブラウザを起動します。
|
||||
> - LobeChat のウェブページにアクセスします。
|
||||
> - アドレスバーの右上にある<kbd>インストール</kbd>アイコンをクリックします。
|
||||
> - 画面の指示に従って PWA のインストールを完了します。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-mobile]][docs-feat-mobile]
|
||||
|
||||
### `11` [モバイルデバイスの適応][docs-feat-mobile]
|
||||
|
||||
モバイルデバイスのユーザー体験を向上させるために、一連の最適化設計を行いました。現在、モバイルユーザー体験のバージョンを繰り返し改善しています。ご意見やアイデアがある場合は、GitHub Issues や Pull Requests を通じてフィードバックをお寄せください。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
[![][image-feat-theme]][docs-feat-theme]
|
||||
|
||||
### `12` [カスタムテーマ][docs-feat-theme]
|
||||
|
||||
デザインエンジニアリング指向のアプリケーションとして、LobeChat はユーザーの個別体験を重視しており、
|
||||
柔軟で多様なテーマモードを導入しています。日中のライトモードと夜間のダークモードを含みます。
|
||||
テーマモードの切り替えに加えて、さまざまな色のカスタマイズオプションを提供し、ユーザーが自分の好みに応じてアプリケーションのテーマカラーを調整できるようにしています。
|
||||
落ち着いたダークブルー、活気のあるピーチピンク、プロフェッショナルなグレーホワイトなど、LobeChat では自分のスタイルに合った色の選択肢を見つけることができます。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> デフォルトの設定は、ユーザーのシステムのカラーモードをインテリジェントに認識し、テーマを自動的に切り替えて、オペレーティングシステムと一貫した視覚体験を提供します。
|
||||
> 詳細を手動で制御するのが好きなユーザーには、直感的な設定オプションと、会話シナリオに対してチャットバブルモードとドキュメントモードの選択肢を提供します。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
### `*` その他の特徴
|
||||
|
||||
これらの特徴に加えて、LobeChat は基本的な技術基盤も優れています:
|
||||
|
||||
- [x] 💨 **迅速なデプロイ**:Vercel プラットフォームまたは Docker イメージを使用して、ワンクリックでデプロイを行い、1 分以内にプロセスを完了できます。複雑な設定は不要です。
|
||||
- [x] 🌐 **カスタムドメイン**:ユーザーが独自のドメインを持っている場合、プラットフォームにバインドして、どこからでも対話エージェントに迅速にアクセスできます。
|
||||
- [x] 🔒 **プライバシー保護**:すべてのデータはユーザーのブラウザにローカルに保存され、ユーザーのプライバシーを保護します。
|
||||
- [x] 💎 **洗練された UI デザイン**:慎重に設計されたインターフェースで、エレガントな外観とスムーズなインタラクションを提供します。ライトモードとダークモードをサポートし、モバイルフレンドリーです。PWA サポートにより、よりネイティブに近い体験を提供します。
|
||||
- [x] 🗣️ **スムーズな会話体験**:流れるような応答により、スムーズな会話体験を提供します。Markdown レンダリングを完全にサポートし、コードのハイライト、LaTex の数式、Mermaid のフローチャートなどを含みます。
|
||||
|
||||
> ✨ LobeChat の進化に伴い、さらに多くの機能が追加されます。
|
||||
|
||||
---
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> 今後の[ロードマップ][github-project-link]計画は、Projects セクションで確認できます。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## ⚡️ パフォーマンス
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> 完全なレポートのリストは[📘 Lighthouse レポート][docs-lighthouse]で確認できます。
|
||||
|
||||
| デスクトップ | モバイル |
|
||||
| :-------------------------------------------: | :------------------------------------------: |
|
||||
| ![][chat-desktop] | ![][chat-mobile] |
|
||||
| [📑 Lighthouse レポート][chat-desktop-report] | [📑 Lighthouse レポート][chat-mobile-report] |
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## 🛳 自己ホスティング
|
||||
|
||||
LobeChat は、Vercel と[Docker イメージ][docker-release-link]を使用した自己ホスティングバージョンを提供しています。これにより、事前の知識がなくても数分で独自のチャットボットをデプロイできます。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> [📘 独自の LobeChat を構築する][docs-self-hosting]について詳しくはこちらをご覧ください。
|
||||
|
||||
### `A` Vercel、Zeabur、Sealos でのデプロイ
|
||||
|
||||
このサービスを Vercel または Zeabur でデプロイしたい場合は、以下の手順に従ってください:
|
||||
|
||||
- [OpenAI API Key](https://platform.openai.com/account/api-keys)を準備します。
|
||||
- 下のボタンをクリックしてデプロイを開始します:GitHub アカウントで直接ログインし、環境変数セクションに`OPENAI_API_KEY`(必須)と`ACCESS_CODE`(推奨)を入力します。
|
||||
- デプロイが完了したら、使用を開始できます。
|
||||
- カスタムドメインをバインド(オプション):Vercel が割り当てたドメインの DNS は一部の地域で汚染されているため、カスタムドメインをバインドすることで直接接続できます。
|
||||
|
||||
<div align="center">
|
||||
|
||||
| Vercel でデプロイ | Zeabur でデプロイ | Sealos でデプロイ |
|
||||
| :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: |
|
||||
| [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] |
|
||||
|
||||
</div>
|
||||
|
||||
#### フォーク後
|
||||
|
||||
フォーク後、リポジトリのアクションページで他のアクションを無効にし、アップストリーム同期アクションのみを保持します。
|
||||
|
||||
#### 更新を維持
|
||||
|
||||
README のワンクリックデプロイ手順に従って独自のプロジェクトをデプロイした場合、「更新が利用可能です」というプロンプトが常に表示されることがあります。これは、Vercel がデフォルトで新しいプロジェクトを作成し、フォークしないため、更新を正確に検出できないためです。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> [📘 最新バージョンと自動同期][docs-upstream-sync]の手順に従って再デプロイすることをお勧めします。
|
||||
|
||||
<br/>
|
||||
|
||||
### `B` Docker でのデプロイ
|
||||
|
||||
[![][docker-release-shield]][docker-release-link]
|
||||
[![][docker-size-shield]][docker-size-link]
|
||||
[![][docker-pulls-shield]][docker-pulls-link]
|
||||
|
||||
LobeChat サービスを独自のプライベートデバイスにデプロイするための Docker イメージを提供しています。以下のコマンドを使用して LobeChat サービスを開始します:
|
||||
|
||||
```fish
|
||||
$ docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
--name lobe-chat \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> OpenAI サービスをプロキシ経由で使用する必要がある場合は、`OPENAI_PROXY_URL`環境変数を使用してプロキシアドレスを設定できます:
|
||||
|
||||
```fish
|
||||
$ docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
--name lobe-chat \
|
||||
lobehub/lobe-chat
|
||||
```
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> Docker を使用したデプロイの詳細な手順については、[📘 Docker デプロイガイド][docs-docker]を参照してください。
|
||||
|
||||
<br/>
|
||||
|
||||
### 環境変数
|
||||
|
||||
このプロジェクトは、環境変数で設定される追加の構成項目を提供します:
|
||||
|
||||
| 環境変数 | 必須 | 説明 | 例 |
|
||||
| ------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| `OPENAI_API_KEY` | はい | これは OpenAI アカウントページで申請した API キーです | `sk-xxxxxx...xxxxxx` |
|
||||
| `OPENAI_PROXY_URL` | いいえ | OpenAI インターフェイスプロキシを手動で設定する場合、この設定項目を使って、デフォルトの OpenAI API リクエストベース URL を上書きすることができます。 | `https://api.chatanywhere.cn` または `https://aihubmix.com/v1` <br/>デフォルトの値は<br/>`https://api.openai.com/v1` |
|
||||
| `ACCESS_CODE` | いいえ | このサービスにアクセスするためのパスワードを追加します。漏洩を避けるために長いパスワードを設定することができます。この値にカンマが含まれる場合は、パスワードの配列となります。 | `awCTe)re_r74` または `rtrt_ewee3@09!` または `code1,code2,code3` |
|
||||
| `OPENAI_MODEL_LIST` | いいえ | モデルリストをコントロールするために使用します。モデルを追加するには `+` を、モデルを非表示にするには `-` を、モデルの表示名をカンマ区切りでカスタマイズするには `model_name=display_name` を使用します。 | `qwen-7b-chat,+glm-6b,-gpt-3.5-turbo` |
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> 環境変数の完全なリストは [📘環境変数][docs-env-var] にあります
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## 📦 エコシステム
|
||||
|
||||
| NPM | リポジトリ | 説明 | バージョン |
|
||||
| --------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------- | ----------------------------------------- |
|
||||
| [@lobehub/ui][lobe-ui-link] | [lobehub/lobe-ui][lobe-ui-github] | AIGC ウェブアプリケーション構築専用のオープンソース UI コンポーネントライブラリ。 | [![][lobe-ui-shield]][lobe-ui-link] |
|
||||
| [@lobehub/icons][lobe-icons-link] | [lobehub/lobe-icons][lobe-icons-github] | 人気の AI/LLM モデルブランドの SVG ロゴとアイコン集。 | [![][lobe-icons-shield]][lobe-icons-link] |
|
||||
| [@lobehub/tts][lobe-tts-link] | [lobehub/lobe-tts][lobe-tts-github] | 高品質で信頼性の高い TTS/STT React Hooks ライブラリ | [![][lobe-tts-shield]][lobe-tts-link] |
|
||||
| [@lobehub/lint][lobe-lint-link] | [lobehub/lobe-lint][lobe-lint-github] | LobeHub の ESlint、Stylelint、Commitlint、Prettier、Remark、Semantic Release の設定。 | [![][lobe-lint-shield]][lobe-lint-link] |
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## 🧩 プラグイン
|
||||
|
||||
プラグインは、LobeChat の[関数呼び出し][docs-functionc-call]機能を拡張する手段を提供します。プラグインを使用して、新しい関数呼び出しやメッセージ結果の新しいレンダリング方法を導入することができます。プラグイン開発に興味がある方は、Wiki の[📘プラグイン開発ガイド][docs-plugin-dev]を参照してください。
|
||||
|
||||
- [lobe-chat-plugins][lobe-chat-plugins]: これは LobeChat のプラグインインデックスです。このリポジトリから index.json にアクセスし、LobeChat で利用可能なプラグインのリストをユーザに表示します。
|
||||
- [chat-plugin-template][chat-plugin-template]: これは LobeChat プラグイン開発用のプラグインテンプレートです。
|
||||
- [@lobehub/chat-plugin-sdk][chat-plugin-sdk]: LobeChat プラグイン SDK は、Lobe Chat 用の優れたチャットプラグインの作成を支援します。
|
||||
- [@lobehub/chat-plugins-gateway][chat-plugins-gateway]: LobeChat Plugins Gateway は、LobeChat プラグインのためのゲートウェイを提供するバックエンドサービスです。このサービスは Vercel を使用してデプロイされます。プライマリ API の POST /api/v1/runner は Edge Function としてデプロイされます。
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
> プラグインシステムは現在大規模な開発中です。詳しくは以下の issue をご覧ください:
|
||||
>
|
||||
> - [x] [**プラグインフェイズ 1**](https://github.com/lobehub/lobe-chat/issues/73): プラグインを本体から分離し、メンテナンスのためにプラグインを独立したリポジトリに分割し、プラグインの動的ロードを実現する。
|
||||
> - [x] [**プラグインフェイズ 2**](https://github.com/lobehub/lobe-chat/issues/97): プラグイン使用の安全性と安定性、より正確な異常状態の提示、プラグインアーキテクチャの保守性、開発者フレンドリー。
|
||||
> - [x] [**プラグインフェイズ 3**](https://github.com/lobehub/lobe-chat/issues/149): より高度で包括的なカスタマイズ機能、プラグイン認証のサポート、サンプル。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## ⌨️ ローカル開発
|
||||
|
||||
GitHub Codespaces を使ってオンライン開発ができます:
|
||||
|
||||
[![][codespaces-shield]][codespaces-link]
|
||||
|
||||
Or clone it for local development:
|
||||
|
||||
```fish
|
||||
$ git clone https://github.com/lobehub/lobe-chat.git
|
||||
$ cd lobe-chat
|
||||
$ pnpm install
|
||||
$ pnpm dev
|
||||
```
|
||||
|
||||
より詳しい情報をお知りになりたい方は、[📘開発ガイド][docs-dev-guide]をご覧ください。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## 🤝 コントリビュート
|
||||
|
||||
どのようなタイプのコントリビュートも大歓迎です;コードを提供することに興味がある方は、GitHub の [Issues][github-issues-link] や [Projects][github-project-link] をチェックして、あなたの力をお貸しください。
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> 私たちは技術主導のフォーラムを創設し、知識の交流とアイデアの交換を促進することで、相互のインスピレーションと協力的なイノベーションを生み出すことを目指しています。
|
||||
>
|
||||
> LobeChat の改善にご協力ください。製品設計のフィードバックやユーザー体験に関するディスカッションを直接お寄せください。
|
||||
>
|
||||
> **プリンシパルメンテナー:** [@arvinxx](https://github.com/arvinxx) [@canisminor1990](https://github.com/canisminor1990)
|
||||
|
||||
[![][pr-welcome-shield]][pr-welcome-link]
|
||||
[![][submit-agents-shield]][submit-agents-link]
|
||||
[![][submit-plugin-shield]][submit-plugin-link]
|
||||
|
||||
<a href="https://github.com/lobehub/lobe-chat/graphs/contributors" target="_blank">
|
||||
<table>
|
||||
<tr>
|
||||
<th colspan="2">
|
||||
<br><img src="https://contrib.rocks/image?repo=lobehub/lobe-chat"><br><br>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=2x3&color_scheme=dark">
|
||||
<img src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=2x3&color_scheme=light">
|
||||
</picture>
|
||||
</td>
|
||||
<td rowspan="2">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=active&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=4x7&color_scheme=dark">
|
||||
<img src="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=active&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=4x7&color_scheme=light">
|
||||
</picture>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=2x3&color_scheme=dark">
|
||||
<img src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_28_days&owner_id=131470832&repo_ids=643445235&image_size=2x3&color_scheme=light">
|
||||
</picture>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a>
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## ❤️ スポンサー
|
||||
|
||||
あなたの一度きりの寄付が、私たちの銀河系で輝きを放ちます!皆様は流れ星であり、私たちの旅路に迅速かつ明るい影響を与えます。私たちを信じてくださり、ありがとうございます。皆様の寛大なお気持ちが、私たちの使命に向かって、一度に輝かしい閃光を放つよう導いてくださるのです。
|
||||
|
||||
<a href="https://opencollective.com/lobehub" target="_blank">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/lobehub/.github/blob/main/static/sponsor-dark.png?raw=true">
|
||||
<img src="https://github.com/lobehub/.github/blob/main/static/sponsor-light.png?raw=true">
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
## 🔗 その他の製品
|
||||
|
||||
- **[🅰️ Lobe SD Theme][lobe-theme]:** Stable Diffusion WebUI のためのモダンなテーマ、絶妙なインターフェースデザイン、高度にカスタマイズ可能な UI、効率を高める機能。
|
||||
- **[⛵️ Lobe Midjourney WebUI][lobe-midjourney-webui]:** Midjourney の WebUI は、AI を活用しテキストプロンプトから豊富で多様な画像を素早く生成し、創造性を刺激して会話を盛り上げます。
|
||||
- **[🌏 Lobe i18n][lobe-i18n] :** Lobe i18n は ChatGPT を利用した国際化翻訳プロセスの自動化ツールです。大きなファイルの自動分割、増分更新、OpenAI モデル、API プロキシ、温度のカスタマイズオプションなどの機能をサポートしています。
|
||||
- **[💌 Lobe Commit][lobe-commit]:** Lobe Commit は、Langchain/ChatGPT を活用して Gitmoji ベースのコミットメッセージを生成する CLI ツールです。
|
||||
|
||||
<div align="right">
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
<details><summary><h4>📝 License</h4></summary>
|
||||
|
||||
[![][fossa-license-shield]][fossa-license-link]
|
||||
|
||||
</details>
|
||||
|
||||
Copyright © 2024 [LobeHub][profile-link]. <br />
|
||||
This project is [Apache 2.0](./LICENSE) licensed.
|
||||
|
||||
<!-- LINK GROUP -->
|
||||
|
||||
[back-to-top]: https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square
|
||||
[blog]: https://lobehub.com/blog
|
||||
[changelog]: https://lobehub.com/changelog
|
||||
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
||||
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
|
||||
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
|
||||
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
|
||||
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
|
||||
[codecov-link]: https://codecov.io/gh/lobehub/lobe-chat
|
||||
[codecov-shield]: https://img.shields.io/codecov/c/github/lobehub/lobe-chat?labelColor=black&style=flat-square&logo=codecov&logoColor=white
|
||||
[codespaces-link]: https://codespaces.new/lobehub/lobe-chat
|
||||
[codespaces-shield]: https://github.com/codespaces/badge.svg
|
||||
[deploy-button-image]: https://vercel.com/button
|
||||
[deploy-link]: https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat&env=OPENAI_API_KEY,ACCESS_CODE&envDescription=Find%20your%20OpenAI%20API%20Key%20by%20click%20the%20right%20Learn%20More%20button.%20%7C%20Access%20Code%20can%20protect%20your%20website&envLink=https%3A%2F%2Fplatform.openai.com%2Faccount%2Fapi-keys&project-name=lobe-chat&repository-name=lobe-chat
|
||||
[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
|
||||
[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
|
||||
[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg
|
||||
[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI
|
||||
[discord-link]: https://discord.gg/AYFPHvv2jT
|
||||
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
||||
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
||||
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square
|
||||
[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
|
||||
[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
|
||||
[docs]: https://lobehub.com/docs/usage/start
|
||||
[docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
|
||||
[docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker
|
||||
[docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
|
||||
[docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
|
||||
[docs-feat-auth]: https://lobehub.com/docs/usage/features/auth
|
||||
[docs-feat-database]: https://lobehub.com/docs/usage/features/database
|
||||
[docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm
|
||||
[docs-feat-mobile]: https://lobehub.com/docs/usage/features/mobile
|
||||
[docs-feat-plugin]: https://lobehub.com/docs/usage/features/plugin-system
|
||||
[docs-feat-provider]: https://lobehub.com/docs/usage/features/multi-ai-providers
|
||||
[docs-feat-pwa]: https://lobehub.com/docs/usage/features/pwa
|
||||
[docs-feat-t2i]: https://lobehub.com/docs/usage/features/text-to-image
|
||||
[docs-feat-theme]: https://lobehub.com/docs/usage/features/theme
|
||||
[docs-feat-tts]: https://lobehub.com/docs/usage/features/tts
|
||||
[docs-feat-vision]: https://lobehub.com/docs/usage/features/vision
|
||||
[docs-functionc-call]: https://lobehub.com/blog/openai-function-call
|
||||
[docs-lighthouse]: https://github.com/lobehub/lobe-chat/wiki/Lighthouse
|
||||
[docs-plugin-dev]: https://lobehub.com/docs/usage/plugins/development
|
||||
[docs-self-hosting]: https://lobehub.com/docs/self-hosting/start
|
||||
[docs-upstream-sync]: https://lobehub.com/docs/self-hosting/advanced/upstream-sync
|
||||
[docs-usage-ollama]: https://lobehub.com/docs/usage/providers/ollama
|
||||
[docs-usage-plugin]: https://lobehub.com/docs/usage/plugins/basic
|
||||
[fossa-license-link]: https://app.fossa.com/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat
|
||||
[fossa-license-shield]: https://app.fossa.com/api/projects/git%2Bgithub.com%2Flobehub%2Flobe-chat.svg?type=large
|
||||
[github-action-release-link]: https://github.com/actions/workflows/lobehub/lobe-chat/release.yml
|
||||
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/release.yml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
||||
[github-action-test-link]: https://github.com/actions/workflows/lobehub/lobe-chat/test.yml
|
||||
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/lobehub/lobe-chat/test.yml?label=test&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
|
||||
[github-contributors-link]: https://github.com/lobehub/lobe-chat/graphs/contributors
|
||||
[github-contributors-shield]: https://img.shields.io/github/contributors/lobehub/lobe-chat?color=c4f042&labelColor=black&style=flat-square
|
||||
[github-forks-link]: https://github.com/lobehub/lobe-chat/network/members
|
||||
[github-forks-shield]: https://img.shields.io/github/forks/lobehub/lobe-chat?color=8ae8ff&labelColor=black&style=flat-square
|
||||
[github-issues-link]: https://github.com/lobehub/lobe-chat/issues
|
||||
[github-issues-shield]: https://img.shields.io/github/issues/lobehub/lobe-chat?color=ff80eb&labelColor=black&style=flat-square
|
||||
[github-license-link]: https://github.com/lobehub/lobe-chat/blob/main/LICENSE
|
||||
[github-license-shield]: https://img.shields.io/badge/license-apache%202.0-white?labelColor=black&style=flat-square
|
||||
[github-project-link]: https://github.com/lobehub/lobe-chat/projects
|
||||
[github-release-link]: https://github.com/lobehub/lobe-chat/releases
|
||||
[github-release-shield]: https://img.shields.io/github/v/release/lobehub/lobe-chat?color=369eff&labelColor=black&logo=github&style=flat-square
|
||||
[github-releasedate-link]: https://github.com/lobehub/lobe-chat/releases
|
||||
[github-releasedate-shield]: https://img.shields.io/github/release-date/lobehub/lobe-chat?labelColor=black&style=flat-square
|
||||
[github-stars-link]: https://github.com/lobehub/lobe-chat/network/stargazers
|
||||
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square
|
||||
[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256
|
||||
[github-trending-url]: https://trendshift.io/repositories/2256
|
||||
[image-banner]: https://github.com/lobehub/lobe-chat/assets/28616219/9f155dff-4737-429f-9cad-a70a1a860c5f
|
||||
[image-feat-agent]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png
|
||||
[image-feat-auth]: https://github.com/lobehub/lobe-chat/assets/17870709/8ce70e15-40df-451e-b700-66090fe5b8c2
|
||||
[image-feat-database]: https://github.com/lobehub/lobe-chat/assets/17870709/c27a0234-a4e9-40e5-8bcb-42d5ce7e40f9
|
||||
[image-feat-local]: https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c
|
||||
[image-feat-mobile]: https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp
|
||||
[image-feat-plugin]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png
|
||||
[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551
|
||||
[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp
|
||||
[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png
|
||||
[image-feat-theme]: https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp
|
||||
[image-feat-tts]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072124-c9853d8d-f1b5-44a8-a305-45ebc0f6d19a.png
|
||||
[image-feat-vision]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png
|
||||
[image-overview]: https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf
|
||||
[image-star]: https://github.com/lobehub/lobe-chat/assets/17870709/cb06b748-513f-47c2-8740-d876858d7855
|
||||
[issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
||||
[lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins
|
||||
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
||||
[lobe-i18n]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-i18n
|
||||
[lobe-icons-github]: https://github.com/lobehub/lobe-icons
|
||||
[lobe-icons-link]: https://www.npmjs.com/package/@lobehub/icons
|
||||
[lobe-icons-shield]: https://img.shields.io/npm/v/@lobehub/icons?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
||||
[lobe-lint-github]: https://github.com/lobehub/lobe-lint
|
||||
[lobe-lint-link]: https://www.npmjs.com/package/@lobehub/lint
|
||||
[lobe-lint-shield]: https://img.shields.io/npm/v/@lobehub/lint?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
||||
[lobe-midjourney-webui]: https://github.com/lobehub/lobe-midjourney-webui
|
||||
[lobe-theme]: https://github.com/lobehub/sd-webui-lobe-theme
|
||||
[lobe-tts-github]: https://github.com/lobehub/lobe-tts
|
||||
[lobe-tts-link]: https://www.npmjs.com/package/@lobehub/tts
|
||||
[lobe-tts-shield]: https://img.shields.io/npm/v/@lobehub/tts?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
||||
[lobe-ui-github]: https://github.com/lobehub/lobe-ui
|
||||
[lobe-ui-link]: https://www.npmjs.com/package/@lobehub/ui
|
||||
[lobe-ui-shield]: https://img.shields.io/npm/v/@lobehub/ui?color=369eff&labelColor=black&logo=npm&logoColor=white&style=flat-square
|
||||
[official-site]: https://lobehub.com
|
||||
[pr-welcome-link]: https://github.com/lobehub/lobe-chat/pulls
|
||||
[pr-welcome-shield]: https://img.shields.io/badge/🤯_pr_welcome-%E2%86%92-ffcb47?labelColor=black&style=for-the-badge
|
||||
[profile-link]: https://github.com/lobehub
|
||||
[share-linkedin-link]: https://linkedin.com/feed
|
||||
[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square
|
||||
[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI
|
||||
[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square
|
||||
[share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
|
||||
[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square
|
||||
[share-telegram-link]: https://t.me/share/url"?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
|
||||
[share-telegram-shield]: https://img.shields.io/badge/-share%20on%20telegram-black?labelColor=black&logo=telegram&logoColor=white&style=flat-square
|
||||
[share-weibo-link]: http://service.weibo.com/share/share.php?sharesource=weibo&title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
|
||||
[share-weibo-shield]: https://img.shields.io/badge/-share%20on%20weibo-black?labelColor=black&logo=sinaweibo&logoColor=white&style=flat-square
|
||||
[share-whatsapp-link]: https://api.whatsapp.com/send?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat%20%23chatbot%20%23chatGPT%20%23openAI
|
||||
[share-whatsapp-shield]: https://img.shields.io/badge/-share%20on%20whatsapp-black?labelColor=black&logo=whatsapp&logoColor=white&style=flat-square
|
||||
[share-x-link]: https://x.com/intent/tweet?hashtags=chatbot%2CchatGPT%2CopenAI&text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
|
||||
[share-x-shield]: https://img.shields.io/badge/-share%20on%20x-black?labelColor=black&logo=x&logoColor=white&style=flat-square
|
||||
[sponsor-link]: https://opencollective.com/lobehub 'Become ❤️ LobeHub Sponsor'
|
||||
[sponsor-shield]: https://img.shields.io/badge/-Sponsor%20LobeHub-f04f88?logo=opencollective&logoColor=white&style=flat-square
|
||||
[submit-agents-link]: https://github.com/lobehub/lobe-chat-agents
|
||||
[submit-agents-shield]: https://img.shields.io/badge/🤖/🏪_submit_agent-%E2%86%92-c4f042?labelColor=black&style=for-the-badge
|
||||
[submit-plugin-link]: https://github.com/lobehub/lobe-chat-plugins
|
||||
[submit-plugin-shield]: https://img.shields.io/badge/🧩/🏪_submit_plugin-%E2%86%92-95f3d9?labelColor=black&style=for-the-badge
|
||||
[vercel-link]: https://chat-preview.lobehub.com
|
||||
[vercel-shield]: https://img.shields.io/badge/vercel-online-55b467?labelColor=black&logo=vercel&style=flat-square
|
||||
[vercel-shield-badge]: https://img.shields.io/badge/TRY%20LOBECHAT-ONLINE-55b467?labelColor=black&logo=vercel&style=for-the-badge
|
||||
@@ -8,7 +8,7 @@ An open-source, modern-design ChatGPT/LLMs UI/Framework.<br/>
|
||||
Supports speech-synthesis, multi-modal, and extensible ([function call][docs-functionc-call]) plugin system.<br/>
|
||||
One-click **FREE** deployment of your private OpenAI ChatGPT/Claude/Gemini/Groq/Ollama chat application.
|
||||
|
||||
**English** · [简体中文](./README.zh-CN.md) · [日本語](./README.ja-JP.md) · [Official Site][official-site] · [Changelog][changelog] · [Documents][docs] · [Blog][blog] · [Feedback][github-issues-link]
|
||||
**English** · [简体中文](./README.zh-CN.md) · [Official Site][official-site] · [Changelog][changelog] · [Documents][docs] · [Blog][blog] · [Feedback][github-issues-link]
|
||||
|
||||
<!-- SHIELD GROUP -->
|
||||
|
||||
@@ -41,7 +41,7 @@ One-click **FREE** deployment of your private OpenAI ChatGPT/Claude/Gemini/Groq/
|
||||
|
||||
[![][github-trending-shield]][github-trending-url]
|
||||
|
||||
[![][image-overview]][vercel-link]
|
||||
![][image-overview]
|
||||
|
||||
</div>
|
||||
|
||||
@@ -52,19 +52,22 @@ One-click **FREE** deployment of your private OpenAI ChatGPT/Claude/Gemini/Groq/
|
||||
|
||||
- [👋🏻 Getting Started & Join Our Community](#-getting-started--join-our-community)
|
||||
- [✨ Features](#-features)
|
||||
- [`1` File Upload/Knowledge Base](#1-file-uploadknowledge-base)
|
||||
- [`2` Multi-Model Service Provider Support](#2-multi-model-service-provider-support)
|
||||
- [`3` Local Large Language Model (LLM) Support](#3-local-large-language-model-llm-support)
|
||||
- [`4` Model Visual Recognition](#4-model-visual-recognition)
|
||||
- [`5` TTS & STT Voice Conversation](#5-tts--stt-voice-conversation)
|
||||
- [`6` Text to Image Generation](#6-text-to-image-generation)
|
||||
- [`7` Plugin System (Function Calling)](#7-plugin-system-function-calling)
|
||||
- [`8` Agent Market (GPTs)](#8-agent-market-gpts)
|
||||
- [`9` Support Local / Remote Database](#9-support-local--remote-database)
|
||||
- [`10` Support Multi-User Management](#10-support-multi-user-management)
|
||||
- [`11` Progressive Web App (PWA)](#11-progressive-web-app-pwa)
|
||||
- [`12` Mobile Device Adaptation](#12-mobile-device-adaptation)
|
||||
- [`13` Custom Themes](#13-custom-themes)
|
||||
- [`1` Chain of Thought](#1-chain-of-thought)
|
||||
- [`2` Branching Conversations](#2-branching-conversations)
|
||||
- [`3` Artifacts Support](#3-artifacts-support)
|
||||
- [`4` File Upload /Knowledge Base](#4-file-upload-knowledge-base)
|
||||
- [`5` Multi-Model Service Provider Support](#5-multi-model-service-provider-support)
|
||||
- [`6` Local Large Language Model (LLM) Support](#6-local-large-language-model-llm-support)
|
||||
- [`7` Model Visual Recognition](#7-model-visual-recognition)
|
||||
- [`8` TTS & STT Voice Conversation](#8-tts--stt-voice-conversation)
|
||||
- [`9` Text to Image Generation](#9-text-to-image-generation)
|
||||
- [`10` Plugin System (Function Calling)](#10-plugin-system-function-calling)
|
||||
- [`11` Agent Market (GPTs)](#11-agent-market-gpts)
|
||||
- [`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.
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
[![][image-feat-branch]][docs-feat-branch]
|
||||
|
||||
### `2` [Branching Conversations][docs-feat-branch]
|
||||
|
||||
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
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
[![][image-feat-knowledgebase]][docs-feat-knowledgebase]
|
||||
|
||||
### `1` [File Upload/Knowledge Base][docs-feat-knowledgebase]
|
||||
### `4` [File Upload /Knowledge Base][docs-feat-knowledgebase]
|
||||
|
||||
LobeChat supports file upload and knowledge base functionality. You can upload various types of files including documents, images, audio, and video, as well as create knowledge bases, making it convenient for users to manage and search for files. Additionally, you can utilize files and knowledge base features during conversations, enabling a richer dialogue experience.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -154,9 +196,10 @@ We have implemented support for the following model service providers:
|
||||
- **[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 (+26)</kbd></summary>
|
||||
<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.
|
||||
@@ -168,24 +211,24 @@ We have implemented support for the following model service providers:
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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.
|
||||
- **[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>**36**</kbd>](https://lobechat.com/discover/providers)
|
||||
> 📊 Total providers: [<kbd>**37**</kbd>](https://lobechat.com/discover/providers)
|
||||
|
||||
<!-- PROVIDER LIST -->
|
||||
|
||||
@@ -199,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.
|
||||
|
||||
@@ -215,7 +258,7 @@ To meet the specific needs of users, LobeChat also supports the use of local mod
|
||||
|
||||
[![][image-feat-vision]][docs-feat-vision]
|
||||
|
||||
### `4` [Model Visual Recognition][docs-feat-vision]
|
||||
### `7` [Model Visual Recognition][docs-feat-vision]
|
||||
|
||||
LobeChat now supports OpenAI's latest [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision) model with visual recognition capabilities,
|
||||
a multimodal intelligence that can perceive visuals. Users can easily upload or drag and drop images into the dialogue box,
|
||||
@@ -233,7 +276,7 @@ Whether it's sharing images in daily use or interpreting images within specific
|
||||
|
||||
[![][image-feat-tts]][docs-feat-tts]
|
||||
|
||||
### `5` [TTS & STT Voice Conversation][docs-feat-tts]
|
||||
### `8` [TTS & STT Voice Conversation][docs-feat-tts]
|
||||
|
||||
LobeChat supports Text-to-Speech (TTS) and Speech-to-Text (STT) technologies, enabling our application to convert text messages into clear voice outputs,
|
||||
allowing users to interact with our conversational agent as if they were talking to a real person. Users can choose from a variety of voices to pair with the agent.
|
||||
@@ -250,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.
|
||||
|
||||
@@ -264,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.
|
||||
|
||||
@@ -280,14 +323,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
| Recent Submits | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
||||
| [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` |
|
||||
| [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` |
|
||||
| [Google CSE](https://lobechat.com/discover/plugin/google-cse)<br/><sup>By **vsnthdev** on **2024-12-02**</sup> | Searches Google through their official CSE API.<br/>`web` `search` |
|
||||
| [Speak](https://lobechat.com/discover/plugin/speak)<br/><sup>By **speak** on **2024-12-02**</sup> | Learn how to say anything in another language with Speak, your AI-powered language tutor.<br/>`education` `language` |
|
||||
| Recent Submits | Description |
|
||||
| ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| [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>**48**</kbd>](https://lobechat.com/discover/plugins)
|
||||
> 📊 Total plugins: [<kbd>**47**</kbd>](https://lobechat.com/discover/plugins)
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
@@ -299,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.
|
||||
@@ -319,14 +362,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
| Recent Submits | Description |
|
||||
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| [System Instruction Expert](https://lobechat.com/discover/assistant/instructer)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-12-04**</sup> | Skilled in refining and generating efficient system instructions<br/>`system-instructions` `writing` `detail-optimization` `user-needs` |
|
||||
| [Japanese Memory Helper](https://lobechat.com/discover/assistant/japan-language-helper)<br/><sup>By **[sharkbear212](https://github.com/sharkbear212)** on **2024-12-04**</sup> | Specializes in Japanese Hiragana, Katakana, vocabulary, and memory techniques for explanations and phrases<br/>`explanation` `memory-techniques` `japanese-teaching` |
|
||||
| [Poetry Card Designer](https://lobechat.com/discover/assistant/poetry-card-designer)<br/><sup>By **[lianxin255](https://github.com/lianxin255)** on **2024-12-03**</sup> | Skilled in designing poetry cards to enhance artistic sense and appeal<br/>`poetry-card-design` `card` `creativity` `artistic-expression` |
|
||||
| [Daily Doctor](https://lobechat.com/discover/assistant/yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | Specializes in surgical diagnosis and personalized health management<br/>`general-medicine` `surgery` `health-consultation` `personalized-treatment` `medical-education` |
|
||||
| Recent Submits | Description |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [Cron Expression Assistant](https://lobechat.com/discover/assistant/crontab-generate)<br/><sup>By **[edgesider](https://github.com/edgesider)** on **2025-02-17**</sup> | Crontab Expression Generator<br/>`crontab` `time-expression` `trigger-time` `generator` `technical-assistance` |
|
||||
| [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>**453**</kbd> ](https://lobechat.com/discover/assistants)
|
||||
> 📊 Total agents: [<kbd>**487**</kbd> ](https://lobechat.com/discover/assistants)
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
@@ -338,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:
|
||||
|
||||
@@ -355,7 +398,7 @@ Regardless of which database you choose, LobeChat can provide you with an excell
|
||||
|
||||
[![][image-feat-auth]][docs-feat-auth]
|
||||
|
||||
### `10` [Support Multi-User Management][docs-feat-auth]
|
||||
### `13` [Support Multi-User Management][docs-feat-auth]
|
||||
|
||||
LobeChat supports multi-user management and provides two main user authentication and management solutions to meet different needs:
|
||||
|
||||
@@ -373,7 +416,7 @@ Regardless of which user management solution you choose, LobeChat can provide yo
|
||||
|
||||
[![][image-feat-pwa]][docs-feat-pwa]
|
||||
|
||||
### `11` [Progressive Web App (PWA)][docs-feat-pwa]
|
||||
### `14` [Progressive Web App (PWA)][docs-feat-pwa]
|
||||
|
||||
We deeply understand the importance of providing a seamless experience for users in today's multi-device environment.
|
||||
Therefore, we have adopted Progressive Web Application ([PWA](https://support.google.com/chrome/answer/9658361)) technology,
|
||||
@@ -400,7 +443,7 @@ providing smooth animations, responsive layouts, and adapting to different devic
|
||||
|
||||
[![][image-feat-mobile]][docs-feat-mobile]
|
||||
|
||||
### `12` [Mobile Device Adaptation][docs-feat-mobile]
|
||||
### `15` [Mobile Device Adaptation][docs-feat-mobile]
|
||||
|
||||
We have carried out a series of optimization designs for mobile devices to enhance the user's mobile experience. Currently, we are iterating on the mobile user experience to achieve smoother and more intuitive interactions. If you have any suggestions or ideas, we welcome you to provide feedback through GitHub Issues or Pull Requests.
|
||||
|
||||
@@ -412,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.
|
||||
@@ -518,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 -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e ACCESS_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 -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
--name lobe-chat \
|
||||
lobehub/lobe-chat
|
||||
bash <(curl -fsSL https://lobe.li/setup.sh)
|
||||
```
|
||||
|
||||
3. Start the LobeChat service
|
||||
|
||||
```fish
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
> \[!NOTE]
|
||||
@@ -629,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]
|
||||
>
|
||||
@@ -745,24 +785,27 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[deploy-on-repocloud-button-image]: https://d16t0pc4846x52.cloudfront.net/deploylobe.svg
|
||||
[deploy-on-repocloud-link]: https://repocloud.io/details/?app_id=248
|
||||
[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
|
||||
[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
|
||||
[deploy-on-sealos-link]: https://template.usw.sealos.io/deploy?templateName=lobe-chat-db
|
||||
[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg
|
||||
[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI
|
||||
[discord-link]: https://discord.gg/AYFPHvv2jT
|
||||
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
||||
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
||||
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square
|
||||
[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
|
||||
[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
|
||||
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square&sort=semver
|
||||
[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square&sort=semver
|
||||
[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square&sort=semver
|
||||
[docs]: https://lobehub.com/docs/usage/start
|
||||
[docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
|
||||
[docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker
|
||||
[docs-docker]: https://lobehub.com/docs/self-hosting/server-database/docker-compose
|
||||
[docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
|
||||
[docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
|
||||
[docs-feat-artifacts]: https://lobehub.com/docs/usage/features/artifacts
|
||||
[docs-feat-auth]: https://lobehub.com/docs/usage/features/auth
|
||||
[docs-feat-branch]: https://lobehub.com/docs/usage/features/branching-conversations
|
||||
[docs-feat-cot]: https://lobehub.com/docs/usage/features/cot
|
||||
[docs-feat-database]: https://lobehub.com/docs/usage/features/database
|
||||
[docs-feat-knowledgebase]: https://lobehub.com/blog/knowledge-base
|
||||
[docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm
|
||||
@@ -804,22 +847,25 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square
|
||||
[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256
|
||||
[github-trending-url]: https://trendshift.io/repositories/2256
|
||||
[image-banner]: https://github.com/lobehub/lobe-chat/assets/28616219/9f155dff-4737-429f-9cad-a70a1a860c5f
|
||||
[image-feat-agent]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png
|
||||
[image-feat-auth]: https://github.com/lobehub/lobe-chat/assets/17870709/8ce70e15-40df-451e-b700-66090fe5b8c2
|
||||
[image-feat-database]: https://github.com/lobehub/lobe-chat/assets/17870709/c27a0234-a4e9-40e5-8bcb-42d5ce7e40f9
|
||||
[image-feat-knowledgebase]: https://github.com/user-attachments/assets/77e58e1c-c82f-4341-b159-f4eeede9967f
|
||||
[image-feat-local]: https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c
|
||||
[image-feat-mobile]: https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp
|
||||
[image-feat-plugin]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png
|
||||
[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551
|
||||
[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp
|
||||
[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png
|
||||
[image-feat-theme]: https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp
|
||||
[image-feat-tts]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072124-c9853d8d-f1b5-44a8-a305-45ebc0f6d19a.png
|
||||
[image-feat-vision]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png
|
||||
[image-overview]: https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf
|
||||
[image-star]: https://github.com/lobehub/lobe-chat/assets/17870709/cb06b748-513f-47c2-8740-d876858d7855
|
||||
[image-banner]: https://github.com/user-attachments/assets/6f293c7f-47b4-47eb-9202-fe68a942d35b
|
||||
[image-feat-agent]: https://github.com/user-attachments/assets/b3ab6e35-4fbc-468d-af10-e3e0c687350f
|
||||
[image-feat-artifacts]: https://github.com/user-attachments/assets/7f95fad6-b210-4e6e-84a0-7f39e96f3a00
|
||||
[image-feat-auth]: https://github.com/user-attachments/assets/80bb232e-19d1-4f97-98d6-e291f3585e6d
|
||||
[image-feat-branch]: https://github.com/user-attachments/assets/92f72082-02bd-4835-9c54-b089aad7fd41
|
||||
[image-feat-cot]: https://github.com/user-attachments/assets/f74f1139-d115-4e9c-8c43-040a53797a5e
|
||||
[image-feat-database]: https://github.com/user-attachments/assets/f1697c8b-d1fb-4dac-ba05-153c6295d91d
|
||||
[image-feat-knowledgebase]: https://github.com/user-attachments/assets/7da7a3b2-92fd-4630-9f4e-8560c74955ae
|
||||
[image-feat-local]: https://github.com/user-attachments/assets/1239da50-d832-4632-a7ef-bd754c0f3850
|
||||
[image-feat-mobile]: https://github.com/user-attachments/assets/32cf43c4-96bd-4a4c-bfb6-59acde6fe380
|
||||
[image-feat-plugin]: https://github.com/user-attachments/assets/66a891ac-01b6-4e3f-b978-2eb07b489b1b
|
||||
[image-feat-privoder]: https://github.com/user-attachments/assets/e553e407-42de-4919-977d-7dbfcf44a821
|
||||
[image-feat-pwa]: https://github.com/user-attachments/assets/9647f70f-b71b-43b6-9564-7cdd12d1c24d
|
||||
[image-feat-t2i]: https://github.com/user-attachments/assets/708274a7-2458-494b-a6ec-b73dfa1fa7c2
|
||||
[image-feat-theme]: https://github.com/user-attachments/assets/b47c39f1-806f-492b-8fcb-b0fa973937c1
|
||||
[image-feat-tts]: https://github.com/user-attachments/assets/50189597-2cc3-4002-b4c8-756a52ad5c0a
|
||||
[image-feat-vision]: https://github.com/user-attachments/assets/18574a1f-46c2-4cbc-af2c-35a86e128a07
|
||||
[image-overview]: https://github.com/user-attachments/assets/dbfaa84a-2c82-4dd9-815c-5be616f264a4
|
||||
[image-star]: https://github.com/user-attachments/assets/c3b482e7-cef5-4e94-bef9-226900ecfaab
|
||||
[issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
||||
[lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins
|
||||
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
||||
@@ -844,7 +890,7 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[profile-link]: https://github.com/lobehub
|
||||
[share-linkedin-link]: https://linkedin.com/feed
|
||||
[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square
|
||||
[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI
|
||||
[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20%28Function%20Calling%29,%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI
|
||||
[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square
|
||||
[share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
|
||||
[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square
|
||||
|
||||
+138
-92
@@ -8,7 +8,7 @@
|
||||
支持语音合成、多模态、可扩展的([function call][docs-functionc-call])插件系统<br/>
|
||||
一键**免费**拥有你自己的 ChatGPT/Gemini/Claude/Ollama 应用
|
||||
|
||||
[English](./README.md) · **简体中文** · [日本語](./README.ja-JP.md) · [官网][official-site] · [更新日志][changelog] · [文档][docs] · [博客][blog] · [反馈问题][github-issues-link]
|
||||
[English](./README.md) · **简体中文** · [官网][official-site] · [更新日志][changelog] · [文档][docs] · [博客][blog] · [反馈问题][github-issues-link]
|
||||
|
||||
<!-- SHIELD GROUP -->
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
[![][github-trending-shield]][github-trending-url]
|
||||
[![][github-hello-shield]][github-hello-url]
|
||||
|
||||
[![][image-overview]][vercel-link]
|
||||
![][image-overview]
|
||||
|
||||
</div>
|
||||
|
||||
@@ -52,20 +52,23 @@
|
||||
|
||||
- [👋🏻 开始使用 & 交流](#-开始使用--交流)
|
||||
- [✨ 特性一览](#-特性一览)
|
||||
- [`1` 文件上传 / 知识库](#1-文件上传--知识库)
|
||||
- [`2` 多模型服务商支持](#2-多模型服务商支持)
|
||||
- [`3` 支持本地大语言模型 (LLM)](#3-支持本地大语言模型-llm)
|
||||
- [`4` 模型视觉识别 (Model Visual)](#4-模型视觉识别-model-visual)
|
||||
- [`5` TTS & STT 语音会话](#5-tts--stt-语音会话)
|
||||
- [`6` Text to Image 文生图](#6-text-to-image-文生图)
|
||||
- [`7` 插件系统 (Tools Calling)](#7-插件系统-tools-calling)
|
||||
- [`8` 助手市场 (GPTs)](#8-助手市场-gpts)
|
||||
- [`9` 支持本地 / 远程数据库](#9-支持本地--远程数据库)
|
||||
- [`10` 支持多用户管理](#10-支持多用户管理)
|
||||
- [`11` 渐进式 Web 应用 (PWA)](#11-渐进式-web-应用-pwa)
|
||||
- [`12` 移动设备适配](#12-移动设备适配)
|
||||
- [`13` 自定义主题](#13-自定义主题)
|
||||
- [更多特性](#更多特性)
|
||||
- [`1` 思维链 (CoT)](#1-思维链-cot)
|
||||
- [`2` 分支对话](#2-分支对话)
|
||||
- [`3` 支持白板 (Artifacts)](#3-支持白板-artifacts)
|
||||
- [`4` 文件上传 / 知识库](#4-文件上传--知识库)
|
||||
- [`5` 多模型服务商支持](#5-多模型服务商支持)
|
||||
- [`6` 支持本地大语言模型 (LLM)](#6-支持本地大语言模型-llm)
|
||||
- [`7` 模型视觉识别 (Model Visual)](#7-模型视觉识别-model-visual)
|
||||
- [`8` TTS & STT 语音会话](#8-tts--stt-语音会话)
|
||||
- [`9` Text to Image 文生图](#9-text-to-image-文生图)
|
||||
- [`10` 插件系统 (Tools Calling)](#10-插件系统-tools-calling)
|
||||
- [`11` 助手市场 (GPTs)](#11-助手市场-gpts)
|
||||
- [`12` 支持本地 / 远程数据库](#12-支持本地--远程数据库)
|
||||
- [`13` 支持多用户管理](#13-支持多用户管理)
|
||||
- [`14` 渐进式 Web 应用 (PWA)](#14-渐进式-web-应用-pwa)
|
||||
- [`15` 移动设备适配](#15-移动设备适配)
|
||||
- [`16` 自定义主题](#16-自定义主题)
|
||||
- [`*` 更多特性](#-更多特性)
|
||||
- [⚡️ 性能测试](#️-性能测试)
|
||||
- [🛳 开箱即用](#-开箱即用)
|
||||
- [`A` 使用 Vercel、Zeabur 、Sealos 或 阿里云计算巢 部署](#a-使用-vercelzeabur-sealos-或-阿里云计算巢-部署)
|
||||
@@ -111,9 +114,48 @@
|
||||
|
||||
## ✨ 特性一览
|
||||
|
||||
[![][image-feat-cot]][docs-feat-cot]
|
||||
|
||||
### `1` [思维链 (CoT)][docs-feat-cot]
|
||||
|
||||
体验前所未有的 AI 推理过程。通过创新的思维链(CoT)可视化功能,您可以实时观察复杂问题是如何一步步被解析的。这项突破性的功能为 AI 的决策过程提供了前所未有的透明度,让您能够清晰地了解结论是如何得出的。
|
||||
|
||||
通过将复杂的推理过程分解为清晰的逻辑步骤,您可以更好地理解和验证 AI 的解题思路。无论您是在调试问题、学习知识,还是单纯对 AI 推理感兴趣,思维链可视化都能将抽象思维转化为一种引人入胜的互动体验。
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
[![][image-feat-branch]][docs-feat-branch]
|
||||
|
||||
### `2` [分支对话][docs-feat-branch]
|
||||
|
||||
为您带来更自然、更灵活的 AI 对话方式。通过分支对话功能,您的讨论可以像人类对话一样自然延伸。在任意消息处创建新的对话分支,让您在保留原有上下文的同时,自由探索不同的对话方向。
|
||||
|
||||
两种强大模式任您选择:
|
||||
|
||||
- **延续模式**:无缝延展当前讨论,保持宝贵的对话上下文
|
||||
- **独立模式**:基于任意历史消息,开启全新话题探讨
|
||||
|
||||
这项突破性功能将线性对话转变为动态的树状结构,让您能够更深入地探索想法,实现更高效的互动体验。
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
[![][image-feat-artifacts]][docs-feat-artifacts]
|
||||
|
||||
### `3` [支持白板 (Artifacts)][docs-feat-artifacts]
|
||||
|
||||
体验集成于 LobeChat 的 Claude Artifacts 能力。这项革命性功能突破了 AI 人机交互的边界,让您能够实时创建和可视化各种格式的内容。
|
||||
|
||||
以前所未有的灵活度进行创作与可视化:
|
||||
|
||||
- 生成并展示动态 SVG 图形
|
||||
- 实时构建与渲染交互式 HTML 页面
|
||||
- 输出多种格式的专业文档
|
||||
|
||||
[![][back-to-top]](#readme-top)
|
||||
|
||||
[![][image-feat-knowledgebase]][docs-feat-knowledgebase]
|
||||
|
||||
### `1` [文件上传 / 知识库][docs-feat-knowledgebase]
|
||||
### `4` [文件上传 / 知识库][docs-feat-knowledgebase]
|
||||
|
||||
LobeChat 支持文件上传与知识库功能,你可以上传文件、图片、音频、视频等多种类型的文件,以及创建知识库,方便用户管理和查找文件。同时在对话中使用文件和知识库功能,实现更加丰富的对话体验。
|
||||
|
||||
@@ -131,7 +173,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
||||
|
||||
[![][image-feat-privoder]][docs-feat-provider]
|
||||
|
||||
### `2` [多模型服务商支持][docs-feat-provider]
|
||||
### `5` [多模型服务商支持][docs-feat-provider]
|
||||
|
||||
在 LobeChat 的不断发展过程中,我们深刻理解到在提供 AI 会话服务时模型服务商的多样性对于满足社区需求的重要性。因此,我们不再局限于单一的模型服务商,而是拓展了对多种模型服务商的支持,以便为用户提供更为丰富和多样化的会话选择。
|
||||
|
||||
@@ -154,9 +196,10 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
||||
- **[Cloudflare Workers AI](https://lobechat.com/discover/provider/cloudflare)**: 在 Cloudflare 的全球网络上运行由无服务器 GPU 驱动的机器学习模型。
|
||||
- **[GitHub](https://lobechat.com/discover/provider/github)**: 通过 GitHub 模型,开发人员可以成为 AI 工程师,并使用行业领先的 AI 模型进行构建。
|
||||
|
||||
<details><summary><kbd>See more providers (+26)</kbd></summary>
|
||||
<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 模型实现领先的性能,提供广泛的自定义能力,包括快速扩展支持和直观的部署流程,满足企业的各种需求。
|
||||
- **[Fireworks AI](https://lobechat.com/discover/provider/fireworksai)**: Fireworks AI 是一家领先的高级语言模型服务商,专注于功能调用和多模态处理。其最新模型 Firefunction V2 基于 Llama-3,优化用于函数调用、对话及指令跟随。视觉语言模型 FireLLaVA-13B 支持图像和文本混合输入。其他 notable 模型包括 Llama 系列和 Mixtral 系列,提供高效的多语言指令跟随与生成支持。
|
||||
- **[Groq](https://lobechat.com/discover/provider/groq)**: Groq 的 LPU 推理引擎在最新的独立大语言模型(LLM)基准测试中表现卓越,以其惊人的速度和效率重新定义了 AI 解决方案的标准。Groq 是一种即时推理速度的代表,在基于云的部署中展现了良好的性能。
|
||||
@@ -168,28 +211,28 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
||||
- **[Qwen](https://lobechat.com/discover/provider/qwen)**: 通义千问是阿里云自主研发的超大规模语言模型,具有强大的自然语言理解和生成能力。它可以回答各种问题、创作文字内容、表达观点看法、撰写代码等,在多个领域发挥作用。
|
||||
- **[Wenxin](https://lobechat.com/discover/provider/wenxin)**: 企业级一站式大模型与 AI 原生应用开发及服务平台,提供最全面易用的生成式人工智能模型开发、应用开发全流程工具链
|
||||
- **[Hunyuan](https://lobechat.com/discover/provider/hunyuan)**: 由腾讯研发的大语言模型,具备强大的中文创作能力,复杂语境下的逻辑推理能力,以及可靠的任务执行能力
|
||||
- **[Spark](https://lobechat.com/discover/provider/spark)**: 科大讯飞星火大模型提供多领域、多语言的强大 AI 能力,利用先进的自然语言处理技术,构建适用于智能硬件、智慧医疗、智慧金融等多种垂直场景的创新应用。
|
||||
- **[ZhiPu](https://lobechat.com/discover/provider/zhipu)**: 智谱 AI 提供多模态与语言模型的开放平台,支持广泛的 AI 应用场景,包括文本处理、图像理解与编程辅助等。
|
||||
- **[SiliconCloud](https://lobechat.com/discover/provider/siliconcloud)**: SiliconCloud,基于优秀开源基础模型的高性价比 GenAI 云服务
|
||||
- **[01.AI](https://lobechat.com/discover/provider/zeroone)**: 零一万物致力于推动以人为本的 AI 2.0 技术革命,旨在通过大语言模型创造巨大的经济和社会价值,并开创新的 AI 生态与商业模式。
|
||||
- **[Spark](https://lobechat.com/discover/provider/spark)**: 科大讯飞星火大模型提供多领域、多语言的强大 AI 能力,利用先进的自然语言处理技术,构建适用于智能硬件、智慧医疗、智慧金融等多种垂直场景的创新应用。
|
||||
- **[SenseNova](https://lobechat.com/discover/provider/sensenova)**: 商汤日日新,依托商汤大装置的强大的基础支撑,提供高效易用的全栈大模型服务。
|
||||
- **[Stepfun](https://lobechat.com/discover/provider/stepfun)**: 阶级星辰大模型具备行业领先的多模态及复杂推理能力,支持超长文本理解和强大的自主调度搜索引擎功能。
|
||||
- **[Moonshot](https://lobechat.com/discover/provider/moonshot)**: Moonshot 是由北京月之暗面科技有限公司推出的开源平台,提供多种自然语言处理模型,应用领域广泛,包括但不限于内容创作、学术研究、智能推荐、医疗诊断等,支持长文本处理和复杂生成任务。
|
||||
- **[Baichuan](https://lobechat.com/discover/provider/baichuan)**: 百川智能是一家专注于人工智能大模型研发的公司,其模型在国内知识百科、长文本处理和生成创作等中文任务上表现卓越,超越了国外主流模型。百川智能还具备行业领先的多模态能力,在多项权威评测中表现优异。其模型包括 Baichuan 4、Baichuan 3 Turbo 和 Baichuan 3 Turbo 128k 等,分别针对不同应用场景进行优化,提供高性价比的解决方案。
|
||||
- **[Minimax](https://lobechat.com/discover/provider/minimax)**: MiniMax 是 2021 年成立的通用人工智能科技公司,致力于与用户共创智能。MiniMax 自主研发了不同模态的通用大模型,其中包括万亿参数的 MoE 文本大模型、语音大模型以及图像大模型。并推出了海螺 AI 等应用。
|
||||
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI 是 360 公司推出的 AI 模型和服务平台,提供多种先进的自然语言处理模型,包括 360GPT2 Pro、360GPT Pro、360GPT Turbo 和 360GPT Turbo Responsibility 8K。这些模型结合了大规模参数和多模态能力,广泛应用于文本生成、语义理解、对话系统与代码生成等领域。通过灵活的定价策略,360 AI 满足多样化用户需求,支持开发者集成,推动智能化应用的革新和发展。
|
||||
- **[Taichu](https://lobechat.com/discover/provider/taichu)**: 中科院自动化研究所和武汉人工智能研究院推出新一代多模态大模型,支持多轮问答、文本创作、图像生成、3D 理解、信号分析等全面问答任务,拥有更强的认知、理解、创作能力,带来全新互动体验。
|
||||
- **[InternLM](https://lobechat.com/discover/provider/internlm)**: 致力于大模型研究与开发工具链的开源组织。为所有 AI 开发者提供高效、易用的开源平台,让最前沿的大模型与算法技术触手可及
|
||||
- **[SiliconCloud](https://lobechat.com/discover/provider/siliconcloud)**: SiliconCloud,基于优秀开源基础模型的高性价比 GenAI 云服务
|
||||
- **[Higress](https://lobechat.com/discover/provider/higress)**: Higress 是一款云原生 API 网关,在阿里内部为解决 Tengine reload 对长连接业务有损,以及 gRPC/Dubbo 负载均衡能力不足而诞生。
|
||||
- **[Gitee AI](https://lobechat.com/discover/provider/giteeai)**: Gitee AI 的 Serverless API 为 AI 开发者提供开箱即用的大模型推理 API 服务。
|
||||
- **[Taichu](https://lobechat.com/discover/provider/taichu)**: 中科院自动化研究所和武汉人工智能研究院推出新一代多模态大模型,支持多轮问答、文本创作、图像生成、3D 理解、信号分析等全面问答任务,拥有更强的认知、理解、创作能力,带来全新互动体验。
|
||||
- **[360 AI](https://lobechat.com/discover/provider/ai360)**: 360 AI 是 360 公司推出的 AI 模型和服务平台,提供多种先进的自然语言处理模型,包括 360GPT2 Pro、360GPT Pro、360GPT Turbo 和 360GPT Turbo Responsibility 8K。这些模型结合了大规模参数和多模态能力,广泛应用于文本生成、语义理解、对话系统与代码生成等领域。通过灵活的定价策略,360 AI 满足多样化用户需求,支持开发者集成,推动智能化应用的革新和发展。
|
||||
|
||||
</details>
|
||||
|
||||
> 📊 Total providers: [<kbd>**36**</kbd>](https://lobechat.com/discover/providers)
|
||||
> 📊 Total providers: [<kbd>**37**</kbd>](https://lobechat.com/discover/providers)
|
||||
|
||||
<!-- PROVIDER LIST -->
|
||||
|
||||
同时,我们也在计划支持更多的模型服务商,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的 [💬 社区讨论](https://github.com/lobehub/lobe-chat/discussions/1284)。
|
||||
同时,我们也在计划支持更多的模型服务商,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的 [💬 社区讨论](https://github.com/lobehub/lobe-chat/discussions/6157)。
|
||||
|
||||
<div align="right">
|
||||
|
||||
@@ -199,7 +242,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
||||
|
||||
[![][image-feat-local]][docs-feat-local]
|
||||
|
||||
### `3` [支持本地大语言模型 (LLM)][docs-feat-local]
|
||||
### `6` [支持本地大语言模型 (LLM)][docs-feat-local]
|
||||
|
||||
为了满足特定用户的需求,LobeChat 还基于 [Ollama](https://ollama.ai) 支持了本地模型的使用,让用户能够更灵活地使用自己的或第三方的模型。
|
||||
|
||||
@@ -215,7 +258,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
|
||||
|
||||
[![][image-feat-vision]][docs-feat-vision]
|
||||
|
||||
### `4` [模型视觉识别 (Model Visual)][docs-feat-vision]
|
||||
### `7` [模型视觉识别 (Model Visual)][docs-feat-vision]
|
||||
|
||||
LobeChat 已经支持 OpenAI 最新的 [`gpt-4-vision`](https://platform.openai.com/docs/guides/vision) 支持视觉识别的模型,这是一个具备视觉识别能力的多模态应用。
|
||||
用户可以轻松上传图片或者拖拽图片到对话框中,助手将能够识别图片内容,并在此基础上进行智能对话,构建更智能、更多元化的聊天场景。
|
||||
@@ -230,7 +273,7 @@ LobeChat 已经支持 OpenAI 最新的 [`gpt-4-vision`](https://platform.openai.
|
||||
|
||||
[![][image-feat-tts]][docs-feat-tts]
|
||||
|
||||
### `5` [TTS & STT 语音会话][docs-feat-tts]
|
||||
### `8` [TTS & STT 语音会话][docs-feat-tts]
|
||||
|
||||
LobeChat 支持文字转语音(Text-to-Speech,TTS)和语音转文字(Speech-to-Text,STT)技术,这使得我们的应用能够将文本信息转化为清晰的语音输出,用户可以像与真人交谈一样与我们的对话助手进行交流。
|
||||
用户可以从多种声音中选择,给助手搭配合适的音源。 同时,对于那些倾向于听觉学习或者想要在忙碌中获取信息的用户来说,TTS 提供了一个极佳的解决方案。
|
||||
@@ -245,7 +288,7 @@ LobeChat 支持文字转语音(Text-to-Speech,TTS)和语音转文字(Spe
|
||||
|
||||
[![][image-feat-t2i]][docs-feat-t2i]
|
||||
|
||||
### `6` [Text to Image 文生图][docs-feat-t2i]
|
||||
### `9` [Text to Image 文生图][docs-feat-t2i]
|
||||
|
||||
支持最新的文本到图片生成技术,LobeChat 现在能够让用户在与助手对话中直接调用文生图工具进行创作。
|
||||
通过利用 [`DALL-E 3`](https://openai.com/dall-e-3)、[`MidJourney`](https://www.midjourney.com/) 和 [`Pollinations`](https://pollinations.ai/) 等 AI 工具的能力, 助手们现在可以将你的想法转化为图像。
|
||||
@@ -259,7 +302,7 @@ LobeChat 支持文字转语音(Text-to-Speech,TTS)和语音转文字(Spe
|
||||
|
||||
[![][image-feat-plugin]][docs-feat-plugin]
|
||||
|
||||
### `7` [插件系统 (Tools Calling)][docs-feat-plugin]
|
||||
### `10` [插件系统 (Tools Calling)][docs-feat-plugin]
|
||||
|
||||
LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地增强了 ChatGPT 的实用性和灵活性。
|
||||
|
||||
@@ -273,14 +316,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
| 最近新增 | 描述 |
|
||||
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
| [MintbaseSearch](https://lobechat.com/discover/plugin/mintbasesearch)<br/><sup>By **mintbase** on **2024-12-31**</sup> | 在 NEAR 协议上查找任何 NFT 数据。<br/>`加密货币` `nft` |
|
||||
| [PortfolioMeta](https://lobechat.com/discover/plugin/StockData)<br/><sup>By **portfoliometa** on **2024-12-22**</sup> | 分析股票并获取全面的实时投资数据和分析。<br/>`股票` |
|
||||
| [谷歌自定义搜索引擎](https://lobechat.com/discover/plugin/google-cse)<br/><sup>By **vsnthdev** on **2024-12-02**</sup> | 通过他们的官方自定义搜索引擎 API 搜索谷歌。<br/>`网络` `搜索` |
|
||||
| [Speak](https://lobechat.com/discover/plugin/speak)<br/><sup>By **speak** on **2024-12-02**</sup> | 使用 Speak,您的 AI 语言导师,学习如何用另一种语言说任何事情。<br/>`教育` `语言` |
|
||||
| 最近新增 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
|
||||
| [网页](https://lobechat.com/discover/plugin/web)<br/><sup>By **Proghit** on **2025-01-24**</sup> | 智能网页搜索,读取和分析页面,以提供来自 Google 结果的全面答案。<br/>`网页` `搜索` |
|
||||
| [MintbaseSearch](https://lobechat.com/discover/plugin/mintbasesearch)<br/><sup>By **mintbase** on **2024-12-31**</sup> | 在 NEAR 协议上查找任何 NFT 数据。<br/>`加密货币` `nft` |
|
||||
| [必应网页搜索](https://lobechat.com/discover/plugin/Bingsearch-identifier)<br/><sup>By **FineHow** on **2024-12-22**</sup> | 通过 BingApi 搜索互联网上的信息<br/>`bingsearch` |
|
||||
| [PortfolioMeta](https://lobechat.com/discover/plugin/StockData)<br/><sup>By **portfoliometa** on **2024-12-22**</sup> | 分析股票并获取全面的实时投资数据和分析。<br/>`股票` |
|
||||
|
||||
> 📊 Total plugins: [<kbd>**48**</kbd>](https://lobechat.com/discover/plugins)
|
||||
> 📊 Total plugins: [<kbd>**47**</kbd>](https://lobechat.com/discover/plugins)
|
||||
|
||||
<!-- PLUGIN LIST -->
|
||||
|
||||
@@ -292,7 +335,7 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
||||
|
||||
[![][image-feat-agent]][docs-feat-agent]
|
||||
|
||||
### `8` [助手市场 (GPTs)][docs-feat-agent]
|
||||
### `11` [助手市场 (GPTs)][docs-feat-agent]
|
||||
|
||||
在 LobeChat 的助手市场中,创作者们可以发现一个充满活力和创新的社区,它汇聚了众多精心设计的助手,这些助手不仅在工作场景中发挥着重要作用,也在学习过程中提供了极大的便利。
|
||||
我们的市场不仅是一个展示平台,更是一个协作的空间。在这里,每个人都可以贡献自己的智慧,分享个人开发的助手。
|
||||
@@ -308,14 +351,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
| 最近新增 | 描述 |
|
||||
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| [系统指令专家](https://lobechat.com/discover/assistant/instructer)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-12-04**</sup> | 擅长精炼与生成高效系统指令<br/>`系统指令` `写作` `细节优化` `用户需求` |
|
||||
| [日语帮助记忆师](https://lobechat.com/discover/assistant/japan-language-helper)<br/><sup>By **[sharkbear212](https://github.com/sharkbear212)** on **2024-12-04**</sup> | 擅长日语五十音,平假名,片假名,单词和短语解释与记忆技巧<br/>`解释` `记忆技巧` `日语教学` |
|
||||
| [诗词卡片设计师](https://lobechat.com/discover/assistant/poetry-card-designer)<br/><sup>By **[lianxin255](https://github.com/lianxin255)** on **2024-12-03**</sup> | 擅长设计诗词卡片,提升艺术感与吸引力<br/>`诗词卡片设计` `卡片` `创意` `艺术表现` |
|
||||
| [日常医生](https://lobechat.com/discover/assistant/yunchat-docter)<br/><sup>By **[yuyun2000](https://github.com/yuyun2000)** on **2024-11-30**</sup> | 擅长外科诊疗与个性化健康管理<br/>`全科医学` `外科` `健康咨询` `个性化治疗` `医学教育` |
|
||||
| 最近新增 | 描述 |
|
||||
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| [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>**453**</kbd> ](https://lobechat.com/discover/assistants)
|
||||
> 📊 Total agents: [<kbd>**487**</kbd> ](https://lobechat.com/discover/assistants)
|
||||
|
||||
<!-- AGENT LIST -->
|
||||
|
||||
@@ -327,7 +370,7 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
||||
|
||||
[![][image-feat-database]][docs-feat-database]
|
||||
|
||||
### `9` [支持本地 / 远程数据库][docs-feat-database]
|
||||
### `12` [支持本地 / 远程数据库][docs-feat-database]
|
||||
|
||||
LobeChat 支持同时使用服务端数据库和本地数据库。根据您的需求,您可以选择合适的部署方案:
|
||||
|
||||
@@ -344,7 +387,7 @@ LobeChat 支持同时使用服务端数据库和本地数据库。根据您的
|
||||
|
||||
[![][image-feat-auth]][docs-feat-auth]
|
||||
|
||||
### `10` [支持多用户管理][docs-feat-auth]
|
||||
### `13` [支持多用户管理][docs-feat-auth]
|
||||
|
||||
LobeChat 支持多用户管理,提供了两种主要的用户认证和管理方案,以满足不同需求:
|
||||
|
||||
@@ -362,7 +405,7 @@ LobeChat 支持多用户管理,提供了两种主要的用户认证和管理
|
||||
|
||||
[![][image-feat-pwa]][docs-feat-pwa]
|
||||
|
||||
### `11` [渐进式 Web 应用 (PWA)][docs-feat-pwa]
|
||||
### `14` [渐进式 Web 应用 (PWA)][docs-feat-pwa]
|
||||
|
||||
我们深知在当今多设备环境下为用户提供无缝体验的重要性。为此,我们采用了渐进式 Web 应用 [PWA](https://support.google.com/chrome/answer/9658361) 技术,
|
||||
这是一种能够将网页应用提升至接近原生应用体验的现代 Web 技术。通过 PWA,LobeChat 能够在桌面和移动设备上提供高度优化的用户体验,同时保持轻量级和高性能的特点。
|
||||
@@ -385,7 +428,7 @@ LobeChat 支持多用户管理,提供了两种主要的用户认证和管理
|
||||
|
||||
[![][image-feat-mobile]][docs-feat-mobile]
|
||||
|
||||
### `12` [移动设备适配][docs-feat-mobile]
|
||||
### `15` [移动设备适配][docs-feat-mobile]
|
||||
|
||||
针对移动设备进行了一系列的优化设计,以提升用户的移动体验。目前,我们正在对移动端的用户体验进行版本迭代,以实现更加流畅和直观的交互。如果您有任何建议或想法,我们非常欢迎您通过 GitHub Issues 或者 Pull Requests 提供反馈。
|
||||
|
||||
@@ -397,7 +440,7 @@ LobeChat 支持多用户管理,提供了两种主要的用户认证和管理
|
||||
|
||||
[![][image-feat-theme]][docs-feat-theme]
|
||||
|
||||
### `13` [自定义主题][docs-feat-theme]
|
||||
### `16` [自定义主题][docs-feat-theme]
|
||||
|
||||
作为设计工程师出身,LobeChat 在界面设计上充分考虑用户的个性化体验,因此引入了灵活多变的主题模式,其中包括日间的亮色模式和夜间的深色模式。
|
||||
除了主题模式的切换,还提供了一系列的颜色定制选项,允许用户根据自己的喜好来调整应用的主题色彩。无论是想要沉稳的深蓝,还是希望活泼的桃粉,或者是专业的灰白,用户都能够在 LobeChat 中找到匹配自己风格的颜色选择。
|
||||
@@ -412,7 +455,7 @@ LobeChat 支持多用户管理,提供了两种主要的用户认证和管理
|
||||
|
||||
</div>
|
||||
|
||||
### 更多特性
|
||||
### `*` 更多特性
|
||||
|
||||
除了上述功能特性以外,LobeChat 所具有的设计和技术能力将为你带来更多使用保障:
|
||||
|
||||
@@ -498,27 +541,24 @@ LobeChat 提供了 Vercel 的 自托管版本 和 [Docker 镜像][docker-release
|
||||
[![][docker-size-shield]][docker-size-link]
|
||||
[![][docker-pulls-shield]][docker-pulls-link]
|
||||
|
||||
我们提供了 Docker 镜像,供你在自己的私有设备上部署 LobeChat 服务。使用以下命令即可使用一键启动 LobeChat 服务:
|
||||
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 -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
--name lobe-chat \
|
||||
lobehub/lobe-chat
|
||||
$ mkdir lobe-chat-db && cd lobe-chat-db
|
||||
```
|
||||
|
||||
> \[!TIP]
|
||||
>
|
||||
> 如果你需要通过代理使用 OpenAI 服务,你可以使用 `OPENAI_PROXY_URL` 环境变量来配置代理地址:
|
||||
2. 启动一键脚本
|
||||
|
||||
```fish
|
||||
$ docker run -d -p 3210:3210 \
|
||||
-e OPENAI_API_KEY=sk-xxxx \
|
||||
-e OPENAI_PROXY_URL=https://api-proxy.com/v1 \
|
||||
-e ACCESS_CODE=lobe66 \
|
||||
--name lobe-chat \
|
||||
lobehub/lobe-chat
|
||||
bash <(curl -fsSL https://lobe.li/setup.sh) -l zh_CN
|
||||
```
|
||||
|
||||
3. 启动 LobeChat
|
||||
|
||||
```fish
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
> \[!NOTE]
|
||||
@@ -750,9 +790,9 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[blog]: https://lobehub.com/zh/blog
|
||||
[changelog]: https://lobehub.com/changelog
|
||||
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
|
||||
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
|
||||
[chat-plugin-sdk]: https://github.com/lobehub/chat-plugin-sdk
|
||||
[chat-plugin-template]: https://github.com/lobehub/chat-plugin-template
|
||||
[chat-plugins-gateway]: https://github.com/lobehub/chat-plugins-gateway
|
||||
@@ -765,24 +805,27 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[deploy-on-alibaba-cloud-button-image]: https://service-info-public.oss-cn-hangzhou.aliyuncs.com/computenest-en.svg
|
||||
[deploy-on-alibaba-cloud-link]: https://computenest.console.aliyun.com/service/instance/create/default?type=user&ServiceName=LobeChat%E7%A4%BE%E5%8C%BA%E7%89%88
|
||||
[deploy-on-sealos-button-image]: https://raw.githubusercontent.com/labring-actions/templates/main/Deploy-on-Sealos.svg
|
||||
[deploy-on-sealos-link]: https://cloud.sealos.io/?openapp=system-template%3FtemplateName%3Dlobe-chat
|
||||
[deploy-on-sealos-link]: https://template.hzh.sealos.run/deploy?templateName=lobe-chat-db
|
||||
[deploy-on-zeabur-button-image]: https://zeabur.com/button.svg
|
||||
[deploy-on-zeabur-link]: https://zeabur.com/templates/VZGGTI
|
||||
[discord-link]: https://discord.gg/AYFPHvv2jT
|
||||
[discord-shield]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=flat-square
|
||||
[discord-shield-badge]: https://img.shields.io/discord/1127171173982154893?color=5865F2&label=discord&labelColor=black&logo=discord&logoColor=white&style=for-the-badge
|
||||
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square
|
||||
[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
|
||||
[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat
|
||||
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat?color=369eff&labelColor=black&style=flat-square
|
||||
[docker-pulls-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-pulls-shield]: https://img.shields.io/docker/pulls/lobehub/lobe-chat?color=45cc11&labelColor=black&style=flat-square&sort=semver
|
||||
[docker-release-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-release-shield]: https://img.shields.io/docker/v/lobehub/lobe-chat-database?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square&sort=semver
|
||||
[docker-size-link]: https://hub.docker.com/r/lobehub/lobe-chat-database
|
||||
[docker-size-shield]: https://img.shields.io/docker/image-size/lobehub/lobe-chat-database?color=369eff&labelColor=black&style=flat-square&sort=semver
|
||||
[docs]: https://lobehub.com/zh/docs/usage/start
|
||||
[docs-dev-guide]: https://github.com/lobehub/lobe-chat/wiki/index
|
||||
[docs-docker]: https://lobehub.com/docs/self-hosting/platform/docker
|
||||
[docs-docker]: https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose
|
||||
[docs-env-var]: https://lobehub.com/docs/self-hosting/environment-variables
|
||||
[docs-feat-agent]: https://lobehub.com/docs/usage/features/agent-market
|
||||
[docs-feat-artifacts]: https://lobehub.com/docs/usage/features/artifacts
|
||||
[docs-feat-auth]: https://lobehub.com/docs/usage/features/auth
|
||||
[docs-feat-branch]: https://lobehub.com/docs/usage/features/branching-conversations
|
||||
[docs-feat-cot]: https://lobehub.com/docs/usage/features/cot
|
||||
[docs-feat-database]: https://lobehub.com/docs/usage/features/database
|
||||
[docs-feat-knowledgebase]: https://lobehub.com/blog/knowledge-base
|
||||
[docs-feat-local]: https://lobehub.com/docs/usage/features/local-llm
|
||||
@@ -826,22 +869,25 @@ This project is [Apache 2.0](./LICENSE) licensed.
|
||||
[github-stars-shield]: https://img.shields.io/github/stars/lobehub/lobe-chat?color=ffcb47&labelColor=black&style=flat-square
|
||||
[github-trending-shield]: https://trendshift.io/api/badge/repositories/2256
|
||||
[github-trending-url]: https://trendshift.io/repositories/2256
|
||||
[image-banner]: https://github.com/lobehub/lobe-chat/assets/28616219/9f155dff-4737-429f-9cad-a70a1a860c5f
|
||||
[image-feat-agent]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670869-f1ffbf66-42b6-42cf-a937-9ce1f8328514.png
|
||||
[image-feat-auth]: https://github.com/lobehub/lobe-chat/assets/17870709/8ce70e15-40df-451e-b700-66090fe5b8c2
|
||||
[image-feat-database]: https://github.com/lobehub/lobe-chat/assets/17870709/c27a0234-a4e9-40e5-8bcb-42d5ce7e40f9
|
||||
[image-feat-knowledgebase]: https://github.com/user-attachments/assets/77e58e1c-c82f-4341-b159-f4eeede9967f
|
||||
[image-feat-local]: https://github.com/lobehub/lobe-chat/assets/28616219/ca9a21bc-ea6c-4c90-bf4a-fa53b4fb2b5c
|
||||
[image-feat-mobile]: https://gw.alipayobjects.com/zos/kitchen/R441AuFS4W/mobile.webp
|
||||
[image-feat-plugin]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/268670883-33c43a5c-a512-467e-855c-fa299548cce5.png
|
||||
[image-feat-privoder]: https://github.com/lobehub/lobe-chat/assets/28616219/b164bc54-8ba2-4c1e-b2f2-f4d7f7e7a551
|
||||
[image-feat-pwa]: https://gw.alipayobjects.com/zos/kitchen/69x6bllkX3/pwa.webp
|
||||
[image-feat-t2i]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/297746445-0ff762b9-aa08-4337-afb7-12f932b6efbb.png
|
||||
[image-feat-theme]: https://gw.alipayobjects.com/zos/kitchen/pvus1lo%26Z7/darkmode.webp
|
||||
[image-feat-tts]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072124-c9853d8d-f1b5-44a8-a305-45ebc0f6d19a.png
|
||||
[image-feat-vision]: https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/284072129-382bdf30-e3d6-4411-b5a0-249710b8ba08.png
|
||||
[image-overview]: https://github.com/lobehub/lobe-chat/assets/17870709/56b95d48-f573-41cd-8b38-387bf88bc4bf
|
||||
[image-star]: https://github.com/lobehub/lobe-chat/assets/17870709/cb06b748-513f-47c2-8740-d876858d7855
|
||||
[image-banner]: https://github.com/user-attachments/assets/6f293c7f-47b4-47eb-9202-fe68a942d35b
|
||||
[image-feat-agent]: https://github.com/user-attachments/assets/b3ab6e35-4fbc-468d-af10-e3e0c687350f
|
||||
[image-feat-artifacts]: https://github.com/user-attachments/assets/7f95fad6-b210-4e6e-84a0-7f39e96f3a00
|
||||
[image-feat-auth]: https://github.com/user-attachments/assets/80bb232e-19d1-4f97-98d6-e291f3585e6d
|
||||
[image-feat-branch]: https://github.com/user-attachments/assets/92f72082-02bd-4835-9c54-b089aad7fd41
|
||||
[image-feat-cot]: https://github.com/user-attachments/assets/f74f1139-d115-4e9c-8c43-040a53797a5e
|
||||
[image-feat-database]: https://github.com/user-attachments/assets/f1697c8b-d1fb-4dac-ba05-153c6295d91d
|
||||
[image-feat-knowledgebase]: https://github.com/user-attachments/assets/7da7a3b2-92fd-4630-9f4e-8560c74955ae
|
||||
[image-feat-local]: https://github.com/user-attachments/assets/1239da50-d832-4632-a7ef-bd754c0f3850
|
||||
[image-feat-mobile]: https://github.com/user-attachments/assets/32cf43c4-96bd-4a4c-bfb6-59acde6fe380
|
||||
[image-feat-plugin]: https://github.com/user-attachments/assets/66a891ac-01b6-4e3f-b978-2eb07b489b1b
|
||||
[image-feat-privoder]: https://github.com/user-attachments/assets/e553e407-42de-4919-977d-7dbfcf44a821
|
||||
[image-feat-pwa]: https://github.com/user-attachments/assets/9647f70f-b71b-43b6-9564-7cdd12d1c24d
|
||||
[image-feat-t2i]: https://github.com/user-attachments/assets/708274a7-2458-494b-a6ec-b73dfa1fa7c2
|
||||
[image-feat-theme]: https://github.com/user-attachments/assets/b47c39f1-806f-492b-8fcb-b0fa973937c1
|
||||
[image-feat-tts]: https://github.com/user-attachments/assets/50189597-2cc3-4002-b4c8-756a52ad5c0a
|
||||
[image-feat-vision]: https://github.com/user-attachments/assets/18574a1f-46c2-4cbc-af2c-35a86e128a07
|
||||
[image-overview]: https://github.com/user-attachments/assets/dbfaa84a-2c82-4dd9-815c-5be616f264a4
|
||||
[image-star]: https://github.com/user-attachments/assets/c3b482e7-cef5-4e94-bef9-226900ecfaab
|
||||
[issues-link]: https://img.shields.io/github/issues/lobehub/lobe-chat.svg?style=flat
|
||||
[lobe-chat-plugins]: https://github.com/lobehub/lobe-chat-plugins
|
||||
[lobe-commit]: https://github.com/lobehub/lobe-commit/tree/master/packages/lobe-commit
|
||||
|
||||
+1508
File diff suppressed because it is too large
Load Diff
@@ -2,64 +2,34 @@
|
||||
|
||||
#### TOC
|
||||
|
||||
- [Welcome Page](#welcome-page)
|
||||
- [Chat Page](#chat-page)
|
||||
- [Market Page](#market-page)
|
||||
- [Settings Page](#settings-page)
|
||||
|
||||
## Welcome Page
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/welcome>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :---------------------------------------------: | :--------------------------------------------: |
|
||||
| ![][welcome-desktop] | ![][welcome-mobile] |
|
||||
| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
|
||||
- [Discover Page](#discover-page)
|
||||
|
||||
## Chat Page
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/chat>
|
||||
> <https://lobechat.com/chat>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :------------------------------------------: | :-----------------------------------------: |
|
||||
| ![][chat-desktop] | ![][chat-mobile] |
|
||||
| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |
|
||||
|
||||
## Market Page
|
||||
## Discover Page
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/market>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :--------------------------------------------: | :-------------------------------------------: |
|
||||
| ![][market-desktop] | ![][market-mobile] |
|
||||
| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |
|
||||
|
||||
## Settings Page
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/settings>
|
||||
> <https://lobechat.com/discover>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :----------------------------------------------: | :---------------------------------------------: |
|
||||
| ![][settings-desktop] | ![][settings-mobile] |
|
||||
| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |
|
||||
| ![][discover-desktop] | ![][discover-mobile] |
|
||||
| [⚡️ Lighthouse Report][discover-desktop-report] | [⚡️ Lighthouse Report][discover-mobile-report] |
|
||||
|
||||
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
|
||||
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
|
||||
[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
|
||||
[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html
|
||||
[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
|
||||
[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html
|
||||
[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
|
||||
[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html
|
||||
[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
|
||||
[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html
|
||||
[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
|
||||
[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html
|
||||
[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
|
||||
[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
|
||||
[discover-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/desktop/pagespeed.svg
|
||||
[discover-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/desktop/lobechat_com_discover.html
|
||||
[discover-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/mobile/pagespeed.svg
|
||||
[discover-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/mobile/lobechat_com_discover.html
|
||||
|
||||
@@ -2,64 +2,34 @@
|
||||
|
||||
#### TOC
|
||||
|
||||
- [Welcome 欢迎页面](#welcome-欢迎页面)
|
||||
- [Chat 聊天页面](#chat-聊天页面)
|
||||
- [Market 市场页面](#market-市场页面)
|
||||
- [Settings 设置页面](#settings-设置页面)
|
||||
|
||||
## Welcome 欢迎页面
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/welcome>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :---------------------------------------------: | :--------------------------------------------: |
|
||||
| ![][welcome-desktop] | ![][welcome-mobile] |
|
||||
| [⚡️ Lighthouse Report][welcome-desktop-report] | [⚡️ Lighthouse Report][welcome-mobile-report] |
|
||||
- [Discover 发现页面](#discover-发现页面)
|
||||
|
||||
## Chat 聊天页面
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/chat>
|
||||
> <https://lobechat.com/chat>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :------------------------------------------: | :-----------------------------------------: |
|
||||
| ![][chat-desktop] | ![][chat-mobile] |
|
||||
| [⚡️ Lighthouse Report][chat-desktop-report] | [⚡️ Lighthouse Report][chat-mobile-report] |
|
||||
|
||||
## Market 市场页面
|
||||
## Discover 发现页面
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/market>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :--------------------------------------------: | :-------------------------------------------: |
|
||||
| ![][market-desktop] | ![][market-mobile] |
|
||||
| [⚡️ Lighthouse Report][market-desktop-report] | [⚡️ Lighthouse Report][market-mobile-report] |
|
||||
|
||||
## Settings 设置页面
|
||||
|
||||
> **Info**\
|
||||
> <https://chat-preview.lobehub.com/settings>
|
||||
> <https://lobechat.com/discover>
|
||||
|
||||
| Desktop | Mobile |
|
||||
| :----------------------------------------------: | :---------------------------------------------: |
|
||||
| ![][settings-desktop] | ![][settings-mobile] |
|
||||
| [⚡️ Lighthouse Report][settings-desktop-report] | [⚡️ Lighthouse Report][settings-mobile-report] |
|
||||
| ![][discover-desktop] | ![][discover-mobile] |
|
||||
| [⚡️ Lighthouse Report][discover-desktop-report] | [⚡️ Lighthouse Report][discover-mobile-report] |
|
||||
|
||||
[chat-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/desktop/pagespeed.svg
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/chat_preview_lobehub_com_chat.html
|
||||
[chat-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/desktop/lobechat_com_chat.html
|
||||
[chat-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/chat/mobile/pagespeed.svg
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/chat_preview_lobehub_com_chat.html
|
||||
[market-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/desktop/pagespeed.svg
|
||||
[market-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/desktop/chat_preview_lobehub_com_market.html
|
||||
[market-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/market/mobile/pagespeed.svg
|
||||
[market-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/market/mobile/chat_preview_lobehub_com_market.html
|
||||
[settings-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/desktop/pagespeed.svg
|
||||
[settings-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/desktop/chat_preview_lobehub_com_settings.html
|
||||
[settings-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/settings/mobile/pagespeed.svg
|
||||
[settings-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/settings/mobile/chat_preview_lobehub_com_settings.html
|
||||
[welcome-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/desktop/pagespeed.svg
|
||||
[welcome-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/desktop/chat_preview_lobehub_com_welcome.html
|
||||
[welcome-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/welcome/mobile/pagespeed.svg
|
||||
[welcome-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/welcome/mobile/chat_preview_lobehub_com_welcome.html
|
||||
[chat-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/chat/mobile/lobechat_com_chat.html
|
||||
[discover-desktop]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/desktop/pagespeed.svg
|
||||
[discover-desktop-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/desktop/lobechat_com_discover.html
|
||||
[discover-mobile]: https://raw.githubusercontent.com/lobehub/lobe-chat/lighthouse/lighthouse/discover/mobile/pagespeed.svg
|
||||
[discover-mobile-report]: https://lobehub.github.io/lobe-chat/lighthouse/discover/mobile/lobechat_com_discover.html
|
||||
|
||||
@@ -16,20 +16,26 @@
|
||||
LOBE_PORT=3210
|
||||
CASDOOR_PORT=8000
|
||||
MINIO_PORT=9000
|
||||
APP_URL=http://localhost:3210
|
||||
AUTH_URL=http://localhost:3210/api/auth
|
||||
|
||||
# Postgres related, which are the necessary environment variables for DB
|
||||
LOBE_DB_NAME=lobechat
|
||||
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
|
||||
|
||||
AUTH_CASDOOR_ISSUER=http://localhost:8000
|
||||
# Casdoor secret
|
||||
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
|
||||
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
|
||||
|
||||
# MinIO S3 configuration
|
||||
MINIO_ROOT_USER=YOUR_MINIO_USER
|
||||
MINIO_ROOT_USER=admin
|
||||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
|
||||
|
||||
# Configure the bucket information of MinIO
|
||||
S3_PUBLIC_DOMAIN=http://localhost:9000
|
||||
S3_ENDPOINT=http://localhost:9000
|
||||
MINIO_LOBE_BUCKET=lobe
|
||||
S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng
|
||||
S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO
|
||||
|
||||
# Configure for casdoor
|
||||
origin=http://localhost:8000
|
||||
@@ -16,21 +16,26 @@
|
||||
LOBE_PORT=3210
|
||||
CASDOOR_PORT=8000
|
||||
MINIO_PORT=9000
|
||||
APP_URL=http://localhost:3210
|
||||
AUTH_URL=http://localhost:3210/api/auth
|
||||
|
||||
# Postgres 相关,也即 DB 必须的环境变量
|
||||
LOBE_DB_NAME=lobechat
|
||||
POSTGRES_PASSWORD=uWNZugjBqixf8dxC
|
||||
|
||||
AUTH_CASDOOR_ISSUER=http://localhost:8000
|
||||
# Casdoor secret
|
||||
AUTH_CASDOOR_ID=a387a4892ee19b1a2249
|
||||
AUTH_CASDOOR_SECRET=dbf205949d704de81b0b5b3603174e23fbecc354
|
||||
|
||||
# MinIO S3 配置
|
||||
MINIO_ROOT_USER=YOUR_MINIO_USER
|
||||
MINIO_ROOT_USER=admin
|
||||
MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
|
||||
|
||||
# 在下方配置 minio 中添加的桶
|
||||
S3_PUBLIC_DOMAIN=http://localhost:9000
|
||||
S3_ENDPOINT=http://localhost:9000
|
||||
MINIO_LOBE_BUCKET=lobe
|
||||
S3_ACCESS_KEY_ID=soaucnP8Bip0TDdUjxng
|
||||
S3_SECRET_ACCESS_KEY=ZPUzvY34umfcfxvWKSv0P00vczVMB6YmgJS5J9eO
|
||||
|
||||
# 为 casdoor 配置
|
||||
origin=http://localhost:8000
|
||||
@@ -3,6 +3,7 @@ services:
|
||||
network-service:
|
||||
image: alpine
|
||||
container_name: lobe-network
|
||||
restart: always
|
||||
ports:
|
||||
- '${MINIO_PORT}:${MINIO_PORT}' # MinIO API
|
||||
- '9001:9001' # MinIO Console
|
||||
@@ -13,7 +14,7 @@ services:
|
||||
- lobe-network
|
||||
|
||||
postgresql:
|
||||
image: pgvector/pgvector:pg16
|
||||
image: pgvector/pgvector:pg17
|
||||
container_name: lobe-postgres
|
||||
ports:
|
||||
- '5432:5432'
|
||||
@@ -38,13 +39,24 @@ services:
|
||||
volumes:
|
||||
- './s3_data:/etc/minio/data'
|
||||
environment:
|
||||
- 'MINIO_ROOT_USER=${MINIO_ROOT_USER}'
|
||||
- 'MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}'
|
||||
- 'MINIO_API_CORS_ALLOW_ORIGIN=http://localhost:${LOBE_PORT}'
|
||||
- 'MINIO_API_CORS_ALLOW_ORIGIN=*'
|
||||
env_file:
|
||||
- .env
|
||||
restart: always
|
||||
command: >
|
||||
server /etc/minio/data --address ":${MINIO_PORT}" --console-address ":9001"
|
||||
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
minio server /etc/minio/data --address ':${MINIO_PORT}' --console-address ':9001' &
|
||||
MINIO_PID=\$!
|
||||
while ! curl -s http://localhost:${MINIO_PORT}/minio/health/live; do
|
||||
echo 'Waiting for MinIO to start...'
|
||||
sleep 1
|
||||
done
|
||||
sleep 5
|
||||
mc alias set myminio http://localhost:${MINIO_PORT} ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD}
|
||||
echo 'Creating bucket ${MINIO_LOBE_BUCKET}'
|
||||
mc mb myminio/${MINIO_LOBE_BUCKET}
|
||||
wait \$MINIO_PID
|
||||
"
|
||||
|
||||
casdoor:
|
||||
image: casbin/casdoor
|
||||
@@ -55,13 +67,28 @@ services:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
httpport: ${CASDOOR_PORT}
|
||||
RUNNING_IN_DOCKER: 'true'
|
||||
driverName: 'postgres'
|
||||
dataSourceName: 'user=postgres password=${POSTGRES_PASSWORD} host=postgresql port=5432 sslmode=disable dbname=casdoor'
|
||||
origin: 'http://localhost:${CASDOOR_PORT}'
|
||||
runmode: 'dev'
|
||||
volumes:
|
||||
- ./init_data.json:/init_data.json
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
searxng:
|
||||
image: searxng/searxng
|
||||
container_name: lobe-searxng
|
||||
volumes:
|
||||
- './searxng-settings.yml:/etc/searxng/settings.yml'
|
||||
environment:
|
||||
- 'SEARXNG_SETTINGS_FILE=/etc/searxng/settings.yml'
|
||||
restart: always
|
||||
networks:
|
||||
- lobe-network
|
||||
env_file:
|
||||
- .env
|
||||
|
||||
lobe:
|
||||
image: lobehub/lobe-chat-database
|
||||
@@ -78,21 +105,61 @@ services:
|
||||
condition: service_started
|
||||
|
||||
environment:
|
||||
- 'APP_URL=http://localhost:3210'
|
||||
- 'NEXT_AUTH_SSO_PROVIDERS=casdoor'
|
||||
- 'KEY_VAULTS_SECRET=Kix2wcUONd4CX51E/ZPAd36BqM4wzJgKjPtz2sGztqQ='
|
||||
- 'NEXT_AUTH_SECRET=NX2kaPE923dt6BL2U8e9oSre5RfoT7hg'
|
||||
- 'AUTH_URL=http://localhost:${LOBE_PORT}/api/auth'
|
||||
- 'AUTH_CASDOOR_ISSUER=http://localhost:${CASDOOR_PORT}'
|
||||
- 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
|
||||
- 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
|
||||
- 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
|
||||
- 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
|
||||
- 'S3_ENABLE_PATH_STYLE=1'
|
||||
- 'S3_ACCESS_KEY=${MINIO_ROOT_USER}'
|
||||
- 'S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}'
|
||||
- 'S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}'
|
||||
- 'LLM_VISION_IMAGE_USE_BASE64=1'
|
||||
- 'S3_SET_ACL=0'
|
||||
- 'SEARXNG_URL=http://searxng:8080'
|
||||
env_file:
|
||||
- .env
|
||||
restart: always
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
/bin/node /app/startServer.js &
|
||||
LOBE_PID=\$!
|
||||
sleep 3
|
||||
if [ $(wget --timeout=5 --spider --server-response ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
|
||||
echo '⚠️Warining: Unable to fetch OIDC configuration from Casdoor'
|
||||
echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
|
||||
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
echo '⚠️注意:无法从 Casdoor 获取 OIDC 配置'
|
||||
echo '请求 URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
|
||||
echo '了解更多:https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
else
|
||||
if ! wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep 'issuer' | grep ${AUTH_CASDOOR_ISSUER}; then
|
||||
printf '❌Error: The Auth issuer is conflict, Issuer in OIDC configuration is: %s' \$(wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -E 'issuer.*' | awk -F '\"' '{print \$4}')
|
||||
echo ' , but the issuer in .env file is: ${AUTH_CASDOOR_ISSUER} '
|
||||
echo 'Request URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
|
||||
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
printf '❌错误:Auth 的 issuer 冲突,OIDC 配置中的 issuer 是:%s' \$(wget -O - --timeout=5 ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration 2>&1 | grep -E 'issuer.*' | awk -F '\"' '{print \$4}')
|
||||
echo ' , 但 .env 文件中的 issuer 是:${AUTH_CASDOOR_ISSUER} '
|
||||
echo '请求 URL: ${AUTH_CASDOOR_ISSUER}/.well-known/openid-configuration'
|
||||
echo '了解更多:https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
fi
|
||||
fi
|
||||
if [ $(wget --timeout=5 --spider --server-response ${S3_ENDPOINT}/minio/health/live 2>&1 | grep -c 'HTTP/1.1 200 OK') -eq 0 ]; then
|
||||
echo '⚠️Warining: Unable to fetch MinIO health status'
|
||||
echo 'Request URL: ${S3_ENDPOINT}/minio/health/live'
|
||||
echo 'Read more at: https://lobehub.com/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
echo '⚠️注意:无法获取 MinIO 健康状态'
|
||||
echo '请求 URL: ${S3_ENDPOINT}/minio/health/live'
|
||||
echo '了解更多:https://lobehub.com/zh/docs/self-hosting/server-database/docker-compose#necessary-configuration'
|
||||
echo ''
|
||||
fi
|
||||
wait \$LOBE_PID
|
||||
"
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
"applications": [
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "app-built-in",
|
||||
"name": "lobechat",
|
||||
"createdTime": "2024-09-09T09:26:06Z",
|
||||
"displayName": "LobeChat",
|
||||
"logo": "https://lobehub.com/icon-192x192.png",
|
||||
"homepageUrl": "https://lobehub.com",
|
||||
"description": "LobeChat",
|
||||
"organization": "built-in",
|
||||
"organization": "lobechat",
|
||||
"cert": "cert-built-in",
|
||||
"headerHtml": "",
|
||||
"enablePassword": true,
|
||||
@@ -230,7 +230,9 @@
|
||||
"isCustom": false
|
||||
}
|
||||
],
|
||||
"grantTypes": ["authorization_code"],
|
||||
"grantTypes": [
|
||||
"authorization_code"
|
||||
],
|
||||
"organizationObj": null,
|
||||
"certPublicKey": "",
|
||||
"tags": [],
|
||||
@@ -238,7 +240,12 @@
|
||||
"isShared": false,
|
||||
"clientId": "a387a4892ee19b1a2249",
|
||||
"clientSecret": "dbf205949d704de81b0b5b3603174e23fbecc354",
|
||||
"redirectUris": ["http://localhost:3210/api/auth/callback/casdoor"],
|
||||
"redirectUris": [
|
||||
"http://localhost:3210/api/auth/callback/casdoor",
|
||||
"https://localhost:3210/api/auth/callback/casdoor",
|
||||
"http://example.com/api/auth/callback/casdoor",
|
||||
"https://example.com/api/auth/callback/casdoor"
|
||||
],
|
||||
"tokenFormat": "JWT",
|
||||
"tokenSigningMethod": "",
|
||||
"tokenFields": [],
|
||||
@@ -352,12 +359,306 @@
|
||||
"favicon": "https://cdn.casbin.org/img/casbin/favicon.ico",
|
||||
"passwordType": "plain",
|
||||
"passwordSalt": "",
|
||||
"passwordOptions": ["AtLeast6"],
|
||||
"countryCodes": ["US", "ES", "FR", "DE", "GB", "CN", "JP", "KR", "VN", "ID", "SG", "IN"],
|
||||
"passwordOptions": [
|
||||
"AtLeast6"
|
||||
],
|
||||
"countryCodes": [
|
||||
"US",
|
||||
"ES",
|
||||
"FR",
|
||||
"DE",
|
||||
"GB",
|
||||
"CN",
|
||||
"JP",
|
||||
"KR",
|
||||
"VN",
|
||||
"ID",
|
||||
"SG",
|
||||
"IN"
|
||||
],
|
||||
"defaultAvatar": "https://cdn.casbin.org/img/casbin.svg",
|
||||
"defaultApplication": "",
|
||||
"tags": [],
|
||||
"languages": ["en", "zh", "es", "fr", "de", "id", "ja", "ko", "ru", "vi", "pt"],
|
||||
"languages": [
|
||||
"en",
|
||||
"zh",
|
||||
"es",
|
||||
"fr",
|
||||
"de",
|
||||
"id",
|
||||
"ja",
|
||||
"ko",
|
||||
"ru",
|
||||
"vi",
|
||||
"pt"
|
||||
],
|
||||
"themeData": null,
|
||||
"masterPassword": "",
|
||||
"defaultPassword": "",
|
||||
"masterVerificationCode": "",
|
||||
"initScore": 2000,
|
||||
"enableSoftDeletion": false,
|
||||
"isProfilePublic": false,
|
||||
"useEmailAsUsername": false,
|
||||
"enableTour": true,
|
||||
"mfaItems": null,
|
||||
"accountItems": [
|
||||
{
|
||||
"name": "Organization",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "ID",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Immutable",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Name",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Display name",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Avatar",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "User type",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Password",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Email",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Phone",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Country code",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Country/Region",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Location",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Affiliation",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Title",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Homepage",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Bio",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Tag",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Signup application",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Roles",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Immutable",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Permissions",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Immutable",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Groups",
|
||||
"visible": true,
|
||||
"viewRule": "Public",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "3rd-party logins",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Properties",
|
||||
"visible": true,
|
||||
"viewRule": "Admin",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Is admin",
|
||||
"visible": true,
|
||||
"viewRule": "Admin",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Is forbidden",
|
||||
"visible": true,
|
||||
"viewRule": "Admin",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Is deleted",
|
||||
"visible": true,
|
||||
"viewRule": "Admin",
|
||||
"modifyRule": "Admin",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Multi-factor authentication",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "WebAuthn credentials",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "Managed accounts",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
},
|
||||
{
|
||||
"name": "MFA accounts",
|
||||
"visible": true,
|
||||
"viewRule": "Self",
|
||||
"modifyRule": "Self",
|
||||
"regex": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"owner": "admin",
|
||||
"name": "lobechat",
|
||||
"createdTime": "2024-09-09T09:26:04Z",
|
||||
"displayName": "LobeChat Organization",
|
||||
"websiteUrl": "https://lobehub.com",
|
||||
"logo": "https://lobehub.com/icon-192x192.png",
|
||||
"logoDark": "",
|
||||
"favicon": "https://lobehub.com/favicon.ico",
|
||||
"passwordType": "plain",
|
||||
"passwordSalt": "",
|
||||
"passwordOptions": [
|
||||
"AtLeast6"
|
||||
],
|
||||
"countryCodes": [
|
||||
"US",
|
||||
"ES",
|
||||
"FR",
|
||||
"DE",
|
||||
"GB",
|
||||
"CN",
|
||||
"JP",
|
||||
"KR",
|
||||
"VN",
|
||||
"ID",
|
||||
"SG",
|
||||
"IN"
|
||||
],
|
||||
"defaultAvatar": "https://cdn.casbin.org/img/casbin.svg",
|
||||
"defaultApplication": "",
|
||||
"tags": [],
|
||||
"languages": [
|
||||
"en",
|
||||
"zh",
|
||||
"es",
|
||||
"fr",
|
||||
"de",
|
||||
"id",
|
||||
"ja",
|
||||
"ko",
|
||||
"ru",
|
||||
"vi",
|
||||
"pt"
|
||||
],
|
||||
"themeData": null,
|
||||
"masterPassword": "",
|
||||
"defaultPassword": "",
|
||||
@@ -590,15 +891,23 @@
|
||||
"createdTime": "2024-09-09T09:26:04Z",
|
||||
"displayName": "Built-in Permission",
|
||||
"description": "Built-in Permission",
|
||||
"users": ["built-in/*"],
|
||||
"users": [
|
||||
"built-in/*"
|
||||
],
|
||||
"groups": [],
|
||||
"roles": [],
|
||||
"domains": [],
|
||||
"model": "user-model-built-in",
|
||||
"adapter": "",
|
||||
"resourceType": "Application",
|
||||
"resources": ["app-built-in"],
|
||||
"actions": ["Read", "Write", "Admin"],
|
||||
"resources": [
|
||||
"app-built-in"
|
||||
],
|
||||
"actions": [
|
||||
"Read",
|
||||
"Write",
|
||||
"Admin"
|
||||
],
|
||||
"effect": "Allow",
|
||||
"isEnabled": true,
|
||||
"submitter": "admin",
|
||||
@@ -640,7 +949,7 @@
|
||||
"permanentAvatar": "",
|
||||
"email": "admin@example.com",
|
||||
"emailVerified": false,
|
||||
"phone": "12345678910",
|
||||
"phone": "13245678910",
|
||||
"countryCode": "US",
|
||||
"region": "",
|
||||
"location": "",
|
||||
@@ -771,7 +1080,159 @@
|
||||
"managedAccounts": null,
|
||||
"mfaAccounts": null,
|
||||
"needUpdatePassword": false
|
||||
},
|
||||
{
|
||||
"owner": "lobechat",
|
||||
"name": "user",
|
||||
"createdTime": "2024-09-09T09:26:05Z",
|
||||
"updatedTime": "",
|
||||
"deletedTime": "",
|
||||
"id": "b5a7c5b5-3e79-47ff-85a8-537b07fee2f9",
|
||||
"externalId": "",
|
||||
"type": "normal-user",
|
||||
"password": "123",
|
||||
"passwordSalt": "",
|
||||
"passwordType": "plain",
|
||||
"displayName": "User",
|
||||
"firstName": "",
|
||||
"lastName": "",
|
||||
"avatar": "https://cdn.casbin.org/img/casbin.svg",
|
||||
"avatarType": "",
|
||||
"permanentAvatar": "",
|
||||
"email": "user@example.com",
|
||||
"emailVerified": false,
|
||||
"phone": "13245678910",
|
||||
"countryCode": "US",
|
||||
"region": "",
|
||||
"location": "",
|
||||
"address": [],
|
||||
"affiliation": "Example Inc.",
|
||||
"title": "",
|
||||
"idCardType": "",
|
||||
"idCard": "",
|
||||
"homepage": "",
|
||||
"bio": "",
|
||||
"tag": "staff",
|
||||
"language": "",
|
||||
"gender": "",
|
||||
"birthday": "",
|
||||
"education": "",
|
||||
"score": 2000,
|
||||
"karma": 0,
|
||||
"ranking": 1,
|
||||
"balance": 0,
|
||||
"currency": "",
|
||||
"isDefaultAvatar": false,
|
||||
"isOnline": false,
|
||||
"isAdmin": false,
|
||||
"isForbidden": false,
|
||||
"isDeleted": false,
|
||||
"signupApplication": "lobechat",
|
||||
"hash": "",
|
||||
"preHash": "",
|
||||
"accessKey": "",
|
||||
"accessSecret": "",
|
||||
"accessToken": "",
|
||||
"createdIp": "127.0.0.1",
|
||||
"lastSigninTime": "",
|
||||
"lastSigninIp": "",
|
||||
"github": "",
|
||||
"google": "",
|
||||
"qq": "",
|
||||
"wechat": "",
|
||||
"facebook": "",
|
||||
"dingtalk": "",
|
||||
"weibo": "",
|
||||
"gitee": "",
|
||||
"linkedin": "",
|
||||
"wecom": "",
|
||||
"lark": "",
|
||||
"gitlab": "",
|
||||
"adfs": "",
|
||||
"baidu": "",
|
||||
"alipay": "",
|
||||
"casdoor": "",
|
||||
"infoflow": "",
|
||||
"apple": "",
|
||||
"azuread": "",
|
||||
"azureadb2c": "",
|
||||
"slack": "",
|
||||
"steam": "",
|
||||
"bilibili": "",
|
||||
"okta": "",
|
||||
"douyin": "",
|
||||
"line": "",
|
||||
"amazon": "",
|
||||
"auth0": "",
|
||||
"battlenet": "",
|
||||
"bitbucket": "",
|
||||
"box": "",
|
||||
"cloudfoundry": "",
|
||||
"dailymotion": "",
|
||||
"deezer": "",
|
||||
"digitalocean": "",
|
||||
"discord": "",
|
||||
"dropbox": "",
|
||||
"eveonline": "",
|
||||
"fitbit": "",
|
||||
"gitea": "",
|
||||
"heroku": "",
|
||||
"influxcloud": "",
|
||||
"instagram": "",
|
||||
"intercom": "",
|
||||
"kakao": "",
|
||||
"lastfm": "",
|
||||
"mailru": "",
|
||||
"meetup": "",
|
||||
"microsoftonline": "",
|
||||
"naver": "",
|
||||
"nextcloud": "",
|
||||
"onedrive": "",
|
||||
"oura": "",
|
||||
"patreon": "",
|
||||
"paypal": "",
|
||||
"salesforce": "",
|
||||
"shopify": "",
|
||||
"soundcloud": "",
|
||||
"spotify": "",
|
||||
"strava": "",
|
||||
"stripe": "",
|
||||
"tiktok": "",
|
||||
"tumblr": "",
|
||||
"twitch": "",
|
||||
"twitter": "",
|
||||
"typetalk": "",
|
||||
"uber": "",
|
||||
"vk": "",
|
||||
"wepay": "",
|
||||
"xero": "",
|
||||
"yahoo": "",
|
||||
"yammer": "",
|
||||
"yandex": "",
|
||||
"zoom": "",
|
||||
"metamask": "",
|
||||
"web3onboard": "",
|
||||
"custom": "",
|
||||
"webauthnCredentials": null,
|
||||
"preferredMfaType": "",
|
||||
"recoveryCodes": null,
|
||||
"totpSecret": "",
|
||||
"mfaPhoneEnabled": false,
|
||||
"mfaEmailEnabled": false,
|
||||
"invitation": "",
|
||||
"invitationCode": "",
|
||||
"faceIds": null,
|
||||
"ldap": "",
|
||||
"properties": {},
|
||||
"roles": null,
|
||||
"permissions": null,
|
||||
"groups": null,
|
||||
"lastSigninWrongTime": "",
|
||||
"signinWrongTimes": 0,
|
||||
"managedAccounts": null,
|
||||
"mfaAccounts": null,
|
||||
"needUpdatePassword": false
|
||||
}
|
||||
],
|
||||
"webhooks": []
|
||||
}
|
||||
}
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -1,365 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ==================
|
||||
# == Env settings ==
|
||||
# ==================
|
||||
|
||||
# ======================
|
||||
# == Process the args ==
|
||||
# ======================
|
||||
|
||||
# 1. Default values of arguments
|
||||
# Arg: -f
|
||||
# Determine force download asserts, default is not
|
||||
FORCE_DOWNLOAD=false
|
||||
|
||||
# Arg: -l or --lang
|
||||
# Determine the language to show, default is en
|
||||
LANGUAGE="en_US"
|
||||
|
||||
# Arg: --url
|
||||
# Determine the source URL to download files
|
||||
SOURCE_URL="https://raw.githubusercontent.com/lobehub/lobe-chat/main"
|
||||
|
||||
# Arg: --host
|
||||
# Determine the server host
|
||||
HOST=""
|
||||
|
||||
# 2. Parse script arguments
|
||||
while getopts "fl:-:" opt; do
|
||||
case $opt in
|
||||
f)
|
||||
FORCE_DOWNLOAD=true
|
||||
;;
|
||||
l)
|
||||
LANGUAGE=$OPTARG
|
||||
;;
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
lang)
|
||||
LANGUAGE="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
url)
|
||||
SOURCE_URL="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
host)
|
||||
HOST="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [-f] [-l language|--lang language] [--url source] [--host serverhost]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [-f] [-l language|--lang language] [--url source]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# ===============
|
||||
# == Variables ==
|
||||
# ===============
|
||||
# File list
|
||||
SUB_DIR="docker-compose/local"
|
||||
FILES=(
|
||||
"$SUB_DIR/docker-compose.yml"
|
||||
"$SUB_DIR/.env.example"
|
||||
"$SUB_DIR/init_data.json"
|
||||
"$SUB_DIR/s3_data.tar.gz"
|
||||
)
|
||||
|
||||
# Supported languages and messages
|
||||
# Arg: -l --lang
|
||||
# If the language is not supported, default to English
|
||||
# Function to show messages
|
||||
show_message() {
|
||||
local key="$1"
|
||||
case $key in
|
||||
downloading)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "正在下载文件..."
|
||||
;;
|
||||
*)
|
||||
echo "Downloading files..."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
downloaded)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo " 已经存在,跳过下载。"
|
||||
;;
|
||||
*)
|
||||
echo " already exists, skipping download."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
extracted_success)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo " 解压成功到目录:"
|
||||
;;
|
||||
*)
|
||||
echo " extracted successfully to directory: "
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
extracted_failed)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo " 解压失败。"
|
||||
;;
|
||||
*)
|
||||
echo " extraction failed."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
file_not_exists)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo " 不存在。"
|
||||
;;
|
||||
*)
|
||||
echo " does not exist."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
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
|
||||
;;
|
||||
security_secrect_regenerate_report)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "安全密钥生成结果如下:"
|
||||
;;
|
||||
*)
|
||||
echo "Security secret generation results are as follows:"
|
||||
;;
|
||||
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 "
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_show_documentation_url)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "https://lobehub.com/zh/docs/self-hosting/environment-variables"
|
||||
;;
|
||||
*)
|
||||
echo "https://lobehub.com/docs/self-hosting/environment-variables"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_warning)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "警告:如果你正在生产环境中使用,请在日志中检查密钥是否已经生成!!!"
|
||||
;;
|
||||
*)
|
||||
echo "Warning: If you are using it in a production environment, please check if the keys have been generated in the logs!!!"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Function to download files
|
||||
download_file() {
|
||||
local file_url="$1"
|
||||
local local_file="$2"
|
||||
|
||||
if [ "$FORCE_DOWNLOAD" = false ] && [ -e "$local_file" ]; then
|
||||
echo "$local_file" $(show_message "downloaded")
|
||||
return 0
|
||||
fi
|
||||
|
||||
wget -q --show-progress "$file_url" -O "$local_file"
|
||||
}
|
||||
|
||||
extract_file() {
|
||||
local file_name=$1
|
||||
local target_dir=$2
|
||||
|
||||
if [ -e "$file_name" ]; then
|
||||
tar -zxvf "$file_name" -C "$target_dir" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "$file_name" $(show_message "extracted_success") "$target_dir"
|
||||
else
|
||||
echo "$file_name" $(show_message "extracted_failed")
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "$file_name" $(show_message "file_not_exists")
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Define colors
|
||||
declare -A colors
|
||||
colors=(
|
||||
[black]="\e[30m"
|
||||
[red]="\e[31m"
|
||||
[green]="\e[32m"
|
||||
[yellow]="\e[33m"
|
||||
[blue]="\e[34m"
|
||||
[magenta]="\e[35m"
|
||||
[cyan]="\e[36m"
|
||||
[white]="\e[37m"
|
||||
[reset]="\e[0m"
|
||||
)
|
||||
|
||||
print_centered() {
|
||||
local text="$1" # Get input texts
|
||||
local color="${2:-reset}" # Get color, default to reset
|
||||
local term_width=$(tput cols) # Get terminal width
|
||||
local text_length=${#text} # Get text length
|
||||
local padding=$(((term_width - text_length) / 2)) # Get padding
|
||||
# Check if the color is valid
|
||||
if [[ -z "${colors[$color]}" ]]; then
|
||||
echo "Invalid color specified. Available colors: ${!colors[@]}"
|
||||
return 1
|
||||
fi
|
||||
# Print the text with padding
|
||||
printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text"
|
||||
}
|
||||
|
||||
# Download files asynchronously
|
||||
download_file "$SOURCE_URL/${FILES[0]}" "docker-compose.yml"
|
||||
download_file "$SOURCE_URL/${FILES[1]}" ".env"
|
||||
download_file "$SOURCE_URL/${FILES[2]}" "init_data.json"
|
||||
download_file "$SOURCE_URL/${FILES[3]}" "s3_data.tar.gz"
|
||||
|
||||
# Extract .tar.gz file without output
|
||||
extract_file "s3_data.tar.gz" "."
|
||||
rm s3_data.tar.gz
|
||||
|
||||
# ==========================
|
||||
# === Regenerate Secrets ===
|
||||
# ==========================
|
||||
|
||||
generate_key() {
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: generate_key <length>"
|
||||
return 1
|
||||
fi
|
||||
echo $(openssl rand -hex $1 | tr -d '\n' | fold -w $1 | head -n 1)
|
||||
}
|
||||
|
||||
echo $(show_message "security_secrect_regenerate")
|
||||
|
||||
# Generate CASDOOR_SECRET
|
||||
CASDOOR_SECRET=$(generate_key 32)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_SECRET"
|
||||
else
|
||||
# Search and replace the value of CASDOOR_SECRET in .env
|
||||
sed -i "s#^AUTH_CASDOOR_SECRET=.*#AUTH_CASDOOR_SECRET=${CASDOOR_SECRET}#" .env
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`.env\`"
|
||||
fi
|
||||
# replace `clientSecrect` in init_data.json
|
||||
sed -i "s#dbf205949d704de81b0b5b3603174e23fbecc354#${CASDOOR_SECRET}#" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`init_data.json\`"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate Casdoor User
|
||||
CASDOOR_USER="admin"
|
||||
CASDOOR_PASSWORD=$(generate_key 6)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD"
|
||||
else
|
||||
# replace `password` in init_data.json
|
||||
sed -i "s/"123"/${CASDOOR_PASSWORD}/" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD in \`init_data.json\`"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate Minio S3 access key
|
||||
# Temporarily disable key gen for minio because
|
||||
# minio can not start with a access key in envs
|
||||
#S3_SECRET_ACCESS_KEY=$(generate_key 32)
|
||||
#if [ $? -ne 0 ]; then
|
||||
# echo $(show_message "security_secrect_regenerate_failed") "S3_SECRET_ACCESS_KEY"
|
||||
#else
|
||||
# # Search and replace the value of S3_SECRET_ACCESS_KEY in .env
|
||||
# sed -i "s#^S3_SECRET_ACCESS_KEY=.*#S3_SECRET_ACCESS_KEY=${S3_SECRET_ACCESS_KEY}#" .env
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo $(show_message "security_secrect_regenerate_failed") "S3_SECRET_ACCESS_KEY in \`.env\`"
|
||||
# fi
|
||||
#fi
|
||||
|
||||
# Modify the .env file if the host is specified
|
||||
if [ -n "$HOST" ]; then
|
||||
# Modify env
|
||||
sed -i "s/localhost/$HOST/g" .env
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "HOST in \`.env\`"
|
||||
fi
|
||||
# Modify casdoor init data
|
||||
sed -i "s/localhost/$HOST/g" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "HOST in \`init_data.json\`"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Display configuration reports
|
||||
|
||||
echo $(show_message "security_secrect_regenerate_report")
|
||||
|
||||
if [ -n "$HOST" ]; then
|
||||
echo -e "Server Host: $HOST"
|
||||
fi
|
||||
echo -e "Casdoor: \n - Username: admin\n - Password: ${CASDOOR_PASSWORD}\n - Client Secret: ${CASDOOR_SECRET}"
|
||||
|
||||
# ===========================
|
||||
# == Display final message ==
|
||||
# ===========================
|
||||
|
||||
printf "\n%s\n\n" "$(show_message "tips_run_command")"
|
||||
print_centered "docker compose up -d" "green"
|
||||
printf "\n%s" "$(show_message "tips_show_documentation")"
|
||||
printf "%s\n" $(show_message "tips_show_documentation_url")
|
||||
printf "\n\e[33m%s\e[0m\n" "$(show_message "tips_warning")"
|
||||
@@ -0,0 +1,753 @@
|
||||
#!/bin/bash
|
||||
|
||||
# ==================
|
||||
# == Env settings ==
|
||||
# ==================
|
||||
|
||||
# check operating system
|
||||
# ref: https://github.com/lobehub/lobe-chat/pull/5247
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS
|
||||
SED_COMMAND="sed -i ''"
|
||||
else
|
||||
# not macOS
|
||||
SED_COMMAND="sed -i"
|
||||
fi
|
||||
|
||||
# ======================
|
||||
# == Process the args ==
|
||||
# ======================
|
||||
|
||||
# 1. Default values of arguments
|
||||
|
||||
# Arg: -l or --lang
|
||||
# Determine the language to show, default is en
|
||||
|
||||
# Arg: --url
|
||||
# Determine the source URL to download files
|
||||
SOURCE_URL="https://raw.githubusercontent.com/lobehub/lobe-chat/main"
|
||||
|
||||
# Arg: --host
|
||||
# Determine the server host
|
||||
HOST=""
|
||||
|
||||
# 2. Parse script arguments
|
||||
while getopts "l:-:" opt; do
|
||||
case $opt in
|
||||
l)
|
||||
LANGUAGE=$OPTARG
|
||||
;;
|
||||
-)
|
||||
case "${OPTARG}" in
|
||||
lang)
|
||||
LANGUAGE="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
url)
|
||||
SOURCE_URL="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
host)
|
||||
HOST="${!OPTIND}"
|
||||
OPTIND=$(($OPTIND + 1))
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [-l language|--lang language] [--url source] [--host serverhost]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 [-l language|--lang language] [--url source]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#######################
|
||||
## Helper Functions ##
|
||||
#######################
|
||||
|
||||
# Supported languages and messages
|
||||
# Arg: -l --lang
|
||||
# If the language is not supported, default to English
|
||||
# Function to show messages
|
||||
show_message() {
|
||||
local key="$1"
|
||||
case $key in
|
||||
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 "
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_show_documentation_url)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "https://lobehub.com/zh/docs/self-hosting/environment-variables"
|
||||
;;
|
||||
*)
|
||||
echo "https://lobehub.com/docs/self-hosting/environment-variables"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_no_executable)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "没有找到,请先安装。"
|
||||
;;
|
||||
*)
|
||||
echo "not found, please install it first."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_allow_ports)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "请确保服务器以下端口未被占用且能被访问:3210, 9000, 9001, 8000"
|
||||
;;
|
||||
*)
|
||||
echo "Please make sure the following ports on the server are not occupied and can be accessed: 3210, 9000, 9001, 8000"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_auto_detected)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "已自动识别"
|
||||
;;
|
||||
*)
|
||||
echo "Auto-detected"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_private_ip_detected)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "注意,当前识别到内网 IP,如果需要外部访问,请替换为公网 IP 地址"
|
||||
;;
|
||||
*)
|
||||
echo "Note that the current internal IP is detected. If you need external access, please replace it with the public IP address."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_add_reverse_proxy)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "请在你的反向代理中完成域名到端口的映射:"
|
||||
;;
|
||||
*)
|
||||
echo "Please complete the mapping of domain to port in your reverse proxy:"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_no_docker_permission)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "WARN: 看起来当前用户没有 Docker 权限。"
|
||||
echo "使用 'sudo usermod -aG docker $USER' 为用户分配 Docker 权限(可能需要重新启动 shell)。"
|
||||
;;
|
||||
*)
|
||||
echo "WARN: It look like the current user does not have Docker permissions."
|
||||
echo "Use 'sudo usermod -aG docker $USER' to assign Docker permissions to the user (may require restarting shell)."
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tips_init_database_failed)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "无法初始化数据库,为了避免你的数据重复初始化,请在首次成功启动时运行以下指令清空 Casdoor 初始配置文件:"
|
||||
echo "echo '{}' > init_data.json"
|
||||
;;
|
||||
*)
|
||||
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 "echo '{}' > init_data.json"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_regenerate_secrets)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "是否要重新生成安全密钥?"
|
||||
;;
|
||||
*)
|
||||
echo "Do you want to regenerate security secrets?"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_deploy_mode)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "请选择部署模式:"
|
||||
echo "(0) 域名模式(访问时无需指明端口),需要使用反向代理服务 LobeChat, MinIO, Casdoor ,并分别分配一个域名;"
|
||||
echo "(1) 端口模式(访问时需要指明端口,如使用IP访问,或域名+端口访问),需要放开指定端口;"
|
||||
echo "(2) 本地模式(仅供本地测试使用)"
|
||||
echo "如果你对这些内容疑惑,可以先选择使用本地模式进行部署,稍后根据文档指引再进行修改。"
|
||||
echo "https://lobehub.com/docs/self-hosting/server-database/docker-compose"
|
||||
;;
|
||||
*)
|
||||
echo "Please select the deployment mode:"
|
||||
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."
|
||||
echo "https://lobehub.com/docs/self-hosting/server-database/docker-compose"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_host)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo " 部署IP/域名"
|
||||
;;
|
||||
*)
|
||||
echo " Deploy IP/Domain"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_domain)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "服务的域名(例如 $2 ,不要包含协议前缀):"
|
||||
;;
|
||||
*)
|
||||
echo "The domain of the service (e.g. $2, do not include the protocol prefix):"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_protocol)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "域名是否使用 https 协议? (所有服务需要使用同一协议)"
|
||||
;;
|
||||
*)
|
||||
echo "Does the domain use the https protocol? (All services need to use the same protocol)"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ask_init_database)
|
||||
case $LANGUAGE in
|
||||
zh_CN)
|
||||
echo "是否初始化数据库?"
|
||||
;;
|
||||
*)
|
||||
echo "Do you want to initialize the database?"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Function to download files
|
||||
download_file() {
|
||||
wget --show-progress "$1" -O "$2"
|
||||
# If run failed, exit
|
||||
if [ $? -ne 0 ]; then
|
||||
show_message "tips_download_failed" "$2"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
print_centered() {
|
||||
# Define colors
|
||||
declare -A colors
|
||||
colors=(
|
||||
[black]="\e[30m"
|
||||
[red]="\e[31m"
|
||||
[green]="\e[32m"
|
||||
[yellow]="\e[33m"
|
||||
[blue]="\e[34m"
|
||||
[magenta]="\e[35m"
|
||||
[cyan]="\e[36m"
|
||||
[white]="\e[37m"
|
||||
[reset]="\e[0m"
|
||||
)
|
||||
local text="$1" # Get input texts
|
||||
local color="${2:-reset}" # Get color, default to reset
|
||||
local term_width=$(tput cols) # Get terminal width
|
||||
local text_length=${#text} # Get text length
|
||||
local padding=$(((term_width - text_length) / 2)) # Get padding
|
||||
# Check if the color is valid
|
||||
if [[ -z "${colors[$color]}" ]]; then
|
||||
echo "Invalid color specified. Available colors: ${!colors[@]}"
|
||||
return 1
|
||||
fi
|
||||
# Print the text with padding
|
||||
printf "%*s${colors[$color]}%s${colors[reset]}\n" $padding "" "$text"
|
||||
}
|
||||
|
||||
# Usage:
|
||||
# ```sh
|
||||
# ask "prompt" "default" "description"
|
||||
# echo $ask_result
|
||||
# ```
|
||||
# "prompt" ["description" "default"]:
|
||||
ask() {
|
||||
local prompt="$1"
|
||||
local default="$2"
|
||||
local description="$3"
|
||||
# Add a space after the description if it is not empty
|
||||
if [ -n "$description" ]; then
|
||||
description="$description "
|
||||
fi
|
||||
local result
|
||||
|
||||
if [ -n "$default" ]; then
|
||||
read -p "$prompt [${description}${default}]: " result
|
||||
result=${result:-$default}
|
||||
else
|
||||
read -p "$prompt: " result
|
||||
fi
|
||||
# trim and assign to global variable
|
||||
ask_result=$(echo "$result" | xargs)
|
||||
}
|
||||
|
||||
####################
|
||||
## Main Process ##
|
||||
####################
|
||||
|
||||
# ===============
|
||||
# == Variables ==
|
||||
# ===============
|
||||
# File list
|
||||
SUB_DIR="docker-compose/local"
|
||||
FILES=(
|
||||
"$SUB_DIR/docker-compose.yml"
|
||||
"$SUB_DIR/init_data.json"
|
||||
"$SUB_DIR/searxng-settings.yml"
|
||||
)
|
||||
ENV_EXAMPLES=(
|
||||
"$SUB_DIR/.env.zh-CN.example"
|
||||
"$SUB_DIR/.env.example"
|
||||
)
|
||||
# Default values
|
||||
CASDOOR_PASSWORD="123"
|
||||
CASDOOR_SECRET="CASDOOR_SECRET"
|
||||
MINIO_ROOT_PASSWORD="YOUR_MINIO_PASSWORD"
|
||||
CASDOOR_HOST="localhost:8000"
|
||||
MINIO_HOST="localhost:9000"
|
||||
PROTOCOL="http"
|
||||
|
||||
# If no language is specified, ask the user to choose
|
||||
if [ -z "$LANGUAGE" ]; then
|
||||
show_message "choose_language"
|
||||
ask "(0,1)" "0"
|
||||
case $ask_result in
|
||||
0)
|
||||
LANGUAGE="en_US"
|
||||
;;
|
||||
1)
|
||||
LANGUAGE="zh_CN"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid language: $ask_result"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
section_download_files(){
|
||||
# Download files asynchronously
|
||||
if ! command -v wget &> /dev/null ; then
|
||||
echo "wget" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
download_file "$SOURCE_URL/${FILES[0]}" "docker-compose.yml"
|
||||
download_file "$SOURCE_URL/${FILES[1]}" "init_data.json"
|
||||
download_file "$SOURCE_URL/${FILES[2]}" "searxng-settings.yml"
|
||||
|
||||
# Download .env.example with the specified language
|
||||
if [ "$LANGUAGE" = "zh_CN" ]; then
|
||||
download_file "$SOURCE_URL/${ENV_EXAMPLES[0]}" ".env"
|
||||
else
|
||||
download_file "$SOURCE_URL/${ENV_EXAMPLES[1]}" ".env"
|
||||
fi
|
||||
}
|
||||
# If the folder `data` or `s3_data` exists, warn the user
|
||||
if [ -d "data" ] || [ -d "s3_data" ]; then
|
||||
show_message "tips_already_installed"
|
||||
exit 0
|
||||
else
|
||||
section_download_files
|
||||
fi
|
||||
|
||||
section_configurate_host() {
|
||||
DEPLOY_MODE=$ask_result
|
||||
show_message "host_regenerate"
|
||||
# If run in local mode, skip this step
|
||||
if [[ "$DEPLOY_MODE" == "2" ]]; then
|
||||
HOST="localhost:3210"
|
||||
LOBE_HOST="$HOST"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Configurate protocol for domain
|
||||
if [[ "$DEPLOY_MODE" == "0" ]]; then
|
||||
# Ask if enable https
|
||||
echo $(show_message "ask_protocol")
|
||||
ask "(y/n)" "y"
|
||||
if [[ "$ask_result" == "y" ]]; then
|
||||
PROTOCOL="https"
|
||||
# Replace all http with https
|
||||
$SED_COMMAND "s#http://#https://#" .env
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check if sed is installed
|
||||
if ! command -v $SED_COMMAND &> /dev/null ; then
|
||||
echo "sed" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# If user not specify host, try to get the server ip
|
||||
if [ -z "$HOST" ]; then
|
||||
HOST=$(hostname -I | awk '{print $1}')
|
||||
# If the host is a private ip and the deploy mode is port mode
|
||||
if [[ "$DEPLOY_MODE" == "1" ]] && ([[ "$HOST" == "192.168."* ]] || [[ "$HOST" == "172."* ]] || [[ "$HOST" == "10."* ]]); then
|
||||
echo $(show_message "tips_private_ip_detected")
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
case $DEPLOY_MODE in
|
||||
0)
|
||||
DEPLOY_MODE="domain"
|
||||
echo "LobeChat" $(show_message "ask_domain" "example.com")
|
||||
ask "(example.com)"
|
||||
LOBE_HOST="$ask_result"
|
||||
# If user use domain mode, ask for the domain of Minio and Casdoor
|
||||
echo "Minio S3 API" $(show_message "ask_domain" "minio.example.com")
|
||||
ask "(minio.example.com)"
|
||||
MINIO_HOST="$ask_result"
|
||||
echo "Casdoor API" $(show_message "ask_domain" "auth.example.com")
|
||||
ask "(auth.example.com)"
|
||||
CASDOOR_HOST="$ask_result"
|
||||
# Setup callback url for Casdoor
|
||||
$SED_COMMAND "s/"example.com"/${LOBE_HOST}/" init_data.json
|
||||
;;
|
||||
1)
|
||||
DEPLOY_MODE="ip"
|
||||
ask $(printf "%s%s" "LobeChat" $(show_message "ask_host")) "$HOST" $(printf "%s" $(show_message "tips_auto_detected"))
|
||||
LOBE_HOST="$ask_result"
|
||||
# If user use ip mode, use ask_result as the host
|
||||
HOST="$ask_result"
|
||||
# If user use ip mode, append the port to the host
|
||||
LOBE_HOST="${HOST}:3210"
|
||||
MINIO_HOST="${HOST}:9000"
|
||||
CASDOOR_HOST="${HOST}:8000"
|
||||
# Setup callback url for Casdoor
|
||||
$SED_COMMAND "s/"localhost:3210"/${LOBE_HOST}/" init_data.json
|
||||
;;
|
||||
*)
|
||||
echo "Invalid deploy mode: $ask_result"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# lobe host
|
||||
$SED_COMMAND "s#^APP_URL=.*#APP_URL=$PROTOCOL://$LOBE_HOST#" .env
|
||||
# auth related
|
||||
$SED_COMMAND "s#^AUTH_URL=.*#AUTH_URL=$PROTOCOL://$LOBE_HOST/api/auth#" .env
|
||||
$SED_COMMAND "s#^AUTH_CASDOOR_ISSUER=.*#AUTH_CASDOOR_ISSUER=$PROTOCOL://$CASDOOR_HOST#" .env
|
||||
$SED_COMMAND "s#^origin=.*#origin=$PROTOCOL://$CASDOOR_HOST#" .env
|
||||
# s3 related
|
||||
$SED_COMMAND "s#^S3_PUBLIC_DOMAIN=.*#S3_PUBLIC_DOMAIN=$PROTOCOL://$MINIO_HOST#" .env
|
||||
$SED_COMMAND "s#^S3_ENDPOINT=.*#S3_ENDPOINT=$PROTOCOL://$MINIO_HOST#" .env
|
||||
|
||||
|
||||
# Check if env modified success
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "host_regenerate_failed") "$HOST in \`.env\`"
|
||||
fi
|
||||
}
|
||||
show_message "ask_deploy_mode"
|
||||
ask "(0,1,2)" "2"
|
||||
if [[ "$ask_result" == "0" ]] || [[ "$ask_result" == "1" ]] || [[ "$ask_result" == "2" ]]; then
|
||||
section_configurate_host
|
||||
else
|
||||
echo "Invalid deploy mode: $ask_result, please select 0, 1 or 2."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ==========================
|
||||
# === Regenerate Secrets ===
|
||||
# ==========================
|
||||
section_regenerate_secrets() {
|
||||
# Check if openssl is installed
|
||||
if ! command -v openssl &> /dev/null ; then
|
||||
echo "openssl" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v tr &> /dev/null ; then
|
||||
echo "tr" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v fold &> /dev/null ; then
|
||||
echo "fold" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
if ! command -v head &> /dev/null ; then
|
||||
echo "head" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
|
||||
generate_key() {
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Usage: generate_key <length>"
|
||||
return 1
|
||||
fi
|
||||
echo $(openssl rand -hex $1 | tr -d '\n' | fold -w $1 | head -n 1)
|
||||
}
|
||||
|
||||
if ! command -v sed &> /dev/null ; then
|
||||
echo "sed" $(show_message "tips_no_executable")
|
||||
exit 1
|
||||
fi
|
||||
echo $(show_message "security_secrect_regenerate")
|
||||
|
||||
# Generate CASDOOR_SECRET
|
||||
CASDOOR_SECRET=$(generate_key 32)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_SECRET"
|
||||
else
|
||||
# Search and replace the value of CASDOOR_SECRET in .env
|
||||
$SED_COMMAND "s#^AUTH_CASDOOR_SECRET=.*#AUTH_CASDOOR_SECRET=${CASDOOR_SECRET}#" .env
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`.env\`"
|
||||
fi
|
||||
# replace `clientSecrect` in init_data.json
|
||||
$SED_COMMAND "s#dbf205949d704de81b0b5b3603174e23fbecc354#${CASDOOR_SECRET}#" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "AUTH_CASDOOR_SECRET in \`init_data.json\`"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Generate Casdoor User
|
||||
CASDOOR_USER="admin"
|
||||
CASDOOR_PASSWORD=$(generate_key 10)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD"
|
||||
CASDOOR_PASSWORD="123"
|
||||
else
|
||||
# replace `password` in init_data.json
|
||||
$SED_COMMAND "s/"123"/${CASDOOR_PASSWORD}/" init_data.json
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "CASDOOR_PASSWORD in \`init_data.json\`"
|
||||
fi
|
||||
fi
|
||||
# Generate Minio S3 User Password
|
||||
MINIO_ROOT_PASSWORD=$(generate_key 8)
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "MINIO_ROOT_PASSWORD"
|
||||
MINIO_ROOT_PASSWORD="YOUR_MINIO_PASSWORD"
|
||||
else
|
||||
# Search and replace the value of S3_SECRET_ACCESS_KEY in .env
|
||||
$SED_COMMAND "s#^MINIO_ROOT_PASSWORD=.*#MINIO_ROOT_PASSWORD=${MINIO_ROOT_PASSWORD}#" .env
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "security_secrect_regenerate_failed") "MINIO_ROOT_PASSWORD in \`.env\`"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
show_message "ask_regenerate_secrets"
|
||||
ask "(y/n)" "y"
|
||||
if [[ "$ask_result" == "y" ]]; then
|
||||
section_regenerate_secrets
|
||||
fi
|
||||
|
||||
section_init_database() {
|
||||
if ! command -v docker &> /dev/null ; then
|
||||
echo "docker" $(show_message "tips_no_executable")
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! docker compose &> /dev/null ; then
|
||||
echo "docker compose" $(show_message "tips_no_executable")
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Check if user has permissions to run Docker by trying to get the status of Docker (docker status).
|
||||
# If this fails, the user probably does not have permissions for Docker.
|
||||
# ref: https://github.com/paperless-ngx/paperless-ngx/blob/89e5c08a1fe4ca0b7641ae8fbd5554502199ae40/install-paperless-ngx.sh#L64-L72
|
||||
if ! docker stats --no-stream &> /dev/null ; then
|
||||
echo $(show_message "tips_no_docker_permission")
|
||||
return 1
|
||||
fi
|
||||
|
||||
docker compose pull
|
||||
docker compose up --detach postgresql casdoor
|
||||
# hopefully enough time for even the slower systems
|
||||
sleep 15
|
||||
docker compose stop
|
||||
|
||||
# Init finished, remove init mount
|
||||
echo '{}' > init_data.json
|
||||
}
|
||||
|
||||
show_message "ask_init_database"
|
||||
ask "(y/n)" "y"
|
||||
if [[ "$ask_result" == "y" ]]; then
|
||||
# If return 1 means failed
|
||||
section_init_database
|
||||
if [ $? -ne 0 ]; then
|
||||
echo $(show_message "tips_init_database_failed")
|
||||
fi
|
||||
else
|
||||
show_message "tips_init_database_failed"
|
||||
fi
|
||||
|
||||
section_display_configurated_report() {
|
||||
# Display configuration reports
|
||||
echo $(show_message "security_secrect_regenerate_report")
|
||||
|
||||
echo -e "LobeChat: \n - URL: $PROTOCOL://$LOBE_HOST \n - Username: user \n - Password: ${CASDOOR_PASSWORD} "
|
||||
echo -e "Casdoor: \n - URL: $PROTOCOL://$CASDOOR_HOST \n - Username: admin \n - Password: ${CASDOOR_PASSWORD}\n"
|
||||
echo -e "Minio: \n - URL: $PROTOCOL://$MINIO_HOST \n - Username: admin\n - Password: ${MINIO_ROOT_PASSWORD}\n"
|
||||
|
||||
# if user run in domain mode, diplay reverse proxy configuration
|
||||
if [[ "$DEPLOY_MODE" == "domain" ]]; then
|
||||
echo $(show_message "tips_add_reverse_proxy")
|
||||
printf "\n%s\t->\t%s\n" "$LOBE_HOST" "127.0.0.1:3210"
|
||||
printf "%s\t->\t%s\n" "$CASDOOR_HOST" "127.0.0.1:8000"
|
||||
printf "%s\t->\t%s\n" "$MINIO_HOST" "127.0.0.1:9000"
|
||||
fi
|
||||
|
||||
# Display final message
|
||||
|
||||
printf "\n%s\n\n" "$(show_message "tips_run_command")"
|
||||
print_centered "docker compose up -d" "green"
|
||||
printf "\n%s\n" "$(show_message "tips_allow_ports")"
|
||||
printf "\n%s" "$(show_message "tips_show_documentation")"
|
||||
printf "%s\n" $(show_message "tips_show_documentation_url")
|
||||
}
|
||||
section_display_configurated_report
|
||||
@@ -4,6 +4,11 @@ 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
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
---
|
||||
title: LobeChat 插件生态系统 - 功能扩展与开发资源
|
||||
description: 了解 LobeChat 插件生态系统如何增强 LobeChat 助手的实用性和灵活性,以及提供的开发资源和插件开发指南。
|
||||
tags:
|
||||
- LobeChat
|
||||
- 插件系统
|
||||
- 实时信息
|
||||
- 第三方服务
|
||||
---
|
||||
|
||||
# 支持插件系统
|
||||
|
||||
@@ -7,6 +7,12 @@ description: >-
|
||||
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
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
title: LobeChat 支持多模态交互:视觉识别助力智能对话
|
||||
description: LobeChat 支持多种具有视觉识别能力的大语言模型,用户可上传或拖拽图片,助手将识别内容并展开智能对话,打造更智能、多元化的聊天场景。
|
||||
tags:
|
||||
- 视觉识别
|
||||
- 多模态交互
|
||||
- LobeChat
|
||||
- GPT-4
|
||||
- Google Gemini Pro
|
||||
---
|
||||
|
||||
# 支持模型视觉识别
|
||||
|
||||
@@ -4,6 +4,12 @@ description: >-
|
||||
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
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
---
|
||||
title: LobeChat 文生图:文本转图片生成技术
|
||||
description: LobeChat 支持文字转语音(TTS)和语音转文字(STT)技术,提供高品质声音选项,个性化交流体验。了解更多关于 Lobe TTS 工具包。
|
||||
tags:
|
||||
- TTS
|
||||
- STT
|
||||
- 语音会话
|
||||
- LobeChat
|
||||
- 文字转语音
|
||||
- 语音转文字
|
||||
---
|
||||
|
||||
# 支持 TTS & STT 语音会话
|
||||
|
||||
@@ -6,6 +6,12 @@ description: >-
|
||||
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
|
||||
|
||||
@@ -3,6 +3,10 @@ title: LobeChat 文生图:文本转图片生成技术
|
||||
description: >-
|
||||
LobeChat 现在支持最新的文本到图片生成技术,让用户可以在与助手对话中直接调用文生图工具进行创作。利用 DALL-E 3、MidJourney 和
|
||||
Pollinations 等 AI 工具,助手们可以将你的想法转化为图像,让创作过程更私密和沉浸式。
|
||||
tags:
|
||||
- Text to Image
|
||||
- 文生图
|
||||
- AI 创作
|
||||
---
|
||||
|
||||
# 支持 Text to Image 文生图
|
||||
|
||||
@@ -3,6 +3,12 @@ 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
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
title: LobeChat 支持 Clerk 与 Next-Auth 多用户管理支持
|
||||
description: LobeChat 提供 Clerk 和 Next-Auth 等多种用户认证和管理方案,以满足不同用户的需求。
|
||||
tags:
|
||||
- 用户管理
|
||||
- 身份验证
|
||||
- next-auth
|
||||
- Clerk
|
||||
- 多因素认证
|
||||
---
|
||||
|
||||
# 支持 Clerk 与 Next-Auth 多用户管理支持
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
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 🦙
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
---
|
||||
title: LobeChat 支持 Ollama 调用本地大语言模型(LLM)
|
||||
description: LobeChat vLobeChat v0.127.0 支持 Ollama 调用本地大语言模型。
|
||||
tags:
|
||||
- Ollama AI
|
||||
- LobeChat
|
||||
- 大语言模型
|
||||
- AI 对话
|
||||
---
|
||||
|
||||
# 支持 Ollama 调用本地大语言模型 🦙
|
||||
|
||||
@@ -4,6 +4,12 @@ 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
|
||||
|
||||
@@ -3,6 +3,11 @@ title: LobeChat 1.0:新的架构与新的可能
|
||||
description: >-
|
||||
LobeChat 1.0 带来了服务端数据库、用户鉴权管理的全新架构与特性,开启了新的可能 。在此基础上, LobeChat Cloud 开启 Beta
|
||||
版测试。
|
||||
tags:
|
||||
- LobeChat
|
||||
- 服务端数据库
|
||||
- 用户鉴权
|
||||
- Beta 测试
|
||||
---
|
||||
|
||||
# LobeChat 1.0:新的架构与新的可能
|
||||
|
||||
@@ -4,6 +4,11 @@ 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 🚀
|
||||
|
||||
@@ -3,6 +3,10 @@ title: LobeChat 全面进入 GPT-4 时代:GPT-4o mini 正式上线
|
||||
description: >-
|
||||
LobeChat v1.6 重磅发布 GPT-4o mini 支持,同时 LobeChat Cloud 服务全面升级默认模型,为用户带来更强大的 AI
|
||||
对话体验。
|
||||
tags:
|
||||
- LobeChat
|
||||
- GPT-4o mini
|
||||
- AI 对话服务
|
||||
---
|
||||
|
||||
# GPT-4o mini 震撼登场,开启全新 GPT-4 时代 🚀
|
||||
|
||||
@@ -4,6 +4,12 @@ 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
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
---
|
||||
title: LobeChat Database Docker 镜像正式发布
|
||||
description: LobeChat v1.8.0 推出官方数据库 Docker 镜像,支持云端数据同步与用户管理,并提供完整的自部署文档指南。
|
||||
tags:
|
||||
- LobeChat
|
||||
- Docker 镜像
|
||||
- 云端部署
|
||||
- 数据库
|
||||
---
|
||||
|
||||
# LobeChat Database Docker 镜像:云端部署的最后一块拼图
|
||||
|
||||
@@ -6,6 +6,12 @@ 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
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
---
|
||||
title: LobeChat 重磅发布知识库功能:打造智能文件管理与对话新体验
|
||||
description: LobeChat 推出全新知识库功能,支持全类型文件管理、智能向量化和文件对话,让知识管理和信息检索更轻松、更智能。
|
||||
tags:
|
||||
- LobeChat
|
||||
- 知识库
|
||||
- 文件管理
|
||||
- 智能处理
|
||||
---
|
||||
|
||||
# 知识库功能重磅发布:智能文件管理与对话的革新
|
||||
|
||||
@@ -3,6 +3,12 @@ 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
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
---
|
||||
title: LobeChat 完美适配 OpenAI O1 系列模型
|
||||
description: LobeChat v1.17.0 现已支持 OpenAI 最新发布的 o1-preview 和 o1-mini 模型,为用户带来更强大的代码和数学能力。
|
||||
tags:
|
||||
- OpenAI O1
|
||||
- LobeChat
|
||||
- AI 模型
|
||||
- 代码编写
|
||||
- 数学问题
|
||||
---
|
||||
|
||||
# OpenAI O1 系列模型现已登陆 LobeChat
|
||||
|
||||
@@ -4,6 +4,12 @@ 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
|
||||
|
||||
@@ -3,6 +3,12 @@ title: 重磅更新:LobeChat 迎来 Artifacts 时代
|
||||
description: >-
|
||||
LobeChat v1.19 带来了重大更新,包括 Claude Artifacts 完整特性支持、全新的发现页面设计,以及 GitHub Models
|
||||
服务商支持,让 AI 助手的能力得到显著提升。
|
||||
tags:
|
||||
- LobeChat
|
||||
- Artifacts
|
||||
- AI 助手
|
||||
- 更新
|
||||
- GitHub Models
|
||||
---
|
||||
|
||||
# 重磅更新:LobeChat 迎来 Artifacts 时代
|
||||
|
||||
@@ -4,6 +4,11 @@ description: >-
|
||||
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
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
title: LobeChat 新增助手常驻侧边栏功能
|
||||
description: LobeChat v1.26.0 推出助手常驻侧边栏功能,支持快捷键切换,让高频使用的助手触手可及,大幅提升使用效率。
|
||||
tags:
|
||||
- 助手常驻侧边栏
|
||||
- 对话体验
|
||||
- 工作效率
|
||||
---
|
||||
|
||||
# 助手常驻侧边栏:打造更便捷的对话体验
|
||||
|
||||
@@ -5,6 +5,10 @@ description: >-
|
||||
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
|
||||
|
||||
@@ -3,6 +3,10 @@ title: LobeChat 支持分享对话为文本格式(Markdown/JSON)
|
||||
description: >-
|
||||
LobeChat v1.28.0 新增 Markdown 和 OpenAI 格式 JSON
|
||||
导出支持,让对话内容能轻松转化为笔记素材、开发调试数据和训练语料,显著提升对话内容的复用价值。
|
||||
tags:
|
||||
- 对话内容
|
||||
- Markdown导出
|
||||
- OpenAI JSON
|
||||
---
|
||||
|
||||
# 对话内容分享升级:支持文本格式导出
|
||||
|
||||
@@ -3,6 +3,13 @@ title: New Model Providers Added to LobeChat in November
|
||||
description: >-
|
||||
LobeChat model providers now support Gitee AI, InternLM (ShuSheng PuYu), xAI,
|
||||
and Cloudflare WorkersAI
|
||||
tags:
|
||||
- LobeChat
|
||||
- AI Model Providers
|
||||
- Gitee AI
|
||||
- InternLM
|
||||
- xAI
|
||||
- Cloudflare Workers AI
|
||||
---
|
||||
|
||||
# New Model Providers Added to LobeChat in November 🎉
|
||||
@@ -16,4 +23,4 @@ We're excited to announce that LobeChat has expanded its AI model support with t
|
||||
|
||||
## Need More Model Providers?
|
||||
|
||||
Feel free to submit your requests at [More Model Provider Support](https://github.com/lobehub/lobe-chat/discussions/1284).
|
||||
Feel free to submit your requests at [More Model Provider Support](https://github.com/lobehub/lobe-chat/discussions/6157).
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
---
|
||||
title: LobeChat 11 月新增模型服务
|
||||
description: 'LobeChat 模型服务新增支持 Gitee AI, InternLM (书生浦语), xAI, Cloudflare WorkersAI'
|
||||
tags:
|
||||
- LobeChat
|
||||
- AI模型服务
|
||||
- Gitee AI
|
||||
- InternLM
|
||||
- xAI
|
||||
- Cloudflare Workers AI
|
||||
---
|
||||
|
||||
# LobeChat 11 月新增模型服务支持 🎉
|
||||
@@ -14,4 +21,4 @@ description: 'LobeChat 模型服务新增支持 Gitee AI, InternLM (书生浦语
|
||||
|
||||
## 需要更多模型服务?
|
||||
|
||||
欢迎在 [更多模型服务商支持](https://github.com/lobehub/lobe-chat/discussions/1284) 提交您的需求。
|
||||
欢迎在 [更多模型服务商支持](https://github.com/lobehub/lobe-chat/discussions/6157) 提交您的需求。
|
||||
|
||||
@@ -3,6 +3,10 @@ title: LobeChat Supports Branching Conversations
|
||||
description: >-
|
||||
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 🎉
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
---
|
||||
title: LobeChat 支持分支对话
|
||||
description: LobeChat 现已支持从任意消息创建新的对话分支,让您的思维不再受限
|
||||
tags:
|
||||
- LobeChat
|
||||
- 分支对话
|
||||
- 对话功能
|
||||
- 用户体验
|
||||
---
|
||||
|
||||
# 重磅推出分支对话功能 🎉
|
||||
|
||||
@@ -3,6 +3,11 @@ 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 💯
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
---
|
||||
title: LobeChat 支持用户数据统计与活跃度分享
|
||||
description: LobeChat 现已支持多维度用户数据统计与活跃度分享
|
||||
tags:
|
||||
- 用户数据统计
|
||||
- 活跃度分享
|
||||
- LobeChat
|
||||
---
|
||||
|
||||
# 用户数据统计与活跃度分享 💯
|
||||
@@ -23,4 +27,3 @@ description: LobeChat 现已支持多维度用户数据统计与活跃度分享
|
||||
|
||||
1. 需要使用 `PgLite` 或 `数据库` 模式
|
||||
2. 点击个人头像进入「账户管理」-「数据统计」页面
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
---
|
||||
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.
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
title: LobeChat 推出全新 AI Provider 管理系统
|
||||
description: LobeChat 焕新全新 AI Provider 管理系统,已支持自定义 AI 服务商与自定义模型
|
||||
tags:
|
||||
- LobeChat
|
||||
- AI Provider
|
||||
- 服务商管理
|
||||
- 多模态
|
||||
---
|
||||
|
||||
# 全新 AI Provider 管理系统 🎉
|
||||
|
||||
我们很高兴地宣布,LobeChat 推出了全新的 AI Provider 管理系统,已经在开源版与 Cloud 版([lobechat.com](https://lobechat.com))中可用:
|
||||
|
||||
## 🚀 主要更新
|
||||
|
||||
- 🔮 **自定义 AI 服务商**: 现在,您可以根据需要添加、删除或编辑 AI 服务商。
|
||||
- ⚡️ **自定义模型与能力配置**: 轻松添加您自己的模型,满足个性化需求。
|
||||
- 🌈 **多模态支持**: 新的 AI Provider 管理系统全面支持多种模态,包括语言、图像、语音等,视频和音乐生成功能,敬请期待!
|
||||
|
||||
## 📢 反馈与支持
|
||||
|
||||
如果您对新的 AI Provider 管理系统有任何建议或想法,欢迎在 GitHub Discussions 中与我们交流。
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: >-
|
||||
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!
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
title: LobeChat 重磅集成 DeepSeek R1,带来革命性思维链体验
|
||||
description: LobeChat v1.49.12 已完整支持 DeepSeek R1 模型,为用户带来前所未有的思维链交互体验
|
||||
tags:
|
||||
- DeepSeek R1
|
||||
- CoT
|
||||
- 思维链
|
||||
---
|
||||
|
||||
# 完美集成 DeepSeek R1 ,开启思维链新体验
|
||||
|
||||
经过近 10 天的精心打磨,LobeChat 已在 v1.49.12 版本中完整集成了 DeepSeek R1 模型,为用户带来革命性的思维链交互体验!
|
||||
|
||||
## 🚀 重大更新
|
||||
|
||||
- 🤯 **DeepSeek R1 全面支持**: 现已在社区版与 Cloud 版([lobechat.com](https://lobechat.com))中完整接入
|
||||
- 🧠 **实时思维链展示**: 透明呈现 AI 的推理过程,让复杂问题的解决过程清晰可见
|
||||
- ⚡️ **深度思考体验**: 通过 Chain of Thought 技术,带来更具洞察力的 AI 对话
|
||||
- 💫 **直观的问题解析**: 让复杂问题的分析过程变得清晰易懂
|
||||
|
||||
## 🌟 使用方式
|
||||
|
||||
1. 升级到 LobeChat v1.49.12 或访问 [lobechat.com](https://lobechat.com)
|
||||
2. 在设置中选择 DeepSeek R1 模型
|
||||
3. 开启全新的智能对话体验!
|
||||
|
||||
## 📢 反馈与支持
|
||||
|
||||
如果您在使用过程中遇到任何问题,或对新功能有任何建议,欢迎通过 GitHub Discussions 与我们交流。让我们一起打造更好的 LobeChat!
|
||||
+29
-17
@@ -2,107 +2,119 @@
|
||||
"$schema": "https://github.com/lobehub/lobe-chat/blob/main/docs/changelog/schema.json",
|
||||
"cloud": [],
|
||||
"community": [
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/5fe4c373-ebd0-42a9-bdca-0ab7e0a2e747",
|
||||
"id": "2025-02-02-deepseek-r1",
|
||||
"date": "2025-02-02",
|
||||
"versionRange": ["1.47.8", "1.49.12"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/7350f211-61ce-488e-b0e2-f0fcac25caeb",
|
||||
"id": "2025-01-22-new-ai-provider",
|
||||
"date": "2025-01-22",
|
||||
"versionRange": ["1.43.1", "1.47.7"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/3d80e0f5-d32a-4412-85b2-e709731460a0",
|
||||
"id": "2025-01-03-user-profile",
|
||||
"date": "2025-01-03",
|
||||
"versionRange": ["1.43.0", "1.43.1"]
|
||||
"versionRange": ["1.34.1", "1.43.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/2048b4c2-4a56-4029-acf9-71e35ff08652",
|
||||
"id": "2024-11-27-forkable-chat",
|
||||
"date": "2024-11-27",
|
||||
"versionRange": ["1.34.0", "1.33.1"]
|
||||
"versionRange": ["1.33.1", "1.34.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/fa8fab19-ace2-4f85-8428-a3a0e28845bb",
|
||||
"id": "2024-11-25-november-providers",
|
||||
"date": "2024-11-25",
|
||||
"versionRange": ["1.33.0", "1.30.1"]
|
||||
"versionRange": ["1.30.1", "1.33.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/eb3f3d8a-79ce-40aa-a206-2c846206c0c0",
|
||||
"id": "2024-11-06-share-text-json",
|
||||
"date": "2024-11-06",
|
||||
"versionRange": ["1.28.0", "1.26.1"]
|
||||
"versionRange": ["1.26.1", "1.28.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/e70c2db6-05c9-43ea-b111-6f6f99e0ae88",
|
||||
"id": "2024-10-27-pin-assistant",
|
||||
"date": "2024-10-27",
|
||||
"versionRange": ["1.26.0", "1.19.1"]
|
||||
"versionRange": ["1.19.1", "1.26.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/635f1c74-6327-48a8-a8d9-68d7376c7749",
|
||||
"id": "2024-09-20-artifacts",
|
||||
"date": "2024-09-20",
|
||||
"versionRange": ["1.19.0", "1.17.1"]
|
||||
"versionRange": ["1.17.1", "1.19.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/bd6d0c82-8f14-4167-ad09-2a841f1e34e4",
|
||||
"id": "2024-09-13-openai-o1-models",
|
||||
"date": "2024-09-13",
|
||||
"versionRange": ["1.17.0", "1.12.1"]
|
||||
"versionRange": ["1.12.1", "1.17.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/385eaca6-daea-484a-9bea-ba7270b4753d",
|
||||
"id": "2024-08-21-file-upload-and-knowledge-base",
|
||||
"date": "2024-08-21",
|
||||
"versionRange": ["1.12.0", "1.8.1"]
|
||||
"versionRange": ["1.8.1", "1.12.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/2a4116a7-15ad-43e5-b801-cc62d8da2012",
|
||||
"id": "2024-08-02-lobe-chat-database-docker",
|
||||
"date": "2024-08-02",
|
||||
"versionRange": ["1.8.0", "1.6.1"]
|
||||
"versionRange": ["1.6.1", "1.8.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/0e3a7174-6b66-4432-a319-dff60b033c24",
|
||||
"id": "2024-07-19-gpt-4o-mini",
|
||||
"date": "2024-07-19",
|
||||
"versionRange": ["1.6.0", "1.0.1"]
|
||||
"versionRange": ["1.0.1", "1.6.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/82bfc467-e0c6-4d99-9b1f-18e4aea24285",
|
||||
"id": "2024-06-19-lobe-chat-v1",
|
||||
"date": "2024-06-19",
|
||||
"versionRange": ["1.0.0", "0.147.0"]
|
||||
"versionRange": ["0.147.0", "1.0.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/aee846d5-b5ee-46cb-9dd0-d952ea708b67",
|
||||
"id": "2024-02-14-ollama",
|
||||
"date": "2024-02-14",
|
||||
"versionRange": ["0.127.0", "0.125.1"]
|
||||
"versionRange": ["0.125.1", "0.127.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/533f7a5e-8a93-4a57-a62f-8233897d72b5",
|
||||
"id": "2024-02-08-sso-oauth",
|
||||
"date": "2024-02-08",
|
||||
"versionRange": ["0.125.0", "0.118.1"]
|
||||
"versionRange": ["0.118.1", "0.125.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/6069332b-8e15-4d3c-8a77-479e8bc09c23",
|
||||
"id": "2023-12-22-dalle-3",
|
||||
"date": "2023-12-22",
|
||||
"versionRange": ["0.118.0", "0.102.1"]
|
||||
"versionRange": ["0.102.1", "0.118.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/03433283-08a5-481a-8f6c-069b2fc6bace",
|
||||
"id": "2023-11-19-tts-stt",
|
||||
"date": "2023-11-19",
|
||||
"versionRange": ["0.102.0", "0.101.1"]
|
||||
"versionRange": ["0.101.1", "0.102.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/dde2c9c5-cdda-4a65-8f32-b6f4da907df2",
|
||||
"id": "2023-11-14-gpt4-vision",
|
||||
"date": "2023-11-14",
|
||||
"versionRange": ["0.101.0", "0.90.0"]
|
||||
"versionRange": ["0.90.0", "0.101.0"]
|
||||
},
|
||||
{
|
||||
"image": "https://github.com/user-attachments/assets/eaed3762-136f-4297-b161-ca92a27c4982",
|
||||
"id": "2023-09-09-plugin-system",
|
||||
"date": "2023-09-09",
|
||||
"versionRange": ["0.72.0", "0.67.0"]
|
||||
"versionRange": ["0.67.0", "0.72.0"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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`. |
|
||||
| Environment Variable | Type | Description |
|
||||
| ------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | Required | This is used to enable the NextAuth service. Set it to `1` to enable 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:
|
||||
|
||||
<Cards>
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/auth0'} title={'Auth0'} />
|
||||
<Card
|
||||
href={'/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id'}
|
||||
title={'Microsoft Entra ID'}
|
||||
/>
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id'} title={'Microsoft Entra ID'} />
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/authentik'} title={'Authentik'} />
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/github'} title={'Github'} />
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/zitadel'} title={'ZITADEL'} />
|
||||
<Card
|
||||
href={'/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust'}
|
||||
title={'Cloudflare Zero Trust'}
|
||||
/>
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust'} title={'Cloudflare Zero Trust'} />
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/authelia'} title={'Authelia'} />
|
||||
|
||||
<Card href={'/docs/self-hosting/advanced/auth/next-auth/logto'} title={'Logto'} />
|
||||
</Cards>
|
||||
|
||||
|
||||
@@ -24,28 +24,30 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全
|
||||
|
||||
在使用 NextAuth 之前,请先在 LobeChat 的环境变量中设置以下变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,microsoft-entra-id,authentik`。 |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------------ | -- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_PUBLIC_ENABLE_NEXT_AUTH` | 必选 | 用于启用 NextAuth 服务,设置为 `1` 以启用,更改此项需要重新编译应用。使用 `lobehub/lobe-chat-database` 镜像部署的用户已经默认添加了该项配置。 |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令: `openssl rand -base64 32`,或者访问 `https://generate-secret.vercel.app/32` 生成秘钥。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 可选 | 该环境变量用于同时启用多个身份验证源,以逗号 `,` 分割,例如 `auth0,microsoft-entra-id,authentik`。 |
|
||||
|
||||
目前支持的身份验证服务有:
|
||||
|
||||
<Cards>
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/auth0'} title={'Auth0'} />
|
||||
<Card
|
||||
href={'/zh/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id'}
|
||||
title={'Microsoft Entra ID'}
|
||||
/>
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/microsoft-entra-id'} title={'Microsoft Entra ID'} />
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/authentik'} title={'Authentik'} />
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/github'} title={'Github'} />
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/zitadel'} title={'ZITADEL'} />
|
||||
<Card
|
||||
href={'/zh/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust'}
|
||||
title={'Cloudflare Zero Trust'}
|
||||
/>
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/cloudflare-zero-trust'} title={'Cloudflare Zero Trust'} />
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/authelia'} title={'Authelia'} />
|
||||
|
||||
<Card href={'/zh/docs/self-hosting/advanced/auth/next-auth/logto'} title={'Logto'} />
|
||||
</Cards>
|
||||
|
||||
@@ -57,7 +59,7 @@ LobeChat 与 Clerk 做了深度集成,能够为用户提供一个更加安全
|
||||
|
||||
顺序为 SSO 提供商的显示顺序。
|
||||
|
||||
| SSO 提供商 | 值 |
|
||||
| SSO 提供商 | 值 |
|
||||
| --------------------- | ----------------------- |
|
||||
| Auth0 | `auth0` |
|
||||
| Authenlia | `authenlia` |
|
||||
|
||||
@@ -11,67 +11,52 @@ tags:
|
||||
|
||||
# Configure Clerk Authentication Service
|
||||
|
||||
Go to [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key.
|
||||
Go to [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) to register and create an application to obtain the corresponding Public Key and Secret Key.
|
||||
|
||||
## Get Environment Variables
|
||||
|
||||
<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'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
||||
/>
|
||||
The environment variables required for this step are as follows:
|
||||
|
||||
The environment variables required for this step are as follows:
|
||||
```shell
|
||||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
||||
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
||||
NEXT_PUBLIC_ENABLE_NEXT_AUTH=0
|
||||
```
|
||||
|
||||
```shell
|
||||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
||||
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
### Create and Configure Webhook in Clerk
|
||||
|
||||
### Create and Configure Webhook in Clerk
|
||||
Since we let Clerk fully handle user authentication and management, we need Clerk to notify our application and store the changes in the user lifecycle (create, update, delete). We achieve this by using the Webhook provided by Clerk.
|
||||
|
||||
Since we let Clerk fully handle user authentication and management, we need Clerk to notify our application and store the changes in the user lifecycle (create, update, delete). We achieve this by using the Webhook provided by Clerk.
|
||||
We need to add an endpoint in Clerk's Webhooks to inform Clerk to send notifications to this endpoint when a user's information changes.
|
||||
|
||||
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.
|
||||
<Image alt={'Add Webhooks endpoint in Clerk'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'} />
|
||||
|
||||
<Image
|
||||
alt={'Add Webhooks endpoint in Clerk'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
||||
/>
|
||||
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.
|
||||
|
||||
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.
|
||||
<Callout type={'warning'}>
|
||||
The `https://` in the URL is essential to maintain the integrity of the URL.
|
||||
</Callout>
|
||||
|
||||
<Callout type={'warning'}>
|
||||
<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'} />
|
||||
|
||||
The `https://` in the URL is essential to maintain the integrity of the URL.
|
||||
### Add Webhook Secret to Environment Variables
|
||||
|
||||
</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'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}
|
||||
/>
|
||||
<Image alt={'View Clerk Webhooks secret'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'} />
|
||||
|
||||
### Add Webhook Secret to Environment Variables
|
||||
|
||||
After creating, you can find the secret of this Webhook in the bottom right corner:
|
||||
|
||||
<Image
|
||||
alt={'View Clerk Webhooks secret'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
||||
/>
|
||||
|
||||
The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`:
|
||||
|
||||
```shell
|
||||
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
The environment variable corresponding to this secret is `CLERK_WEBHOOK_SECRET`:
|
||||
|
||||
```shell
|
||||
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
</Steps>
|
||||
|
||||
By following these steps, you have successfully configured the Clerk authentication service.
|
||||
|
||||
@@ -10,63 +10,49 @@ tags:
|
||||
|
||||
# 配置 Clerk 身份验证服务
|
||||
|
||||
前往 [Clerk](https://clerk.com?utm_source=lobehub&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。
|
||||
前往 [Clerk](https://clerk.com?utm_source=lobehub\&utm_medium=docs) 注册并创建应用,获取相应的 Public Key 和 Secret Key。
|
||||
|
||||
## 获取环境变量
|
||||
|
||||
<Steps>
|
||||
### 添加公、私钥环境变量
|
||||
|
||||
### 添加公、私钥环境变量
|
||||
添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值获取该环境变量。
|
||||
|
||||
添加 `NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY` 和 `CLERK_SECRET_KEY` 环境变量。你可以在菜单中点击「API Keys」,然后复制对应的值获取该环境变量。
|
||||
<Image alt={'在 Clerk 中找到对应的公私钥环境变量'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'} />
|
||||
|
||||
<Image
|
||||
alt={'在 Clerk 中找到对应的公私钥环境变量'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/89883703-7a1a-4a11-b944-5d804544e57c'}
|
||||
/>
|
||||
此步骤所需的环境变量如下:
|
||||
|
||||
此步骤所需的环境变量如下:
|
||||
```shell
|
||||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
||||
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
|
||||
```shell
|
||||
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_live_xxxxxxxxxxx
|
||||
CLERK_SECRET_KEY=sk_live_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
### 在 Clerk 中创建并配置 Webhook
|
||||
|
||||
### 在 Clerk 中创建并配置 Webhook
|
||||
由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。
|
||||
|
||||
由于我们让 Clerk 完全接管用户鉴权与管理,因此我们需要在 Clerk 用户生命周期变更时(创建、更新、删除)中通知我们的应用并存储落库。我们通过 Clerk 提供的 Webhook 来实现这一诉求。
|
||||
我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。
|
||||
|
||||
我们需要在 Clerk 的 Webhooks 中添加一个端点(Endpoint),告诉 Clerk 当用户发生变更时,向这个端点发送通知。
|
||||
<Image alt={'Clerk 添加 Webhooks 端点'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'} />
|
||||
|
||||
<Image
|
||||
alt={'Clerk 添加 Webhooks 端点'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/f50f47fb-5e8e-4930-bf4e-8cf6f5b8afb9'}
|
||||
/>
|
||||
在 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`),然后点击创建。
|
||||
<Callout type={'warning'}>URL 的`https://`不可缺失,须保持 URL 的完整性</Callout>
|
||||
|
||||
<Callout type={'warning'}>URL的`https://`不可缺失,须保持URL的完整性</Callout>
|
||||
<Image alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'} />
|
||||
|
||||
<Image
|
||||
alt={'添加 Clerk Webhooks 时,配置 URL 和用户事件'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/0249ea56-ab17-4aa9-a56c-9ebd556c2645'}
|
||||
/>
|
||||
### 将 Webhook 秘钥添加到环境变量
|
||||
|
||||
### 将 Webhook 秘钥添加到环境变量
|
||||
创建完毕后,可以在右下角找到该 Webhook 的秘钥:
|
||||
|
||||
创建完毕后,可以在右下角找到该 Webhook 的秘钥:
|
||||
<Image alt={'查看 Clerk Webhooks 秘钥'} src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'} />
|
||||
|
||||
<Image
|
||||
alt={'查看 Clerk Webhooks 秘钥'}
|
||||
src={'https://github.com/lobehub/lobe-chat/assets/28616219/fab4abb2-584b-49de-9340-813382951635'}
|
||||
/>
|
||||
|
||||
这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
|
||||
|
||||
```shell
|
||||
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
这个秘钥所对应的环境变量名为 `CLERK_WEBHOOK_SECRET`:
|
||||
|
||||
```shell
|
||||
CLERK_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxxxx
|
||||
```
|
||||
</Steps>
|
||||
|
||||
这样,你已经成功配置了 Clerk 身份验证服务。
|
||||
|
||||
@@ -19,74 +19,53 @@ tags:
|
||||
<Steps>
|
||||
### Create Auth0 Application
|
||||
|
||||
Register and log in to [Auth0][auth0-client-page], click on the "Applications" in the left navigation bar to switch to the application management interface, and click "Create Application" in the upper right corner to create an application.
|
||||
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.
|
||||
|
||||
<Image
|
||||
alt="Create Auth0 Application S1"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
||||
/>
|
||||
<Image alt="Create Auth0 Application S1" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86" />
|
||||
|
||||
Fill in the application name you want to display to the organization users, choose any application type, and click "Create".
|
||||
Fill in the application name you want to display to the organization users, choose any application type, and click "Create".
|
||||
|
||||
<Image
|
||||
alt="Create Auth0 Application S2"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
||||
/>
|
||||
<Image alt="Create Auth0 Application S2" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc" />
|
||||
|
||||
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.
|
||||
|
||||
<Image
|
||||
alt="Create Auth0 Application S3"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
||||
/>
|
||||
<Image alt="Create Auth0 Application S3" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6" />
|
||||
|
||||
In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in:
|
||||
In the application configuration page, you also need to configure Allowed Callback URLs, where you should fill in:
|
||||
|
||||
```bash
|
||||
http(s)://your-domain/api/auth/callback/auth0
|
||||
```
|
||||
```bash
|
||||
http(s)://your-domain/api/auth/callback/auth0
|
||||
```
|
||||
|
||||
<Image
|
||||
alt="Create Auth0 Application S4"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
||||
/>
|
||||
<Image alt="Create Auth0 Application S4" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9" />
|
||||
|
||||
<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>
|
||||
<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.
|
||||
|
||||
<Image
|
||||
alt="Add Users"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
||||
/>
|
||||
<Image alt="Add Users" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96" />
|
||||
|
||||
### 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 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` |
|
||||
| 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` |
|
||||
|
||||
<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"
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
||||
/>
|
||||
<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="Configuring Social Login"
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
||||
/>
|
||||
<Image alt="Configuring Social Login" src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa" />
|
||||
|
||||
<Callout type={'warning'}>
|
||||
Configuring social login services by default allows anyone to authenticate, which may lead to
|
||||
|
||||
@@ -15,73 +15,52 @@ tags:
|
||||
<Steps>
|
||||
### 创建 Auth0 应用
|
||||
|
||||
注册并登录 [Auth0](https://manage.auth0.com/dashboard),点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。
|
||||
注册并登录 [Auth0](https://manage.auth0.com/dashboard),点击左侧导航栏的「Applications」,切换到应用管理界面,点击右上角「Create Application」以创建应用。
|
||||
|
||||
<Image
|
||||
alt="创建 Auth0 应用 S1"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86"
|
||||
/>
|
||||
<Image alt="创建 Auth0 应用 S1" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/f068190f-0027-4d3b-8667-d632e43d5a86" />
|
||||
|
||||
填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。
|
||||
填写你想向组织用户显示的应用名称,可选择任意应用类型,点击「Create」。
|
||||
|
||||
<Image
|
||||
alt="创建 Auth0 应用 S2"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc"
|
||||
/>
|
||||
<Image alt="创建 Auth0 应用 S2" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/3e0082df-9b6f-46f3-b67f-bdc79e1eb2cc" />
|
||||
|
||||
创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息
|
||||
创建成功后,点击相应的应用,进入应用详情页,切换到「Settings」标签页,就可以看到相应的配置信息
|
||||
|
||||
<Image
|
||||
alt="创建 Auth0 应用 S3"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6"
|
||||
/>
|
||||
<Image alt="创建 Auth0 应用 S3" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/df4cea85-616a-46f5-b2de-42725d9b82a6" />
|
||||
|
||||
在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写:
|
||||
在应用配置页面中,还需要配置 Allowed Callback URLs,在此处填写:
|
||||
|
||||
```bash
|
||||
http(s)://your-domain/api/auth/callback/auth0
|
||||
```
|
||||
```bash
|
||||
http(s)://your-domain/api/auth/callback/auth0
|
||||
```
|
||||
|
||||
<Image
|
||||
alt="创建 Auth0 应用 S4"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9"
|
||||
/>
|
||||
<Image alt="创建 Auth0 应用 S4" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/62fbd09f-a69a-4460-949b-0f6285fa65b9" />
|
||||
|
||||
<Callout type={'important'}>
|
||||
可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致
|
||||
</Callout>
|
||||
<Callout type={'important'}>
|
||||
可以在部署后再填写或修改 Allowed Callback URLs,但是务必保证填写的 URL 与部署的 URL 一致
|
||||
</Callout>
|
||||
|
||||
### 新增用户
|
||||
### 新增用户
|
||||
|
||||
点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat
|
||||
点击左侧导航栏的「Users Management」,进入用户管理界面,可以为你的组织新建用户,用以登录 LobeChat
|
||||
|
||||
<Image
|
||||
alt="新增用户"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96"
|
||||
/>
|
||||
<Image alt="新增用户" inStep src="https://github.com/lobehub/lobe-chat/assets/30863298/0beda150-d0b6-43cf-a9f1-fce928b83a96" />
|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 |
|
||||
| `AUTH_AUTH0_ID` | 必选 | Auth0 应用程序的 Client ID |
|
||||
| `AUTH_AUTH0_SECRET` | 必选 | Auth0 应用程序的 Client Secret |
|
||||
| `AUTH_AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Auth0 请填写 `auth0`。 |
|
||||
| `AUTH_AUTH0_ID` | 必选 | Auth0 应用程序的 Client ID |
|
||||
| `AUTH_AUTH0_SECRET` | 必选 | Auth0 应用程序的 Client Secret |
|
||||
| `AUTH_AUTH0_ISSUER` | 必选 | Auth0 应用程序的 Domain,`https://example.auth0.com` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#auth-0) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
@@ -96,19 +75,13 @@ http(s)://your-domain/api/auth/callback/auth0
|
||||
|
||||
Auth0 支持 Azure Active Directory / Slack / Google Workspace / Office 365 / Zoom 等单点登录服务,详细支持列表可参考 [这里](https://marketplace.auth0.com/features/sso-integrations)
|
||||
|
||||
<Image
|
||||
alt="Connecting to an Existing Single Sign-On Service"
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/9891347e-a338-4aa9-8714-f16c8dbcfcec"
|
||||
/>
|
||||
<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 中,配置社交登录服务。
|
||||
|
||||
<Image
|
||||
alt="Configuring Social Login"
|
||||
src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa"
|
||||
/>
|
||||
<Image alt="Configuring Social Login" src="https://github.com/lobehub/lobe-chat/assets/30863298/880749a6-5ba4-4e20-a968-b583a54de7fa" />
|
||||
|
||||
<Callout type={'warning'}>
|
||||
配置社交登录服务默认会允许所有人通过认证,这可能会导致 LobeChat 被外部人员滥用。
|
||||
|
||||
@@ -17,54 +17,54 @@ tags:
|
||||
## Authelia Configuration Flow
|
||||
|
||||
<Steps>
|
||||
### Create an Authelia Identity Provider
|
||||
### Create an Authelia Identity Provider
|
||||
|
||||
We assume you are already familiar with using Authelia. Let's say your LobeChat instance is deployed at https://lobe.example.com/. Note that currently only localhost supports HTTP access; other domains need to enable TLS, otherwise Authelia will actively interrupt authentication by default.
|
||||
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'.
|
||||
public: false
|
||||
authorization_policy: two_factor
|
||||
redirect_uris:
|
||||
- https://chat.example.com/api/auth/callback/authelia
|
||||
scopes:
|
||||
- openid
|
||||
- profile
|
||||
- email
|
||||
userinfo_signing_algorithm: none
|
||||
```
|
||||
```yaml
|
||||
identity_providers:
|
||||
oidc:
|
||||
...
|
||||
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
|
||||
## See: https://www.authelia.com/c/oidc
|
||||
- id: lobe-chat
|
||||
description: LobeChat
|
||||
secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'.
|
||||
public: false
|
||||
authorization_policy: two_factor
|
||||
redirect_uris:
|
||||
- https://chat.example.com/api/auth/callback/authelia
|
||||
scopes:
|
||||
- openid
|
||||
- profile
|
||||
- email
|
||||
userinfo_signing_algorithm: none
|
||||
```
|
||||
|
||||
Make sure to replace secret and redirect_urls with your own values. Note! The secret configured in Authelia is ciphertext, i.e., a salted hash value. Its corresponding plaintext needs to be filled in LobeChat later.
|
||||
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 |
|
||||
| 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](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.
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -14,56 +14,55 @@ tags:
|
||||
## Authelia 配置流程
|
||||
|
||||
<Steps>
|
||||
### 创建 Authelia 提供应用
|
||||
### 创建 Authelia 提供应用
|
||||
|
||||
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
||||
我们现在默认您已经了解了如何使用 Authelia。假设您的 LobeChat 实例部署在 `https://lobe.example.com/` 中。注意,目前只有 `localhost` 支持 HTTP 访问,其他域名需要启用 TLS,否则 Authelia 默认将主动中断身份认证。
|
||||
|
||||
现在,我们打开 Authelia 实例的配置文件进行编辑:
|
||||
现在,我们打开 Authelia 实例的配置文件进行编辑:
|
||||
|
||||
在 `identity_providers`-> `oidc` 下新增一个 `lobe-chat` 的项目:
|
||||
在 `identity_providers`-> `oidc` 下新增一个 `lobe-chat` 的项目:
|
||||
|
||||
```yaml
|
||||
...
|
||||
identity_providers:
|
||||
oidc:
|
||||
...
|
||||
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
|
||||
## See: https://www.authelia.com/c/oidc
|
||||
- id: lobe-chat
|
||||
description: LobeChat
|
||||
secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'.
|
||||
public: false
|
||||
authorization_policy: two_factor
|
||||
redirect_uris:
|
||||
- https://chat.example.com/api/auth/callback/authelia
|
||||
scopes:
|
||||
- openid
|
||||
- profile
|
||||
- email
|
||||
userinfo_signing_algorithm: none
|
||||
```
|
||||
```yaml
|
||||
...
|
||||
identity_providers:
|
||||
oidc:
|
||||
...
|
||||
## The other portions of the mandatory OpenID Connect 1.0 configuration go here.
|
||||
## See: https://www.authelia.com/c/oidc
|
||||
- id: lobe-chat
|
||||
description: LobeChat
|
||||
secret: '$pbkdf2-sha512$310000$c8p78n7pUMln0jzvd4aK4Q$JNRBzwAo0ek5qKn50cFzzvE9RXV88h1wJn5KGiHrD0YKtZaR/nCb2CJPOsKaPK0hjf.9yHxzQGZziziccp6Yng' # The digest of 'insecure_secret'.
|
||||
public: false
|
||||
authorization_policy: two_factor
|
||||
redirect_uris:
|
||||
- https://chat.example.com/api/auth/callback/authelia
|
||||
scopes:
|
||||
- openid
|
||||
- profile
|
||||
- email
|
||||
userinfo_signing_algorithm: none
|
||||
```
|
||||
|
||||
请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
||||
请您确保 `secret` 和 `redirect_urls` 替换成您自己的值。注意!Authelia 中配置 `secret` 是密文,即加盐哈希值。其对应的明文稍后需要填写在 lobeChat 中。
|
||||
|
||||
保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。
|
||||
保存配置文件,然后重启 Authelia 服务。现在我们完成了 Authelia 的配置工作。
|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。 |
|
||||
| `AUTH_AUTHELIA_ID` | 必选 | 刚刚在 Authelia 配置的 `id`,示例值是 `lobe-chat` |
|
||||
| `AUTH_AUTHELIA_SECRET` | 必选 | 刚刚在 Authelia 配置的 `secret` 对应的明文,示例值是 `insecure_secret` |
|
||||
| `AUTH_AUTHELIA_ISSUER` | 必选 | 您的 Authelia 的网址,例如 `https://sso.example.com` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authelia 请填写 `authelia`。 |
|
||||
| `AUTH_AUTHELIA_ID` | 必选 | 刚刚在 Authelia 配置的 `id`,示例值是 `lobe-chat` |
|
||||
| `AUTH_AUTHELIA_SECRET` | 必选 | 刚刚在 Authelia 配置的 `secret` 对应的明文,示例值是 `insecure_secret` |
|
||||
| `AUTH_AUTHELIA_ISSUER` | 必选 | 您的 Authelia 的网址,例如 `https://sso.example.com` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authelia) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -19,52 +19,47 @@ tags:
|
||||
<Steps>
|
||||
### Create an Authentik Application Provider
|
||||
|
||||
In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider.
|
||||
In your Authentik instance, use the administrator account to go to **Admin Interface** -> **Applications** -> **Providers** and create a new provider.
|
||||
|
||||
Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow.
|
||||
Select **OAuth2/OpenID Provider** as the provider type. Fill in the provider name, select the authentication flow and authorization flow.
|
||||
|
||||
In the `Redirect URL/Origin (regex)` field, fill in:
|
||||
In the `Redirect URL/Origin (regex)` field, fill in:
|
||||
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/authentik
|
||||
```
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/authentik
|
||||
```
|
||||
|
||||
<Callout type={'info'}>
|
||||
- You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in
|
||||
URL matches the deployed URL. - Replace `your-domain` with your own domain name
|
||||
</Callout>
|
||||
<Callout type={'info'}>
|
||||
- You can fill in or modify the `Redirect URL/Origin (regex)` later, but make sure the filled in
|
||||
URL matches the deployed URL. - Replace `your-domain` with your own domain name
|
||||
</Callout>
|
||||
|
||||
<Image
|
||||
alt="Create Authentik Provider"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b"
|
||||
/>
|
||||
<Image alt="Create Authentik Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b" />
|
||||
|
||||
Click **Done**
|
||||
Click **Done**
|
||||
|
||||
After the creation is successful, click **Applications** on the left -> **Create**, fill in the name and Slug, select the provider created in the previous step, and click **Create**.
|
||||
After the 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` |
|
||||
| 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` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Authentik) for details about the variables.
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -16,50 +16,45 @@ tags:
|
||||
<Steps>
|
||||
### 创建 Authentik 提供应用
|
||||
|
||||
在你的 Authentik 实例中使用管理员账号进入 管理员界面 -> 应用程序 -> 提供程序 创建一个新的提供程序。
|
||||
在你的 Authentik 实例中使用管理员账号进入 管理员界面 -> 应用程序 -> 提供程序 创建一个新的提供程序。
|
||||
|
||||
选择 OAuth2/OpenID Provider 作为提供程序类型。填写提供程序的名称,选择身份流程和授权流程。
|
||||
选择 OAuth2/OpenID Provider 作为提供程序类型。填写提供程序的名称,选择身份流程和授权流程。
|
||||
|
||||
在 `重定向 URL/Origin(正则)` 处填写:
|
||||
在 `重定向 URL/Origin(正则)` 处填写:
|
||||
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/authentik
|
||||
```
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/authentik
|
||||
```
|
||||
|
||||
<Callout type={'info'}>
|
||||
- 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。 -
|
||||
your-domain 请替换为自己的域名
|
||||
</Callout>
|
||||
<Callout type={'info'}>
|
||||
- 可以之后再填写或修改 `重定向 URL/Origin(正则)`,但是务必保证填写的 URL 与部署的 URL 一致。 -
|
||||
your-domain 请替换为自己的域名
|
||||
</Callout>
|
||||
|
||||
<Image
|
||||
alt="创建 Authentik 提供程序"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b"
|
||||
/>
|
||||
<Image alt="创建 Authentik 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/67304509/4244634e-5f68-48d5-aac0-e5f4b06d1c4b" />
|
||||
|
||||
点击「完成」
|
||||
点击「完成」
|
||||
|
||||
创建成功后,点击左侧的「应用程序」-> 创建,填写名称和 Slug ,提供程序选择上一步创建的提供程序,点击「创建」。
|
||||
创建成功后,点击左侧的「应用程序」-> 创建,填写名称和 Slug ,提供程序选择上一步创建的提供程序,点击「创建」。
|
||||
|
||||
提供程序创建成功后,点击相应的提供程序,进入详情页,点击「编辑」,将 `客户端 ID` 和 `客户端 Secret` 保存下来。复制 `OpenID 配置颁发者` 的 URL,保存下来。
|
||||
提供程序创建成功后,点击相应的提供程序,进入详情页,点击「编辑」,将 `客户端 ID` 和 `客户端 Secret` 保存下来。复制 `OpenID 配置颁发者` 的 URL,保存下来。
|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authentik 请填写 `authentik`。 |
|
||||
| `AUTH_AUTHENTIK_ID` | 必选 | Authentik 提供程序详情页的 客户端 ID |
|
||||
| `AUTH_AUTHENTIK_SECRET` | 必选 | Authentik 提供程序详情页的 客户端 Secret |
|
||||
| `AUTH_AUTHENTIK_ISSUER` | 必选 | Authentik 提供程序详情页的 OpenID 配置颁发者 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Authentik 请填写 `authentik`。 |
|
||||
| `AUTH_AUTHENTIK_ID` | 必选 | Authentik 提供程序详情页的 客户端 ID |
|
||||
| `AUTH_AUTHENTIK_SECRET` | 必选 | Authentik 提供程序详情页的 客户端 Secret |
|
||||
| `AUTH_AUTHENTIK_ISSUER` | 必选 | Authentik 提供程序详情页的 OpenID 配置颁发者 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Authentik) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -33,93 +33,122 @@ If you are deploying using a public network, the following assumptions apply:
|
||||
- You privately deploy Casdoor, and its domain is `https://lobe-auth-api.example.com`.
|
||||
|
||||
<Steps>
|
||||
### Create a Casdoor Application
|
||||
|
||||
### 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>
|
||||
.login-panel {
|
||||
padding: 40px 70px 0 70px;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
||||
}
|
||||
.panel-logo {
|
||||
width: 64px;
|
||||
}
|
||||
.login-logo-box {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#parent-area
|
||||
> main
|
||||
> div
|
||||
> div.login-content
|
||||
> div.login-panel
|
||||
> div.login-form
|
||||
> div
|
||||
> div
|
||||
> button {
|
||||
box-shadow: none !important;
|
||||
border-radius: 10px !important;
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
border: 1px solid #eee !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
```html
|
||||
<style>
|
||||
.login-panel {
|
||||
padding: 40px 0 0 0;
|
||||
box-shadow: none;
|
||||
padding: 40px 70px 0 70px;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
||||
}
|
||||
.panel-logo {
|
||||
width: 64px;
|
||||
}
|
||||
.login-logo-box {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
Then, copy the `Client ID` and `Client Secret` and save them.
|
||||
#parent-area
|
||||
> main
|
||||
> div
|
||||
> div.login-content
|
||||
> div.login-panel
|
||||
> div.login-form
|
||||
> div
|
||||
> div
|
||||
> button {
|
||||
box-shadow: none !important;
|
||||
border-radius: 10px !important;
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
border: 1px solid #eee !important;
|
||||
}
|
||||
|
||||
### Configure Environment Variables
|
||||
@media (max-width: 640px) {
|
||||
.login-panel {
|
||||
padding: 40px 0 0 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
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.
|
||||
</style>
|
||||
```
|
||||
|
||||
When deploying LobeChat, you need to configure the following environment variables:
|
||||
Then, copy the `Client ID` and `Client Secret` and save them.
|
||||
|
||||
| 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` |
|
||||
### Disable User Registration
|
||||
|
||||
<Callout type={'tip'}>
|
||||
Visit [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#casdoor) for
|
||||
details on related variables.
|
||||
</Callout>
|
||||
Go to `Identity` -> `Applications`, select the `LobeChat` application, and set `Allow Register` to `false`.
|
||||
|
||||
<Callout type={'warning'}>
|
||||
Disabling user registration is necessary to prevent users from registering through the Casdoor login page.
|
||||
</Callout>
|
||||
|
||||
### Configure Webhook (Optional)
|
||||
|
||||
> Available on Casdoor `>=1.843.0`.
|
||||
|
||||
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:
|
||||
|
||||
- URL: `https://lobe.example.com/api/webhooks/casdoor`
|
||||
- Method: `POST`
|
||||
- Content Type: `application/json`
|
||||
- Headers: `casdoor-secret`: `Your Webhook Secret`
|
||||
|
||||
> 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:
|
||||
|
||||
| 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` |
|
||||
| `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>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -30,92 +30,123 @@ tags:
|
||||
- 你私有部署 Casdoor,其域名为 `https://lobe-auth-api.example.com`。
|
||||
|
||||
<Steps>
|
||||
### 创建 Casdoor 应用
|
||||
|
||||
### 创建 Casdoor 应用
|
||||
访问你私有部署的 Casdoor WebUI(默认为 `http://localhost:8000/`) 进入控制台,默认账号为 `admin`,密码为 `123`。
|
||||
|
||||
访问你私有部署的 Casdoor WebUI(默认为 `http://localhost:8000/`) 进入控制台,默认账号为 `admin`,密码为 `123`。
|
||||
前往 `身份认证` -> `应用`,创建一个 `LobeChat` 应用或直接修改内置的 `built-in` 应用,其他字段可以自行探索,但你至少需要配置以下字段:
|
||||
|
||||
前往 `身份认证` -> `应用`,创建一个 `LobeChat` 应用或直接修改内置的 `built-in` 应用,其他字段可以自行探索,但你至少需要配置以下字段:
|
||||
- 名称、显示名称:`LobeChat`
|
||||
- 重定向 URLs:
|
||||
- 本地开发环境:`http://localhost:3210/api/auth/callback/casdoor`
|
||||
- 局域网 IP 部署:`http://LOBECHAT_IP:3210/api/auth/callback/casdoor`
|
||||
- 公网环境:`https://lobe.example.com/api/auth/callback/casdoor`
|
||||
|
||||
- 名称、显示名称:`LobeChat`
|
||||
- 重定向 URLs:
|
||||
- 本地开发环境:`http://localhost:3210/api/auth/callback/casdoor`
|
||||
- 局域网 IP 部署:`http://LOBECHAT_IP:3210/api/auth/callback/casdoor`
|
||||
- 公网环境:`https://lobe.example.com/api/auth/callback/casdoor`
|
||||
还有一些不必需但是可以提高用户体验的字段:
|
||||
|
||||
还有一些不必需但是可以提高用户体验的字段:
|
||||
- Logo:`https://lobehub.com/icon-192x192.png`
|
||||
- 表单 CSS、表单 CSS(移动端):
|
||||
|
||||
- Logo:`https://lobehub.com/icon-192x192.png`
|
||||
- 表单 CSS、表单 CSS(移动端):
|
||||
|
||||
```html
|
||||
<style>
|
||||
.login-panel {
|
||||
padding: 40px 70px 0 70px;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
||||
}
|
||||
.panel-logo {
|
||||
width: 64px;
|
||||
}
|
||||
.login-logo-box {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#parent-area
|
||||
> main
|
||||
> div
|
||||
> div.login-content
|
||||
> div.login-panel
|
||||
> div.login-form
|
||||
> div
|
||||
> div
|
||||
> button {
|
||||
box-shadow: none !important;
|
||||
border-radius: 10px !important;
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
border: 1px solid #eee !important;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
```html
|
||||
<style>
|
||||
.login-panel {
|
||||
padding: 40px 0 0 0;
|
||||
box-shadow: none;
|
||||
padding: 40px 70px 0 70px;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
box-shadow: rgba(17, 12, 46, 0.15) 0px 48px 100px 0px;
|
||||
}
|
||||
.panel-logo {
|
||||
width: 64px;
|
||||
}
|
||||
.login-logo-box {
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
随后,复制 `客户端 ID` 和 `客户端密钥`,并保存。
|
||||
#parent-area
|
||||
> main
|
||||
> div
|
||||
> div.login-content
|
||||
> div.login-panel
|
||||
> div.login-form
|
||||
> div
|
||||
> div
|
||||
> button {
|
||||
box-shadow: none !important;
|
||||
border-radius: 10px !important;
|
||||
transition-property: all;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
transition-duration: 150ms;
|
||||
border: 1px solid #eee !important;
|
||||
}
|
||||
|
||||
### 配置环境变量
|
||||
@media (max-width: 640px) {
|
||||
.login-panel {
|
||||
padding: 40px 0 0 0;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
将获取到的 `客户端 ID` 和 `客户端`,设为 LobeChat 环境变量中的 `AUTH_CASDOOR_ID` 和 `AUTH_CASDOOR_SECRET`。
|
||||
|
||||
配置 LobeChat 环境变量中 `AUTH_CASDOOR_ISSUER` 为:
|
||||
|
||||
- `http://localhost:8000/`,若你是本地开发环境
|
||||
- `http://CASDOOR_IP:8000/`,若你是局域网私有部署的 Casdoor
|
||||
- `https://lobe-auth-api.example.com/`,若你是公网环境部署的 Casdoor
|
||||
</style>
|
||||
```
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
随后,复制 `客户端 ID` 和 `客户端密钥`,并保存。
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Casdoor 请填写 `casdoor`。 |
|
||||
| `AUTH_CASDOOR_ID` | 必选 | Casdoor 应用详情页的客户端 ID |
|
||||
| `AUTH_CASDOOR_SECRET` | 必选 | Casdoor 应用详情页的客户端密钥 |
|
||||
| `AUTH_CASDOOR_ISSUER` | 必选 | Casdoor 提供程序的 OpenID Connect 颁发者。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
||||
### 配置 Webhook (可选)
|
||||
|
||||
> 在 Casdoor `>=1.843.0` 上可用。
|
||||
|
||||
配置 Casdoor 的 Webhook 以便在用户信息更新时同步到 LobeChat 。
|
||||
|
||||
前往 `管理工具` -> `Webhooks`,创建一个 Webhook,添加一个 Webhook,填写以下字段:
|
||||
|
||||
- 链接:`http://lobe.example.com/api/webhooks/casdoor`
|
||||
- 方法:`POST`
|
||||
- 内容类型:`application/json`
|
||||
- 协议头:`casdoor-secret`: `你的Webhook密钥`
|
||||
|
||||
> 密钥由你自己生成,用于验证 Casdoor 发送的请求是否合法。 可以前往 [https://generate-secret.vercel.app/10](https://generate-secret.vercel.app/10) 生成一个 10 位的密钥。
|
||||
|
||||
- 事件:`update-user`
|
||||
|
||||
保存,并退出。 将该密钥填写到环境变量中的 `CASDOOR_WEBHOOK_SECRET`。
|
||||
|
||||
### 关闭注册
|
||||
|
||||
为了保证你的应用安全,建议关闭 Casdoor 的注册功能,改为由管理员手动添加用户。
|
||||
|
||||
前往 `身份认证` -> `应用`,将 `启用注册` 设置为 `否`。
|
||||
|
||||
<Callout type={'warning'}>
|
||||
Casdoor 的注册功能默认是开启的,若你不关闭注册功能,任何人都可以注册并登录你的应用。
|
||||
</Callout>
|
||||
|
||||
### 配置环境变量
|
||||
|
||||
将获取到的 `客户端 ID` 和 `客户端`,设为 LobeChat 环境变量中的 `AUTH_CASDOOR_ID` 和 `AUTH_CASDOOR_SECRET`。
|
||||
|
||||
配置 LobeChat 环境变量中 `AUTH_CASDOOR_ISSUER` 为:
|
||||
|
||||
- `http://localhost:8000/`,若你是本地开发环境
|
||||
- `http://CASDOOR_IP:8000/`,若你是局域网私有部署的 Casdoor
|
||||
- `https://lobe-auth-api.example.com/`,若你是公网环境部署的 Casdoor
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Casdoor 请填写 `casdoor`。 |
|
||||
| `AUTH_CASDOOR_ID` | 必选 | Casdoor 应用详情页的客户端 ID |
|
||||
| `AUTH_CASDOOR_SECRET` | 必选 | Casdoor 应用详情页的客户端密钥 |
|
||||
| `AUTH_CASDOOR_ISSUER` | 必选 | Casdoor 提供程序的 OpenID Connect 颁发者。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
||||
| `CASDOOR_WEBHOOK_SECRET` | 可选 | 用于验证 Casdoor 发送的 Webhook 请求是否合法的密钥。 |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#casdoor) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>部署成功后,用户将可以通过 Casdoor 身份认证并使用 LobeChat。</Callout>
|
||||
|
||||
@@ -17,49 +17,48 @@ tags:
|
||||
## Cloudflare Zero Trust Configuration Flow
|
||||
|
||||
<Steps>
|
||||
### 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`.
|
||||
|
||||

|
||||

|
||||
|
||||
Now, on the current page, click `Add an application` and select `SaaS`.
|
||||
Now, on the current page, click `Add an application` and select `SaaS`.
|
||||
|
||||

|
||||

|
||||
|
||||
In the `Application` text box, enter the application name, such as `LobeChat SSO`. Then click `Select OIDC`, followed by clicking `Add application`.
|
||||
In the `Application` text box, enter the application name, such as `LobeChat SSO`. Then click `Select OIDC`, followed by clicking `Add application`.
|
||||
|
||||

|
||||

|
||||
|
||||
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.
|
||||
|
||||

|
||||

|
||||
|
||||
### 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 `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` |
|
||||
| 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` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
Go to [📘 Environment Variables](/docs/self-hosting/environment-variable#Cloudflare%20Zero%20Trust) for details about the variables.
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -16,47 +16,46 @@ tags:
|
||||
## Cloudflare Zero Trust 配置流程
|
||||
|
||||
<Steps>
|
||||
### 在 Cloudflare Zero Trust 中创建应用
|
||||
### 在 Cloudflare Zero Trust 中创建应用
|
||||
|
||||
我们现在默认您已经了解了如何使用 Cloudflare Zero Trust 平台且假设您的 LobeChat 实例部署在 `https://chat.example.com` 中。
|
||||
我们现在默认您已经了解了如何使用 Cloudflare Zero Trust 平台且假设您的 LobeChat 实例部署在 `https://chat.example.com` 中。
|
||||
|
||||
首先我们需要访问 `https://one.dash.cloudflare.com/` 并前往 `Access - Applications` 中。
|
||||
首先我们需要访问 `https://one.dash.cloudflare.com/` 并前往 `Access - Applications` 中。
|
||||
|
||||

|
||||

|
||||
|
||||
现在,在所在页面点击 `Add an application` 并选择 `SaaS`。
|
||||
现在,在所在页面点击 `Add an application` 并选择 `SaaS`。
|
||||
|
||||

|
||||

|
||||
|
||||
在 `Application` 文本框内填入应用名称,如:`LobeChat SSO`,然后点击 `Select OIDC` 后点击 `Add applicaiton`
|
||||
在 `Application` 文本框内填入应用名称,如:`LobeChat SSO`,然后点击 `Select OIDC` 后点击 `Add applicaiton`
|
||||
|
||||

|
||||

|
||||
|
||||
至此您已成功在 Clouflare Zero Trust 中创建了一个名为 `LobeChat SSO` 的 SaaS 应用。
|
||||
至此您已成功在 Clouflare Zero Trust 中创建了一个名为 `LobeChat SSO` 的 SaaS 应用。
|
||||
|
||||
接下来我们需要在 `Redirect URLs` 中填入 `https://chat.example.com/api/auth/callback/cloudflare-zero-trust`(注意此处的 `chat.example.com` 需要替换为您的实例地址) 
|
||||
接下来我们需要在 `Redirect URLs` 中填入 `https://chat.example.com/api/auth/callback/cloudflare-zero-trust`(注意此处的 `chat.example.com` 需要替换为您的实例地址) 
|
||||
|
||||
最后我们将页面往下滚动,您将需要记录以下三个值 `Client secret`, `Client ID` 及 `Issuer` 以备后续部署 LobeChat 环境变量使用。
|
||||
最后我们将页面往下滚动,您将需要记录以下三个值 `Client secret`, `Client ID` 及 `Issuer` 以备后续部署 LobeChat 环境变量使用。
|
||||
|
||||

|
||||

|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Cloudflare Zero Trust 请填写 `cloudflare-zero-trust`。 |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_ID` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client ID`,示例值是 `lobe-chat` |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_SECRET` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client secret`,示例值是 `insecure_secret` |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_ISSUER` | 必选 | 在 Cloudflare Zero Trust 生成的 `Issuer`,例如 `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/7db0f` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ----------------------------------- | -- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Cloudflare Zero Trust 请填写 `cloudflare-zero-trust`。 |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_ID` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client ID`,示例值是 `lobe-chat` |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_SECRET` | 必选 | 在 Cloudflare Zero Trust 生成的 `Client secret`,示例值是 `insecure_secret` |
|
||||
| `AUTH_CLOUDFLARE_ZERO_TRUST_ISSUER` | 必选 | 在 Cloudflare Zero Trust 生成的 `Issuer`,例如 `https://example.cloudflareaccess.com/cdn-cgi/access/sso/oidc/7db0f` |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://chat.example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#Cloudflare%20Zero%20Trust) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -19,79 +19,52 @@ tags:
|
||||
<Steps>
|
||||
### Create a Github Provider
|
||||
|
||||
Click [here][github-create-app] to create a new Github App.
|
||||
Click [here][github-create-app] to create a new Github App.
|
||||
|
||||
Fill in the Github App name, Homepage URL, and Callback URL.
|
||||
Fill in the Github App name, Homepage URL, and Callback URL.
|
||||
|
||||
<Image
|
||||
alt="Create a Github Provider"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7"
|
||||
/>
|
||||
<Image alt="Create a Github Provider" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
||||
|
||||
Set the webhook callback URL according to your needs.
|
||||
Set the webhook callback URL according to your needs.
|
||||
|
||||
<Image
|
||||
alt="Fill in other fields"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd"
|
||||
/>
|
||||
<Image alt="Fill in other fields" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
||||
|
||||
Set the permission to read email addresses.
|
||||
Set the permission to read email addresses.
|
||||
|
||||
<Image
|
||||
alt="Set required permissions"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251"
|
||||
/>
|
||||
<Image
|
||||
alt="Set permission to read email addresses"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde"
|
||||
/>
|
||||
<Image alt="Set required permissions" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
||||
|
||||
Set whether it is accessible publicly or only accessible to yourself.
|
||||
<Image alt="Set permission to read email addresses" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
||||
|
||||
<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"
|
||||
/>
|
||||
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.
|
||||
Click "Create Github App".
|
||||
|
||||
<Image
|
||||
alt="Create a new client secret"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
|
||||
/>
|
||||
After successful creation, click "Generate a new client secret" to create a client secret.
|
||||
|
||||
After successful creation, save the `Client ID` and `Client Secret`.
|
||||
<Image alt="Create a new client secret" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
||||
|
||||
<Image
|
||||
alt="Create a new client secret"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
|
||||
/>
|
||||
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
|
||||
information on these variables.
|
||||
</Callout>
|
||||
| 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` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
Go to [📘 Environment Variables](/docs/self-hosting/environment-variables/auth#github) for detailed
|
||||
information on these variables.
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -16,78 +16,51 @@ tags:
|
||||
<Steps>
|
||||
### 创建 Github 提供应用
|
||||
|
||||
点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
|
||||
点击 [这里](https://github.com/settings/apps/new) 创建一个新的 Github App。
|
||||
|
||||
填写 Github App name、Homepage URL、Callbak URL
|
||||
填写 Github App name、Homepage URL、Callbak URL
|
||||
|
||||
<Image
|
||||
alt="创建 Github 提供程序"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7"
|
||||
/>
|
||||
按照自己所需设置Webhook回调地址
|
||||
<Image alt="创建 Github 提供程序" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/2f919f99-2aaa-4fa7-9938-169d3ed09db7" />
|
||||
|
||||
<Image
|
||||
alt="填写其他字段"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd"
|
||||
/>
|
||||
按照自己所需设置 Webhook 回调地址
|
||||
|
||||
设置读取邮件地址权限
|
||||
<Image alt="填写其他字段" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/d7ef5ad1-b1a3-435e-b1bc-4436d2b6fecd" />
|
||||
|
||||
<Image
|
||||
alt="设置所需权限"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251"
|
||||
/>
|
||||
<Image
|
||||
alt="设置读取邮件地址权限"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde"
|
||||
/>
|
||||
设置读取邮件地址权限
|
||||
|
||||
设置公开访问还是仅自己访问
|
||||
<Image alt="设置所需权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/23131ca1-9e84-4a89-a840-ef79c4bc0251" />
|
||||
|
||||
<Image
|
||||
alt="设置公开访问还是仅自己访问"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970"
|
||||
/>
|
||||
<Image alt="设置读取邮件地址权限" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/358bca8d-3d82-4e76-9a5e-90d16a39efde" />
|
||||
|
||||
点击「Create Github App」
|
||||
设置公开访问还是仅自己访问
|
||||
|
||||
创建成功后,点击「Generate a new client secret」创建客户端Secret
|
||||
<Image alt="设置公开访问还是仅自己访问" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/995780cb-9096-4a36-ab17-d422703ab970" />
|
||||
|
||||
<Image
|
||||
alt="创建新的客户端密钥"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29"
|
||||
/>
|
||||
点击「Create Github App」
|
||||
|
||||
创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
|
||||
创建成功后,点击「Generate a new client secret」创建客户端 Secret
|
||||
|
||||
<Image
|
||||
alt="创建新的客户端密钥"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4"
|
||||
/>
|
||||
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/6d69bdca-7d18-4cbc-b3e0-220d8815cd29" />
|
||||
|
||||
### 配置环境变量
|
||||
创建成功后, 将 `客户端 ID` 和 `客户端 Secret` 保存下来。
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
<Image alt="创建新的客户端密钥" inStep src="https://github.com/lobehub/lobe-chat/assets/64475363/c6108133-a918-48b0-ab1a-e3fa607572a4" />
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
||||
| `AUTH_GITHUB_ID` | 必选 | Github App详情页的 客户端 ID |
|
||||
| `AUTH_GITHUB_SECRET` | 必选 | Github App详情页的 客户端 Secret |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
||||
| `AUTH_GITHUB_ID` | 必选 | Github App 详情页的 客户端 ID |
|
||||
| `AUTH_GITHUB_SECRET` | 必选 | Github App 详情页的 客户端 Secret |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#github) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>部署成功后,用户将可以通过Github身份认证并使用 LobeChat。</Callout>
|
||||
<Callout type={'info'}>部署成功后,用户将可以通过 Github 身份认证并使用 LobeChat。</Callout>
|
||||
|
||||
@@ -31,52 +31,55 @@ If you are using Logto Cloud, assume its endpoint domain is `https://example.log
|
||||
<Steps>
|
||||
### Create Logto Application
|
||||
|
||||
Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name.
|
||||
Access your privately deployed Logto WebUI or [Logto Cloud](http://cloud.logto.io/) to enter the console, and create a `Next.js (App Router)` application under `Applications` with any name.
|
||||
|
||||
### Configure Logto
|
||||
### Configure Logto
|
||||
|
||||
Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`.
|
||||
Set the `Redirect URI` to `https://lobe.example.com/api/auth/callback/logto` and the `Post sign-out redirect URI` to `https://lobe.example.com/`.
|
||||
|
||||
Set `CORS allowed origins` to `https://lobe.example.com`.
|
||||
Set `CORS allowed origins` to `https://lobe.example.com`.
|
||||
|
||||
<Image
|
||||
alt="Configure Logto"
|
||||
inStep
|
||||
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
||||
/>
|
||||
<Image alt="Configure Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
||||
|
||||
After successful creation, save the `Client ID` and `Client Secret`.
|
||||
After successful creation, save the `Client ID` and `Client Secret`.
|
||||
|
||||
### Configure Environment Variables
|
||||
### Configure Webhook (Optional)
|
||||
|
||||
<Image
|
||||
alt="Configure Environment Variables"
|
||||
inStep
|
||||
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
||||
/>
|
||||
Configure the Logto Webhook so that LobeChat can receive notifications when user information is updated.
|
||||
|
||||
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
|
||||
Go to `Webhooks`, create a Webhook, and fill in the following fields:
|
||||
|
||||
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
||||
- Endpoint URL: `https://lobe.example.com/api/webhooks/logto`
|
||||
- Events: `User.Data.Updated`
|
||||
|
||||
- `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
|
||||
- `https://example.logto.app/oidc` if you are using Logto Cloud
|
||||
After successful creation, copy the Webhook's `Signing Key` and fill it in the `LOGTO_WEBHOOK_SIGNING_KEY` environment variable.
|
||||
|
||||
When deploying LobeChat, you need to configure the following environment variables:
|
||||
### Configure Environment Variables
|
||||
|
||||
| Environment Variable | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
|
||||
| `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
|
||||
| `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
|
||||
| `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
|
||||
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
|
||||
<Image alt="Configure Environment Variables" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
||||
|
||||
Set the obtained `Client ID` and `Client Secret` as `AUTH_LOGTO_ID` and `AUTH_LOGTO_SECRET` in the LobeChat environment variables.
|
||||
|
||||
Configure `AUTH_LOGTO_ISSUER` in the LobeChat environment variables as follows:
|
||||
|
||||
- `https://lobe-auth-api.example.com/oidc` if you are using a privately deployed Logto
|
||||
- `https://example.logto.app/oidc` if you are using Logto Cloud
|
||||
|
||||
When deploying LobeChat, you need to configure the following environment variables:
|
||||
|
||||
| Environment Variable | Type | Description |
|
||||
| --------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | Required | The key used to encrypt Auth.js session tokens. You can generate a key using the command: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | Required | Select the single sign-on provider for LobeChat. For Logto, enter `logto`. |
|
||||
| `AUTH_LOGTO_ID` | Required | The Client ID from the Logto App details page |
|
||||
| `AUTH_LOGTO_SECRET` | Required | The Client Secret from the Logto App details page |
|
||||
| `AUTH_LOGTO_ISSUER` | Required | OpenID Connect issuer of the Logto provider |
|
||||
| `NEXTAUTH_URL` | Required | This URL specifies the callback address for Auth.js during OAuth verification, needed only if the default generated redirect address is incorrect. `https://lobe.example.com/api/auth` |
|
||||
| `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
|
||||
@@ -84,22 +87,22 @@ When deploying LobeChat, you need to configure the following environment variabl
|
||||
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.
|
||||
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.
|
||||
Try using the `logto db seed --encrypt-base-role` command.
|
||||
|
||||
- Database seeding failed:
|
||||
Try skipping the seeding process with the `--skip-seed` parameter.
|
||||
Try skipping the seeding process with the `--skip-seed` parameter.
|
||||
|
||||
- `Error: role xxx already exists`:
|
||||
Delete the existing role in the database.
|
||||
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`).
|
||||
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`
|
||||
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.
|
||||
|
||||
@@ -28,52 +28,55 @@ tags:
|
||||
<Steps>
|
||||
### 创建 Logto 应用
|
||||
|
||||
访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
|
||||
访问你私有部署的 Logto WebUI 或者 [Logto Cloud](http://cloud.logto.io/) 进入控制台,在 `Applications` 里创建一个 `Next.js (App Router)` 应用,名称随意
|
||||
|
||||
### 配置 Logto
|
||||
### 配置 Logto
|
||||
|
||||
配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
|
||||
配置 `Redirect URI` 为 `https://lobe.example.com/api/auth/callback/logto`,`Post sign-out redirect URI` 为 `https://lobe.example.com/`
|
||||
|
||||
配置 `CORS allowed origins` 为 `https://lobe.example.com`
|
||||
配置 `CORS allowed origins` 为 `https://lobe.example.com`
|
||||
|
||||
<Image
|
||||
alt="配置 Logto"
|
||||
inStep
|
||||
src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523"
|
||||
/>
|
||||
<Image alt="配置 Logto" inStep src="https://github.com/user-attachments/assets/5b816379-c07b-40ea-bde4-df16e2e4e523" />
|
||||
|
||||
创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
|
||||
创建成功后, 将 `Client ID` 和 `Client Secret` 保存下来。
|
||||
|
||||
### 配置环境变量
|
||||
### 配置 Webhook (可选)
|
||||
|
||||
<Image
|
||||
alt="配置环境变量"
|
||||
inStep
|
||||
src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837"
|
||||
/>
|
||||
配置 Logto 的 Webhook,以便在用户信息更新时 LobeChat 可以接收到通知。
|
||||
|
||||
将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
|
||||
前往 `Webhooks` ,创建一个 Webhook,填写以下字段:
|
||||
|
||||
配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
|
||||
- 端点 URL: `https://lobe.example.com/api/webhooks/logto`
|
||||
- 事件: `User.Data.Updated`
|
||||
|
||||
- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
|
||||
- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
|
||||
创建成功后,复制 Webhook 的 `签名密钥`。填写到环境变量中的 `LOGTO_WEBHOOK_SIGNING_KEY`。
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
### 配置环境变量
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 |
|
||||
| `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID |
|
||||
| `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret |
|
||||
| `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
||||
<Image alt="配置环境变量" inStep src="https://github.com/user-attachments/assets/15af6d94-af4f-4aa9-bbab-7a46e9f9e837" />
|
||||
|
||||
将获取到的 `Client ID` 和 `Client Secret`,设为 LobeChat 环境变量中的 `AUTH_LOGTO_ID` 和 `AUTH_LOGTO_SECRET`。
|
||||
|
||||
配置 LobeChat 环境变量中 `AUTH_LOGTO_ISSUER` 为:
|
||||
|
||||
- `https://lobe-auth-api.example.com/oidc`,若你是私有部署的 Logto
|
||||
- `https://example.logto.app/oidc`,若你是使用的 Logto Cloud
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --------------------------- | -- | ------------------------------------------------------------------------------------------------ |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Logto 请填写 `logto`。 |
|
||||
| `AUTH_LOGTO_ID` | 必选 | Logto App 详情页的 Client ID |
|
||||
| `AUTH_LOGTO_SECRET` | 必选 | Logto App 详情页的 Client Secret |
|
||||
| `AUTH_LOGTO_ISSUER` | 必选 | Logto 提供程序的 OpenID Connect 颁发者 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://lobe.example.com/api/auth` |
|
||||
| `LOGTO_WEBHOOK_SIGNING_KEY` | 可选 | 用于验证 Logto 发送的 Webhook 请求是否合法的密钥。 |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#logto) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
### 故障排除
|
||||
@@ -81,21 +84,21 @@ tags:
|
||||
若你在部署 Logto 过程中遇到问题,可以参考以下常见问题:
|
||||
|
||||
- `Only roles with the xxx attribute may create roles`:
|
||||
请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
|
||||
请检查你的数据库用户权限,确保你的 Logto 数据库中的用户具有 `admin` 角色,以便创建角色。
|
||||
|
||||
- 在第三方数据库例如 `Neon` 上执行`logto db seed`出错:
|
||||
尝试使用`logto db seed --encrypt-base-role`命令。
|
||||
尝试使用`logto db seed --encrypt-base-role`命令。
|
||||
|
||||
- 数据库播种失败:
|
||||
请尝试使用`--skip-seed`参数跳过播种。
|
||||
请尝试使用`--skip-seed`参数跳过播种。
|
||||
|
||||
- `Error: role xxx already exists`:
|
||||
在数据库中删除已存在的角色即可。
|
||||
在数据库中删除已存在的角色即可。
|
||||
|
||||
- 版本升级后,数据库迁移失败:
|
||||
请尝试使用` npx @logto/cli db alteration deploy $version`命令(例如`npx @logto/cli db alteration deploy 1.22.0`)
|
||||
请尝试使用` npx @logto/cli db alteration deploy $version`命令 (例如`npx @logto/cli db alteration deploy 1.22.0`)
|
||||
|
||||
- 我使用 docker 部署 希望一键升级:
|
||||
在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
||||
在容器中执行自定义命令:`sh -c "npm run cli db seed -- --swe --encrypt-base-role" && npx @logto/cli db alteration deploy $version && npm start`
|
||||
|
||||
<Callout type={'info'}>部署成功后,用户将可以通过 Logto 身份认证并使用 LobeChat。</Callout>
|
||||
|
||||
@@ -18,72 +18,59 @@ tags:
|
||||
<Steps>
|
||||
### Create a Microsoft Entra ID Application
|
||||
|
||||
In your [Microsoft Azure Portal][microsoft-azure-portal], go to Microsoft Entra ID -> App registrations -> New registration to create a new application.
|
||||
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:
|
||||
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/microsoft-entra-id
|
||||
```
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/microsoft-entra-id
|
||||
```
|
||||
|
||||
<Callout type={'info'}>
|
||||
- You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter
|
||||
matches the deployed URL. - Please replace "your-domain" with your own domain.
|
||||
</Callout>
|
||||
<Callout type={'info'}>
|
||||
- You can fill in or modify the Redirect URIs after registering, but make sure the URL you enter
|
||||
matches the deployed URL. - Please replace "your-domain" with your own domain.
|
||||
</Callout>
|
||||
|
||||
<Image
|
||||
alt="App Register"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d"
|
||||
/>
|
||||
<Image alt="App Register" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d" />
|
||||
|
||||
Click on "Register".
|
||||
Click on "Register".
|
||||
|
||||
After successfully creating the application, click on the corresponding application to enter the application details page, and switch to the "Overview" tab to view the corresponding configuration information.
|
||||
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.
|
||||
|
||||
<Image
|
||||
alt="App Overview"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a"
|
||||
/>
|
||||
<Image alt="App Overview" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a" />
|
||||
|
||||
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.
|
||||
|
||||
<Image
|
||||
alt="Create App Client Secret"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2"
|
||||
/>
|
||||
<Image alt="Create App Client Secret" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2" />
|
||||
|
||||
<Callout type={'important'}>
|
||||
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
|
||||
variables.
|
||||
</Callout>
|
||||
| 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
|
||||
variables.
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout>
|
||||
|
||||
@@ -17,68 +17,55 @@ tags:
|
||||
<Steps>
|
||||
### 创建 Microsoft Entra ID 应用
|
||||
|
||||
在你的 [Microsoft Azure Portal][microsoft-azure-portal] 进入 Microsoft Entra ID -> App registrations -> New registration 创建一个新的应用。
|
||||
在你的 [Microsoft Azure Portal][microsoft-azure-portal] 进入 Microsoft Entra ID -> App registrations -> New registration 创建一个新的应用。
|
||||
|
||||
填写你想向组织用户显示的应用名称,选择你期望支持的账户类型,如果只支持内部用户请选择 `Accounts in this organizational directory only (Default Directory only - Single tenant)`。
|
||||
填写你想向组织用户显示的应用名称,选择你期望支持的账户类型,如果只支持内部用户请选择 `Accounts in this organizational directory only (Default Directory only - Single tenant)`。
|
||||
|
||||
在 `Redirect URI (optional)` 中,应用类型选择 `Web`,Callback URL, 处填写:
|
||||
在 `Redirect URI (optional)` 中,应用类型选择 `Web`,Callback URL, 处填写:
|
||||
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/microsoft-entra-id
|
||||
```
|
||||
```bash
|
||||
https://your-domain/api/auth/callback/microsoft-entra-id
|
||||
```
|
||||
|
||||
<Callout type={'info'}>
|
||||
- 可以在 Register 后再填写或修改 Redirect URIs,但是务必保证填写的 URL 与部署的 URL 一致。 -
|
||||
your-domain 请填写自己的域名
|
||||
</Callout>
|
||||
<Callout type={'info'}>
|
||||
- 可以在 Register 后再填写或修改 Redirect URIs,但是务必保证填写的 URL 与部署的 URL 一致。 -
|
||||
your-domain 请填写自己的域名
|
||||
</Callout>
|
||||
|
||||
<Image
|
||||
alt="App Register"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d"
|
||||
/>
|
||||
<Image alt="App Register" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/4f9d83bd-b3fc-4abc-bcf4-ccbad65c219d" />
|
||||
|
||||
点击「Register」
|
||||
点击「Register」
|
||||
|
||||
创建成功后,点击相应的应用,进入应用详情页,切换到「Overview」标签页,就可以看到相应的配置信息。
|
||||
创建成功后,点击相应的应用,进入应用详情页,切换到「Overview」标签页,就可以看到相应的配置信息。
|
||||
|
||||
<Image
|
||||
alt="App Overview"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a"
|
||||
/>
|
||||
<Image alt="App Overview" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/48a0b702-05bd-4ce4-a007-a8ad00a36e5a" />
|
||||
|
||||
进入「Certificates & secrets」,选择「Client secrets」标签,点击「New client secret」,填写描述,选择过期时间,点击「Add」,创建一个新的客户端密钥。
|
||||
进入「Certificates & secrets」,选择「Client secrets」标签,点击「New client secret」,填写描述,选择过期时间,点击「Add」,创建一个新的客户端密钥。
|
||||
|
||||
<Image
|
||||
alt="Create App Client Secret"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2"
|
||||
/>
|
||||
<Image alt="Create App Client Secret" inStep src="https://github.com/lobehub/lobe-chat/assets/13883964/c9d66fa0-158c-4bd3-a1fa-969e638259d2" />
|
||||
|
||||
<Callout type={'important'}>请务必保存好你的客户端密钥,因为这是你唯一的机会查看它。</Callout>
|
||||
<Callout type={'important'}>请务必保存好你的客户端密钥,因为这是你唯一的机会查看它。</Callout>
|
||||
|
||||
### 新增用户
|
||||
### 新增用户
|
||||
|
||||
回到「Microsoft Entra ID」界面,进入「Users」,点击「New user」,填写用户信息,点击「Create」,创建用户以使用 LobeChat。
|
||||
回到「Microsoft Entra ID」界面,进入「Users」,点击「New user」,填写用户信息,点击「Create」,创建用户以使用 LobeChat。
|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Microsoft Entra ID 请填写 `microsoft-entra-id`。 |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_ID` | 必选 | Microsoft Entra ID 应用程序的 Client ID |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | 必选 | Microsoft Entra ID 应用程序的 Client Secret |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | 必选 | Microsoft Entra ID 应用程序的 Tenant ID |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ----------------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Microsoft Entra ID 请填写 `microsoft-entra-id`。 |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_ID` | 必选 | Microsoft Entra ID 应用程序的 Client ID |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_SECRET` | 必选 | Microsoft Entra ID 应用程序的 Client Secret |
|
||||
| `AUTH_MICROSOFT_ENTRA_ID_TENANT_ID` | 必选 | Microsoft Entra ID 应用程序的 Tenant ID |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variable#microsoft-entra-id) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -18,28 +18,27 @@ tags:
|
||||
<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.
|
||||
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.
|
||||
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.
|
||||
After successful creation, click "Application Details" to obtain the AppID and AppSecret.
|
||||
|
||||
### 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 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` |
|
||||
| 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. |
|
||||
| `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>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
@@ -11,33 +11,32 @@ tags:
|
||||
|
||||
# 配置微信身份验证服务
|
||||
|
||||
##微信配置流程
|
||||
\## 微信配置流程
|
||||
|
||||
<Steps>
|
||||
### 创建微信网站应用
|
||||
|
||||
点击 [这里](https://open.weixin.qq.com/cgi-bin/index) 依次点击“管理中心”、“网站应用”、“创建网站应用”
|
||||
点击 [这里](https://open.weixin.qq.com/cgi-bin/index) 依次点击 “管理中心”、“网站应用”、“创建网站应用”
|
||||
|
||||
按照管网提示要求填写信息并提交审核。
|
||||
按照管网提示要求填写信息并提交审核。
|
||||
|
||||
创建成功后,点击“应用详情”,可获知AppID和AppSecret。
|
||||
创建成功后,点击 “应用详情”,可获知 AppID 和 AppSecret。
|
||||
|
||||
### 配置环境变量
|
||||
### 配置环境变量
|
||||
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
在部署 LobeChat 时,你需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
||||
| `WECHAT_CLIENT_ID` | 必选 |微信网站应用详情页的 客户端 ID |
|
||||
| `WECHAT_CLIENT_SECRET` | 必选 |微信网站应用详情页的 客户端 Secret |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ------------------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成秘钥: `openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 选择 LoboChat 的单点登录提供商。使用 Github 请填写 `github`。 |
|
||||
| `WECHAT_CLIENT_ID` | 必选 | 微信网站应用详情页的 客户端 ID |
|
||||
| `WECHAT_CLIENT_SECRET` | 必选 | 微信网站应用详情页的 客户端 Secret |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 在执行 OAuth 验证时的回调地址,当默认生成的重定向地址发生不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
前往 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#wechat) 可查阅相关变量详情。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout type={'info'}>部署成功后,用户将可以通过微信开放平台身份认证并使用 LobeChat。</Callout>
|
||||
|
||||
@@ -17,99 +17,65 @@ tags:
|
||||
<Steps>
|
||||
### Create ZITADEL Application
|
||||
|
||||
Log in to the console of your ZITADEL instance using an account with at least a [`Project Owner` role](https://zitadel.com/docs/guides/manage/console/managers#roles), navigate to (or [create](https://zitadel.com/docs/guides/manage/console/projects#create-a-project)) the project you'd like to host your application in, and click the **New** button to create an application.
|
||||
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.
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S1"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/b05473ad-04a6-4ebc-9810-116c778d4448"
|
||||
/>
|
||||
<Image alt="Create ZITADEL Application S1" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/b05473ad-04a6-4ebc-9810-116c778d4448" />
|
||||
|
||||
Fill in the name, choose **Web** as the application type, and click **Continue**.
|
||||
Fill in the name, choose **Web** as the application type, and click **Continue**.
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S2"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/5a0e6c58-9e6f-4ffb-8af2-32e48cfb45b0"
|
||||
/>
|
||||
<Image alt="Create ZITADEL Application S2" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/5a0e6c58-9e6f-4ffb-8af2-32e48cfb45b0" />
|
||||
|
||||
Choose **Code** as the authentication method.
|
||||
Choose **Code** as the authentication method.
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S3"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/14ecaa12-74a1-4e2f-b171-9d9ac09d3d63"
|
||||
/>
|
||||
<Image alt="Create ZITADEL Application S3" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/14ecaa12-74a1-4e2f-b171-9d9ac09d3d63" />
|
||||
|
||||
In the **Redirect URIs** field, fill in:
|
||||
In the **Redirect URIs** field, fill in:
|
||||
|
||||
```
|
||||
http(s)://your-domain/api/auth/callback/zitadel
|
||||
```
|
||||
```
|
||||
http(s)://your-domain/api/auth/callback/zitadel
|
||||
```
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S4"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/4ff3c3a0-9ca0-45ff-8f3a-219f4445098b"
|
||||
/>
|
||||
<Image alt="Create ZITADEL Application S4" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/4ff3c3a0-9ca0-45ff-8f3a-219f4445098b" />
|
||||
|
||||
<Callout type={'important'}>
|
||||
- You can fill in or modify redirect URIs after creating the application, but make sure the filled
|
||||
URL is consistent with the deployed URL.
|
||||
<Callout type={'important'}>
|
||||
- You can fill in or modify redirect URIs after creating the application, but make sure the filled
|
||||
URL is consistent with the deployed URL.
|
||||
|
||||
- Replace `http(s)://your-domain` with the actual URL that LobeChat is deployed to.
|
||||
- Replace `http(s)://your-domain` with the actual URL that LobeChat is deployed to.
|
||||
</Callout>
|
||||
|
||||
</Callout>
|
||||
Confirm the configuration and click **Create**.
|
||||
|
||||
Confirm the configuration and click **Create**.
|
||||
<Image alt="Create ZITADEL Application S5" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/bee24764-aa42-47d9-ad43-bcb8e7b35bc3" />
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S5"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/bee24764-aa42-47d9-ad43-bcb8e7b35bc3"
|
||||
/>
|
||||
Save the **ClientId** and **ClientSecret** for later use.
|
||||
|
||||
Save the **ClientId** and **ClientSecret** for later use.
|
||||
<Image alt="Create ZITADEL Application S6" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/407b4eed-7f21-4aa6-b68f-9bae2faf09d0" />
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S6"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/407b4eed-7f21-4aa6-b68f-9bae2faf09d0"
|
||||
/>
|
||||
In the application settings page, navigate to the **Token Settings** tab, enable **User Info inside ID Token** option, and click **Save**.
|
||||
|
||||
In the application settings page, navigate to the **Token Settings** tab, enable **User Info inside ID Token** option, and click **Save**.
|
||||
<Image alt="Create ZITADEL Application S7" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/d84235b1-45f6-447d-bdd9-58ab9527dc9b" />
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S7"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/d84235b1-45f6-447d-bdd9-58ab9527dc9b"
|
||||
/>
|
||||
Navigate to the **URLs** tab, and save the **issuer** URL.
|
||||
|
||||
Navigate to the **URLs** tab, and save the **issuer** URL.
|
||||
<Image alt="Create ZITADEL Application S8" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/d12a2661-7b98-484f-8f3d-07e84d42ae08" />
|
||||
|
||||
<Image
|
||||
alt="Create ZITADEL Application S8"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/d12a2661-7b98-484f-8f3d-07e84d42ae08"
|
||||
/>
|
||||
### 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 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` |
|
||||
| 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` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
You can refer to the related variable details at [📘Environment Variables](/docs/self-hosting/environment-variables/auth#zitadel).
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout>
|
||||
|
||||
@@ -14,98 +14,64 @@ tags:
|
||||
<Steps>
|
||||
### 创建 ZITADEL 应用
|
||||
|
||||
使用具有 [`Project Owner` 角色](https://zitadel.com/docs/guides/manage/console/managers#roles)的账户登录到 ZITADEL 实例控制台,进入(或[创建](https://zitadel.com/docs/guides/manage/console/projects#create-a-project))该应用所属的项目,点击「创建」按钮创建应用。
|
||||
使用具有 [`Project Owner` 角色](https://zitadel.com/docs/guides/manage/console/managers#roles)的账户登录到 ZITADEL 实例控制台,进入(或[创建](https://zitadel.com/docs/guides/manage/console/projects#create-a-project))该应用所属的项目,点击「创建」按钮创建应用。
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 1"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/3564110d-bef9-47f3-b775-e5f28b4275b2"
|
||||
/>
|
||||
<Image alt="创建 ZITADEL 应用 1" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/3564110d-bef9-47f3-b775-e5f28b4275b2" />
|
||||
|
||||
填写应用名称,应用类型选择「Web」,点击「继续」。
|
||||
填写应用名称,应用类型选择「Web」,点击「继续」。
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 2"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/12451b47-8dcd-40a9-b18d-2806b07efecc"
|
||||
/>
|
||||
<Image alt="创建 ZITADEL 应用 2" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/12451b47-8dcd-40a9-b18d-2806b07efecc" />
|
||||
|
||||
选择「Code」作为身份验证方式。
|
||||
选择「Code」作为身份验证方式。
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 3"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/9d5cb651-ad10-47c7-8c8b-2256163c5521"
|
||||
/>
|
||||
<Image alt="创建 ZITADEL 应用 3" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/9d5cb651-ad10-47c7-8c8b-2256163c5521" />
|
||||
|
||||
在「重定向 URLs」字段中填写:
|
||||
在「重定向 URLs」字段中填写:
|
||||
|
||||
```
|
||||
http(s)://your-domain/api/auth/callback/zitadel
|
||||
```
|
||||
```
|
||||
http(s)://your-domain/api/auth/callback/zitadel
|
||||
```
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 4"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/1699bf46-0c8d-4238-9eb5-34282bfe529a"
|
||||
/>
|
||||
<Image alt="创建 ZITADEL 应用 4" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/1699bf46-0c8d-4238-9eb5-34282bfe529a" />
|
||||
|
||||
<Callout type={'important'}>
|
||||
- 可以创建应用后再填写或修改重定向 URL,但请确保填写的 URL 与部署的 URL 一致。
|
||||
<Callout type={'important'}>
|
||||
- 可以创建应用后再填写或修改重定向 URL,但请确保填写的 URL 与部署的 URL 一致。
|
||||
|
||||
- 请将 `http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。
|
||||
- 请将 `http(s)://your-domain` 替换为 LobeChat 部署的实际 URL。
|
||||
</Callout>
|
||||
|
||||
</Callout>
|
||||
确认配置并点击「创建」。
|
||||
|
||||
确认配置并点击「创建」。
|
||||
<Image alt="创建 ZITADEL 应用 5" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/375b3d73-6796-465c-9063-f2762093f763" />
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 5"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/375b3d73-6796-465c-9063-f2762093f763"
|
||||
/>
|
||||
记录下「ClientId」和「ClientSecret」备用。
|
||||
|
||||
记录下「ClientId」和「ClientSecret」备用。
|
||||
<Image alt="创建 ZITADEL 应用 6" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/40bb6b4c-18e0-4ae5-abae-ae0cf202cf08" />
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 6"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/40bb6b4c-18e0-4ae5-abae-ae0cf202cf08"
|
||||
/>
|
||||
在应用设置页面中,切换到「令牌设置」选项卡,勾选「在 ID Token 中包含用户信息」选项,点击「保存」。
|
||||
|
||||
在应用设置页面中,切换到「令牌设置」选项卡,勾选「在 ID Token 中包含用户信息」选项,点击「保存」。
|
||||
<Image alt="创建 ZITADEL 应用 7" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/20a257b5-d086-46f3-b5c2-f76394b11f55" />
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 7"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/20a257b5-d086-46f3-b5c2-f76394b11f55"
|
||||
/>
|
||||
切换到「URLs」选项卡,记录下「issuer」URL。
|
||||
|
||||
切换到「URLs」选项卡,记录下「issuer」URL。
|
||||
<Image alt="创建 ZITADEL 应用 8" inStep src="https://github.com/lobehub/lobe-chat/assets/8692892/79c55d44-8dcb-429c-a072-d3eb014bbceb" />
|
||||
|
||||
<Image
|
||||
alt="创建 ZITADEL 应用 8"
|
||||
inStep
|
||||
src="https://github.com/lobehub/lobe-chat/assets/8692892/79c55d44-8dcb-429c-a072-d3eb014bbceb"
|
||||
/>
|
||||
### 配置环境变量
|
||||
|
||||
### 配置环境变量
|
||||
部署 LobeChat 时,您需要配置以下环境变量:
|
||||
|
||||
部署 LobeChat 时,您需要配置以下环境变量:
|
||||
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| --- | --- | --- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成密钥:`openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 为 LobeChat 选择单点登录提供程序。对于 ZITADEL,请填写 `zitadel`。 |
|
||||
| `AUTH_ZITADEL_ID` | 必选 | ZITADEL 应用的 Client ID(`ClientId`)。 |
|
||||
| `AUTH_ZITADEL_SECRET` | 必选 | ZITADEL 应用的 Client Secret(`ClientSecret`)。 |
|
||||
| `AUTH_ZITADEL_ISSUER` | 必选 | ZITADEL 应用的 OpenID Connect 颁发者(issuer)URL。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 中执行 OAuth 认证的回调地址。仅当默认地址不正确时才需要设置。`https://example.com/api/auth` |
|
||||
| 环境变量 | 类型 | 描述 |
|
||||
| ------------------------- | -- | ----------------------------------------------------------------------------------- |
|
||||
| `NEXT_AUTH_SECRET` | 必选 | 用于加密 Auth.js 会话令牌的密钥。您可以使用以下命令生成密钥:`openssl rand -base64 32` |
|
||||
| `NEXT_AUTH_SSO_PROVIDERS` | 必选 | 为 LobeChat 选择单点登录提供程序。对于 ZITADEL,请填写 `zitadel`。 |
|
||||
| `AUTH_ZITADEL_ID` | 必选 | ZITADEL 应用的 Client ID(`ClientId`)。 |
|
||||
| `AUTH_ZITADEL_SECRET` | 必选 | ZITADEL 应用的 Client Secret(`ClientSecret`)。 |
|
||||
| `AUTH_ZITADEL_ISSUER` | 必选 | ZITADEL 应用的 OpenID Connect 颁发者(issuer)URL。 |
|
||||
| `NEXTAUTH_URL` | 必选 | 该 URL 用于指定 Auth.js 中执行 OAuth 认证的回调地址。仅当默认地址不正确时才需要设置。`https://example.com/api/auth` |
|
||||
|
||||
<Callout type={'tip'}>
|
||||
您可以在 [📘 环境变量](/zh/docs/self-hosting/environment-variables/auth#zitadel) 中查看相关变量的详细信息。
|
||||
|
||||
</Callout>
|
||||
</Callout>
|
||||
</Steps>
|
||||
|
||||
<Callout>部署成功后,用户将能够通过 ZITADEL 中配置的用户进行身份验证并使用 LobeChat。</Callout>
|
||||
|
||||
@@ -28,20 +28,20 @@ tags:
|
||||
关键字,你需要手动控制所有的功能标志(否则它们会采用对应的默认值)。
|
||||
</Callout>
|
||||
|
||||
| 配置项 | 解释 | 默认值 |
|
||||
| ------------------------- | -------------------------------- | ------ |
|
||||
| `webrtc_sync` | 启用 WebRTC 同步功能。 | 关闭 |
|
||||
| `language_model_settings` | 启用语言模型设置。 | 开启 |
|
||||
| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |
|
||||
| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |
|
||||
| `create_session` | 允许用户创建会话。 | 开启 |
|
||||
| `edit_agent` | 允许用户编辑助手。 | 开启 |
|
||||
| `dalle` | 启用 DALL-E 功能。 | 开启 |
|
||||
| `check_updates` | 允许检查更新。 | 开启 |
|
||||
| `welcome_suggest` | 显示欢迎建议。 | 开启 |
|
||||
| `market` | 启用助手市场功能。 | 开启 |
|
||||
| `speech_to_text` | 启用语音转文本功能。 | 开启 |
|
||||
| `knowledge_base` | 启用知识库功能。 | 开启 |
|
||||
| `clerk_sign_up` | 启用Clerk注册功能。 | 开启 |
|
||||
| 配置项 | 解释 | 默认值 |
|
||||
| ------------------------- | ----------------------- | --- |
|
||||
| `webrtc_sync` | 启用 WebRTC 同步功能。 | 关闭 |
|
||||
| `language_model_settings` | 启用语言模型设置。 | 开启 |
|
||||
| `openai_api_key` | 允许用户自定义 OpenAI API Key。 | 开启 |
|
||||
| `openai_proxy_url` | 允许用户自定义 OpenAI 代理 URL。 | 开启 |
|
||||
| `create_session` | 允许用户创建会话。 | 开启 |
|
||||
| `edit_agent` | 允许用户编辑助手。 | 开启 |
|
||||
| `dalle` | 启用 DALL-E 功能。 | 开启 |
|
||||
| `check_updates` | 允许检查更新。 | 开启 |
|
||||
| `welcome_suggest` | 显示欢迎建议。 | 开启 |
|
||||
| `market` | 启用助手市场功能。 | 开启 |
|
||||
| `speech_to_text` | 启用语音转文本功能。 | 开启 |
|
||||
| `knowledge_base` | 启用知识库功能。 | 开启 |
|
||||
| `clerk_sign_up` | 启用 Clerk 注册功能。 | 开启 |
|
||||
|
||||
你可以随时检查 [featureFlags](https://github.com/lobehub/lobe-chat/blob/main/src/config/featureFlags/schema.ts) 以获取最新的特性标志列表。
|
||||
|
||||
@@ -1,3 +1,16 @@
|
||||
---
|
||||
title: LobeChat Knowledge Base / File Upload
|
||||
description: >-
|
||||
Explore LobeChat's file upload and knowledge base management features with
|
||||
core components.
|
||||
tags:
|
||||
- LobeChat
|
||||
- File Upload
|
||||
- Knowledge Base
|
||||
- PostgreSQL
|
||||
- OpenAI Embedding
|
||||
---
|
||||
|
||||
# Knowledge Base / File Upload
|
||||
|
||||
LobeChat supports file upload and knowledge base management. This feature relies on the following core technical components. Understanding these components will help you successfully deploy and maintain the knowledge base system.
|
||||
@@ -32,9 +45,7 @@ S3 (or S3-compatible storage services) is used for storing uploaded files.
|
||||
OpenAI's Embedding service is used to convert text into vector representations.
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
LobeChat currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key has access to this model.
|
||||
|
||||
LobeChat currently uses OpenAI's `text-embedding-3-small` model by default. Ensure your API Key has access to this model.
|
||||
</Callout>
|
||||
|
||||
- **Purpose**: Generate vector representations for semantic search
|
||||
@@ -51,3 +62,13 @@ Unstructured.io is a powerful document processing tool.
|
||||
- **Note**: Evaluate processing needs based on document complexity
|
||||
|
||||
By correctly configuring and integrating these core components, you can build a powerful and efficient knowledge base system for LobeChat. Each component plays a crucial role in the overall architecture, supporting advanced document management and intelligent retrieval functions.
|
||||
|
||||
### 5. Custom Embedding
|
||||
|
||||
- **Purpose**: Use different Embedding generate vector representations for semantic search
|
||||
- **Options**: support model provider list: zhipu/github/openai/bedrock/ollama
|
||||
- **Deployment Tip**: Used to configure the default Embedding model
|
||||
|
||||
```
|
||||
environment: DEFAULT_FILES_CONFIG=embedding_model=openai/embedding-text-3-small
|
||||
```
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
---
|
||||
title: LobeChat 知识库 / 文件上传
|
||||
description: 了解 LobeChat 的文件上传和知识库管理核心组件,助力成功部署。
|
||||
tags:
|
||||
- LobeChat
|
||||
- 文件上传
|
||||
- 知识库管理
|
||||
- PostgreSQL
|
||||
- OpenAI
|
||||
---
|
||||
|
||||
# 知识库 / 文件上传
|
||||
|
||||
LobeChat 支持文件上传 / 知识库管理。该功能依赖于以下核心技术组件,了解这些组件将有助于你成功部署和维护知识库系统。
|
||||
@@ -32,9 +43,7 @@ S3(或兼容 S3 协议的存储服务)用于存储上传的文件。
|
||||
OpenAI 的嵌入(Embedding)服务用于将文本转化为向量表示。
|
||||
|
||||
<Callout type={'info'}>
|
||||
|
||||
LobeChat 当前默认使用 OpenAI `text-embedding-3-small` 模型,请确保你的 API Key 可以访问该模型。
|
||||
|
||||
LobeChat 当前默认使用 OpenAI `text-embedding-3-small` 模型,请确保你的 API Key 可以访问该模型。
|
||||
</Callout>
|
||||
|
||||
- **用途**:生成文本的向量表示,用于语义搜索
|
||||
@@ -51,3 +60,13 @@ Unstructured.io 是一个强大的文档处理工具。
|
||||
- **注意事项**:评估处理需求,根据文档复杂度决定是否部署
|
||||
|
||||
通过正确配置和集成这些核心组件,您可以为 LobeChat 构建一个强大、高效的知识库系统。每个组件都在整体架构中扮演着关键角色,共同支持高级的文档管理和智能检索功能。
|
||||
|
||||
### 5. 自定义 Embedding(可选)
|
||||
|
||||
- **用途**: 使用不同的嵌入模型(Embedding)生成文本的向量表示,用于语义搜索
|
||||
- **选项**: 支持的模型提供商:zhipu/github/openai/bedrock/ollama
|
||||
- **部署建议**: 使用环境变量配置默认嵌入模型
|
||||
|
||||
```
|
||||
environment: DEFAULT_FILES_CONFIG=embedding_model=openai/embedding-text-3-small
|
||||
```
|
||||
|
||||
@@ -17,7 +17,7 @@ LobeChat supports customizing the model list during deployment. This configurati
|
||||
You can use `+` to add a model, `-` to hide a model, and use `model name=display name<extension configuration>` to customize the display name of a model, separated by English commas. The basic syntax is as follows:
|
||||
|
||||
```text
|
||||
id=displayName<maxToken:vision:fc:file>,model2,model3
|
||||
id=displayName<maxToken:vision:reasoning:search:fc:file>,model2,model3
|
||||
```
|
||||
|
||||
For example: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
|
||||
@@ -29,7 +29,7 @@ In the above example, it adds `qwen-7b-chat` and `glm-6b` to the model list, rem
|
||||
Considering the diversity of model capabilities, we started to add extension configuration in version `0.147.8`, with the following rules:
|
||||
|
||||
```shell
|
||||
id=displayName<maxToken:vision:fc:file>
|
||||
id=displayName<maxToken:vision:reasoning:search:fc:file>
|
||||
```
|
||||
|
||||
The first value in angle brackets is designated as the `maxToken` for this model. The second value and beyond are the model's extension capabilities, separated by colons `:`, and the order is not important.
|
||||
@@ -39,12 +39,16 @@ Examples are as follows:
|
||||
- `chatglm-6b=ChatGLM 6B<4096>`: ChatGLM 6B, maximum context of 4k, no advanced capabilities;
|
||||
- `spark-v3.5=讯飞星火 v3.5<8192:fc>`: Xunfei Spark 3.5 model, maximum context of 8k, supports Function Call;
|
||||
- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`: Google Vision model, maximum context of 16k, supports image recognition;
|
||||
- `o3-mini=OpenAI o3-mini<200000:reasoning:fc>`: OpenAI o3-mini model, maximum context of 200k, supports reasoning and Function Call;
|
||||
- `qwen-max-latest=Qwen Max<32768:search:fc>`: Qwen 2.5 Max model, maximum context of 32k, supports web search and Function Call;
|
||||
- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`, hacked version of ChatGPT Plus web, context of 128k, supports image recognition, Function Call, file upload.
|
||||
|
||||
Currently supported extension capabilities are:
|
||||
|
||||
| --- | Description |
|
||||
| -------- | -------------------------------------------------------- |
|
||||
| `fc` | Function Calling |
|
||||
| `vision` | Image Recognition |
|
||||
| `file` | File Upload (a bit hacky, not recommended for daily use) |
|
||||
| --- | Description |
|
||||
| ----------- | -------------------------------------------------------- |
|
||||
| `fc` | Function Calling |
|
||||
| `vision` | Image Recognition |
|
||||
| `reasoning` | Support Reasoning |
|
||||
| `search` | Support Web Search |
|
||||
| `file` | File Upload (a bit hacky, not recommended for daily use) |
|
||||
|
||||
@@ -16,7 +16,7 @@ LobeChat 支持在部署时自定义模型列表,详情请参考 [模型提供
|
||||
你可以使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。通过 `<>` 来添加扩展配置。基本语法如下:
|
||||
|
||||
```text
|
||||
id=displayName<maxToken:vision:fc:file>,model2,model3
|
||||
id=displayName<maxToken:vision:reasoning:search:fc:file>,model2,model3
|
||||
```
|
||||
|
||||
例如: `+qwen-7b-chat,+glm-6b,-gpt-3.5-turbo,gpt-4-0125-preview=gpt-4-turbo`
|
||||
@@ -28,7 +28,7 @@ id=displayName<maxToken:vision:fc:file>,model2,model3
|
||||
考虑到模型的能力多样性,我们在 `0.147.8` 版本开始增加扩展性配置,它的规则如下:
|
||||
|
||||
```shell
|
||||
id=displayName<maxToken:vision:fc:file>
|
||||
id=displayName<maxToken:vision:reasoning:search:fc:file>
|
||||
```
|
||||
|
||||
尖括号第一个值约定为这个模型的 `maxToken` 。第二个及以后作为模型的扩展能力,能力与能力之间用冒号 `:` 作为分隔符,顺序不重要。
|
||||
@@ -38,12 +38,16 @@ id=displayName<maxToken:vision:fc:file>
|
||||
- `chatglm-6b=ChatGLM 6B<4096>`:ChatGLM 6B,最大上下文 4k,没有高阶能力;
|
||||
- `spark-v3.5=讯飞星火 v3.5<8192:fc>`:讯飞星火 3.5 模型,最大上下文 8k,支持 Function Call;
|
||||
- `gemini-1.5-flash-latest=Gemini 1.5 Flash<16000:vision>`:Google 视觉模型,最大上下文 16k,支持图像识别;
|
||||
- `o3-mini=OpenAI o3-mini<200000:reasoning:fc>`:OpenAI o3-mini 模型,最大上下文 200k,支持推理及 Function Call;
|
||||
- `qwen-max-latest=Qwen Max<32768:search:fc>`:通义千问 2.5 Max 模型,最大上下文 32k,支持联网搜索及 Function Call;
|
||||
- `gpt-4-all=ChatGPT Plus<128000:fc:vision:file>`,hack 的 ChatGPT Plus 网页版,上下 128k ,支持图像识别、Function Call、文件上传
|
||||
|
||||
目前支持的扩展能力有:
|
||||
|
||||
| --- | 描述 |
|
||||
| -------- | ------------------------------------ |
|
||||
| `fc` | 函数调用(function calling) |
|
||||
| `vision` | 视觉识别 |
|
||||
| `file` | 文件上传(比较hack,不建议日常使用) |
|
||||
| --- | 描述 |
|
||||
| ----------- | ---------------------- |
|
||||
| `fc` | 函数调用(function calling) |
|
||||
| `vision` | 视觉识别 |
|
||||
| `reasoning` | 支持推理 |
|
||||
| `search` | 支持联网搜索 |
|
||||
| `file` | 文件上传(比较 hack,不建议日常使用) |
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
---
|
||||
title: Observability and Tracing for LobeChat
|
||||
description: >-
|
||||
Enhance your LobeChat applications with open-source observability and tracing
|
||||
using Langfuse. Automatically capture detailed traces and metrics for every
|
||||
request to optimize and debug your chats.
|
||||
tags:
|
||||
- Observability
|
||||
- Tracing
|
||||
- Langfuse
|
||||
---
|
||||
|
||||
# Monitor your LobeChat application with Langfuse
|
||||
|
||||
## What is Langfuse?
|
||||
|
||||
[Langfuse](https://langfuse.com/) an **open-source LLM Observability platform**. By enabling the Langfuse integration, you can trace your application data to develop, monitor, and improve the use of LobeChat, including:
|
||||
|
||||
- Application [traces](https://langfuse.com/docs/tracing)
|
||||
- Usage patterns
|
||||
- Cost data by user and model
|
||||
- [Evaluations](https://langfuse.com/docs/scores/overview)
|
||||
|
||||
## Get Started
|
||||
|
||||
<Steps>
|
||||
### Set up Langfuse
|
||||
|
||||
Get your Langfuse API key by signing up for [Langfuse Cloud](https://cloud.langfuse.com) or [self-hosting](https://langfuse.com/docs/deployment/self-host) Langfuse.
|
||||
|
||||
### Set up LobeChat
|
||||
|
||||
There are multiple ways to [self-host LobeChat](https://lobehub.com/docs/self-hosting/start). For this example, we will use the Docker Desktop deployment.
|
||||
|
||||
<Tabs items={["Environment Variables", "Example in Docker Desktop"]}>
|
||||
<Tab>
|
||||
Before deploying LobeChat, set the following four environment variables with the Langfuse API keys you created in the previous step.
|
||||
|
||||
```sh
|
||||
ENABLE_LANGFUSE = '1'
|
||||
LANGFUSE_SECRET_KEY = 'sk-lf...'
|
||||
LANGFUSE_PUBLIC_KEY = 'pk-lf...'
|
||||
LANGFUSE_HOST = 'https://cloud.langfuse.com'
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
Before running the Docker container, set the environment variables in the Docker Desktop with the Langfuse API keys you created in the previous step.
|
||||
|
||||
<Image alt={'Environment Variables in Docker Desktop'} src={'https://langfuse.com/images/docs/lobechat-docker-desktop-env.png'} />
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### Activate Analytics in Settings
|
||||
|
||||
Once you have LobeChat running, navigate to the **About** tab in the **Settings** and activate analytics. This is necessary for traces to be sent to Langfuse.
|
||||
|
||||
<Image alt={'LobeChat Settings'} src={'https://langfuse.com/images/docs/lobechat-settings.png'} />
|
||||
|
||||
### See Chat Traces in Langfuse
|
||||
|
||||
After setting your LLM model key, you can start interacting with your LobeChat application.
|
||||
|
||||
<Image alt={'LobeChat Conversation'} src={'https://langfuse.com/images/docs/lobechat-converstation.png'} />
|
||||
|
||||
All conversations in the chat are automatically traced and sent to Langfuse. You can view the traces in the [Traces section](https://langfuse.com/docs/tracing) in the Langfuse UI.
|
||||
|
||||
<Image alt={'LobeChat Example Trace'} src={'https://langfuse.com/images/docs/lobechat-example-trace.png'} />
|
||||
|
||||
*[Example trace in the Langfuse UI](https://cloud.langfuse.com/project/cloramnkj0002jz088vzn1ja4/traces/63e9246d-3f22-4e45-936d-b0c4ccf55a1e?timestamp=2024-11-26T17%3A00%3A02.028Z\&observation=7ea75a0c-d9d1-425c-9b88-27561c63b413)*
|
||||
</Steps>
|
||||
|
||||
## Feedback
|
||||
|
||||
If you have any feedback or requests, please create a GitHub [Issue](https://langfuse.com/issue) or share your work with the Langfuse community on [Discord](https://discord.langfuse.com/).
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: LobeChat 的可观测性和追踪
|
||||
description: 使用 Langfuse 为你的 LobeChat 应用增强开源可观测性和追踪功能。自动捕获每个请求的详细追踪和指标,以优化和调试你的对话。
|
||||
tags:
|
||||
- 可观测性
|
||||
- 追踪
|
||||
- Langfuse
|
||||
---
|
||||
|
||||
# 使用 Langfuse 监控你的 LobeChat 应用
|
||||
|
||||
## 什么是 Langfuse?
|
||||
|
||||
[Langfuse](https://langfuse.com/) 是一个 **开源的 LLM 可观测性平台**。启用 Langfuse 集成后,你可以追踪应用数据,以开发、监控和优化 LobeChat 的使用,包括:
|
||||
|
||||
- 应用 [追踪](https://langfuse.com/docs/tracing)
|
||||
- 使用模式
|
||||
- 按用户和模型的成本数据
|
||||
- [评估](https://langfuse.com/docs/scores/overview)
|
||||
|
||||
## 快速开始
|
||||
|
||||
<Steps>
|
||||
### 设置 Langfuse
|
||||
|
||||
通过注册 [Langfuse Cloud](https://cloud.langfuse.com) 或 [自托管](https://langfuse.com/docs/deployment/self-host) Langfuse 来获取你的 Langfuse API 密钥。
|
||||
|
||||
### 设置 LobeChat
|
||||
|
||||
有多种方式可以 [自托管 LobeChat](https://lobehub.com/docs/self-hosting/start)。在本示例中,我们将使用 Docker Desktop 部署。
|
||||
|
||||
<Tabs items={["环境变量", "Docker Desktop 示例"]}>
|
||||
<Tab>
|
||||
在部署 LobeChat 之前,使用你在上一步创建的 Langfuse API 密钥设置以下四个环境变量。
|
||||
|
||||
```sh
|
||||
ENABLE_LANGFUSE = '1'
|
||||
LANGFUSE_SECRET_KEY = 'sk-lf...'
|
||||
LANGFUSE_PUBLIC_KEY = 'pk-lf...'
|
||||
LANGFUSE_HOST = 'https://cloud.langfuse.com'
|
||||
```
|
||||
</Tab>
|
||||
|
||||
<Tab>
|
||||
在运行 Docker 容器之前,在 Docker Desktop 中设置环境变量,并填入你在上一步创建的 Langfuse API 密钥。
|
||||
|
||||
<Image alt={'Docker Desktop 中的环境变量'} src={'https://langfuse.com/images/docs/lobechat-docker-desktop-env.png'} />
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
### 在设置中启用分析功能
|
||||
|
||||
当 LobeChat 运行后,进入 **设置** 中的 **关于** 选项卡,并启用分析功能。这是将追踪数据发送到 Langfuse 所必需的。
|
||||
|
||||
<Image alt={'LobeChat 设置'} src={'https://langfuse.com/images/docs/lobechat-settings.png'} />
|
||||
|
||||
### 在 Langfuse 中查看聊天追踪
|
||||
|
||||
设置好 LLM 模型密钥后,你就可以开始与 LobeChat 进行交互。
|
||||
|
||||
<Image alt={'LobeChat 对话'} src={'https://langfuse.com/images/docs/lobechat-converstation.png'} />
|
||||
|
||||
所有对话都会被自动追踪并发送到 Langfuse。你可以在 Langfuse UI 的 [追踪部分](https://langfuse.com/docs/tracing) 查看这些数据。
|
||||
|
||||
<Image alt={'LobeChat Trace 示例'} src={'https://langfuse.com/images/docs/lobechat-example-trace.png'} />
|
||||
</Steps>
|
||||
|
||||
## 反馈
|
||||
|
||||
如果你有任何反馈或需求,请在 GitHub 上创建 [Issue](https://langfuse.com/issue),或在 [Discord](https://discord.langfuse.com/) 上与 Langfuse 社区分享你的想法。
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user