@lobehub/chat 0.139.0 → 0.139.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/.github/workflows/release.yml +2 -0
  2. package/.github/workflows/test.yml +3 -1
  3. package/CHANGELOG.md +58 -0
  4. package/README.md +8 -8
  5. package/README.zh-CN.md +16 -17
  6. package/docs/self-hosting/advanced/analytics.mdx +0 -2
  7. package/docs/self-hosting/advanced/analytics.zh-CN.mdx +0 -2
  8. package/docs/self-hosting/advanced/authentication.mdx +4 -4
  9. package/docs/self-hosting/advanced/authentication.zh-CN.mdx +4 -4
  10. package/docs/self-hosting/advanced/sso-providers/auth0.mdx +11 -11
  11. package/docs/self-hosting/advanced/sso-providers/auth0.zh-CN.mdx +11 -11
  12. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.mdx +9 -6
  13. package/docs/self-hosting/advanced/sso-providers/microsoft-entra-id.zh-CN.mdx +34 -34
  14. package/docs/self-hosting/advanced/upstream-sync.mdx +5 -3
  15. package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +5 -3
  16. package/docs/self-hosting/environment-variables/basic.mdx +0 -2
  17. package/docs/self-hosting/environment-variables/basic.zh-CN.mdx +0 -2
  18. package/docs/self-hosting/environment-variables.mdx +0 -2
  19. package/docs/self-hosting/environment-variables.zh-CN.mdx +3 -4
  20. package/docs/self-hosting/examples/azure-openai.mdx +2 -4
  21. package/docs/self-hosting/examples/azure-openai.zh-CN.mdx +2 -4
  22. package/docs/self-hosting/platform/docker-compose.mdx +7 -3
  23. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +7 -3
  24. package/docs/self-hosting/platform/docker.mdx +9 -5
  25. package/docs/self-hosting/platform/docker.zh-CN.mdx +9 -5
  26. package/docs/self-hosting/platform/netlify.mdx +12 -14
  27. package/docs/self-hosting/platform/netlify.zh-CN.mdx +12 -14
  28. package/docs/self-hosting/platform/repocloud.mdx +0 -2
  29. package/docs/self-hosting/platform/repocloud.zh-CN.mdx +0 -2
  30. package/docs/self-hosting/platform/sealos.mdx +0 -2
  31. package/docs/self-hosting/platform/sealos.zh-CN.mdx +0 -2
  32. package/docs/self-hosting/platform/vercel.mdx +0 -2
  33. package/docs/self-hosting/platform/vercel.zh-CN.mdx +0 -2
  34. package/docs/self-hosting/platform/zeabur.mdx +0 -2
  35. package/docs/self-hosting/platform/zeabur.zh-CN.mdx +0 -2
  36. package/docs/usage/agents/concepts.mdx +5 -5
  37. package/docs/usage/agents/concepts.zh-CN.mdx +2 -2
  38. package/docs/usage/agents/custom-agent.mdx +13 -8
  39. package/docs/usage/agents/custom-agent.zh-CN.mdx +12 -6
  40. package/docs/usage/agents/model.mdx +2 -4
  41. package/docs/usage/agents/model.zh-CN.mdx +2 -4
  42. package/docs/usage/agents/prompt.mdx +2 -4
  43. package/docs/usage/agents/prompt.zh-CN.mdx +2 -4
  44. package/docs/usage/agents/topics.mdx +1 -1
  45. package/docs/usage/agents/topics.zh-CN.mdx +1 -1
  46. package/docs/usage/features/agent-market.mdx +4 -16
  47. package/docs/usage/features/agent-market.zh-CN.mdx +3 -18
  48. package/docs/usage/features/local-llm.mdx +1 -3
  49. package/docs/usage/features/local-llm.zh-CN.mdx +1 -3
  50. package/docs/usage/features/more.mdx +0 -2
  51. package/docs/usage/features/more.zh-CN.mdx +0 -2
  52. package/docs/usage/features/multi-ai-providers.mdx +2 -4
  53. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +2 -4
  54. package/docs/usage/features/plugin-system.mdx +3 -13
  55. package/docs/usage/features/plugin-system.zh-CN.mdx +3 -13
  56. package/docs/usage/features/pwa.mdx +1 -3
  57. package/docs/usage/features/pwa.zh-CN.mdx +1 -3
  58. package/docs/usage/features/text-to-image.mdx +1 -0
  59. package/docs/usage/features/text-to-image.zh-CN.mdx +1 -0
  60. package/docs/usage/features/theme.mdx +2 -4
  61. package/docs/usage/features/theme.zh-CN.mdx +2 -4
  62. package/docs/usage/features/tts.mdx +7 -2
  63. package/docs/usage/features/tts.zh-CN.mdx +7 -4
  64. package/docs/usage/features/vision.mdx +1 -0
  65. package/docs/usage/features/vision.zh-CN.mdx +1 -0
  66. package/docs/usage/plugins/basic-usage.mdx +6 -6
  67. package/docs/usage/plugins/basic-usage.zh-CN.mdx +6 -6
  68. package/docs/usage/plugins/custom-plugin.mdx +5 -1
  69. package/docs/usage/plugins/custom-plugin.zh-CN.mdx +5 -1
  70. package/docs/usage/plugins/development.mdx +32 -32
  71. package/docs/usage/plugins/development.zh-CN.mdx +32 -32
  72. package/docs/usage/plugins/store.mdx +3 -3
  73. package/docs/usage/plugins/store.zh-CN.mdx +3 -3
  74. package/docs/usage/providers/groq.mdx +44 -0
  75. package/docs/usage/providers/groq.zh-CN.mdx +42 -0
  76. package/docs/usage/providers/ollama/gemma.mdx +3 -5
  77. package/docs/usage/providers/ollama/gemma.zh-CN.mdx +2 -4
  78. package/docs/usage/providers/ollama.mdx +11 -9
  79. package/docs/usage/providers/ollama.zh-CN.mdx +10 -11
  80. package/docs/usage/start.mdx +1 -0
  81. package/docs/usage/start.zh-CN.mdx +1 -0
  82. package/package.json +5 -4
  83. package/src/app/chat/(mobile)/features/ChatInput/index.tsx +1 -0
  84. package/src/components/ModelProviderIcon/index.tsx +5 -0
  85. package/src/features/MobileTabBar/index.tsx +2 -1
  86. package/vercel.json +1 -1
  87. package/.husky/commit-msg +0 -1
@@ -1,4 +1,4 @@
1
- import { Callout, Steps } from 'nextra/components';
1
+ # 启动自动更新
2
2
 
3
3
  ## `A` Vercel / Zeabur 部署
4
4
 
@@ -14,7 +14,9 @@ import { Callout, Steps } from 'nextra/components';
14
14
 
15
15
  当你 Fork 了项目后,由于 Github 的限制,你需要手动在你 Fork 的项目的 Actions 页面启用 Workflows,并启动 Upstream Sync Action。启用后,你可以设置每小时进行一次自动更新。
16
16
 
17
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png) ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png)
17
+ <Image alt="启动自动更新 S1" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985117-4d48fe7b-0412-4667-8129-b25ebcf2c9de.png" />
18
+
19
+ <Image alt="启动自动更新 S2" src="https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/266985177-7677b4ce-c348-4145-9f60-829d448d5be6.png" />
18
20
 
19
21
  ## `B` Docker 部署
20
22
 
@@ -54,7 +56,7 @@ Docker 部署版本的升级非常简单,只需要重新部署 LobeChat 的最
54
56
 
55
57
  确保在执行这些命令之前,您有足够的权限来停止和删除容器,并且 Docker 有足够的权限来拉取新的镜像。
56
58
 
57
- <Callout type={'info'}>
59
+ <Callout type={'tip'}>
58
60
  **重新部署的话,我本地的聊天记录会丢失吗?**
59
61
 
60
62
  放心,不会的。LobeChat 的聊天记录全部都存储在你的本地浏览器中。因此使用 Docker 重新部署 LobeChat 时,你的聊天记录并不会丢失。
@@ -1,5 +1,3 @@
1
- import { Callout } from 'nextra/components';
2
-
3
1
  # Environment Variables
4
2
 
5
3
  LobeChat provides some additional configuration options during deployment, which can be customized using environment variables.
@@ -1,5 +1,3 @@
1
- import { Callout } from 'nextra/components';
2
-
3
1
  # 环境变量
4
2
 
5
3
  LobeChat 在部署时提供了一些额外的配置项,你可以使用环境变量进行自定义设置。
@@ -1,5 +1,3 @@
1
- import { Cards } from 'nextra/components';
2
-
3
1
  # Environment Variables
4
2
 
5
3
  LobeChat provides some additional configuration options when deployed, which can be customized using environment variables.
@@ -1,10 +1,9 @@
1
- import { Cards } from 'nextra/components';
2
-
3
1
  # 环境变量
4
2
 
5
3
  LobeChat 在部署时提供了一些额外的配置项,你可以使用环境变量进行自定义设置。
6
4
 
7
5
  <Cards>
8
- <Cards.Card href={'environment-variables/basic'} title={'基础环境变量'} />
9
- <Cards.Card href={'environment-variables/model-provider'} title={'模型服务商'} />
6
+ <Cards href={'environment-variables/basic'} title={'基础环境变量'} />
7
+
8
+ <Cards href={'environment-variables/model-provider'} title={'模型服务商'} />
10
9
  </Cards>
@@ -1,5 +1,3 @@
1
- import { Callout } from 'nextra/components';
2
-
3
1
  # Integrating with Azure OpenAI
4
2
 
5
3
  LobeChat supports using [Azure OpenAI][azure-openai-url] as the model service provider for OpenAI. This article will explain how to configure Azure OpenAI.
@@ -9,14 +7,14 @@ LobeChat supports using [Azure OpenAI][azure-openai-url] as the model service pr
9
7
  Due to development costs ([#178][rfc]), the current version of LobeChat does not fully comply with the implementation model of Azure OpenAI. Instead, it adopts a solution based on `openai` to be compatible with Azure OpenAI. As a result, the following limitations exist:
10
8
 
11
9
  - Only one of OpenAI and Azure OpenAI can be selected. Once you enable Azure OpenAI, you will not be able to use OpenAI as the model service provider.
12
- - LobeChat requires the deployment name to be the same as the model name in order to function properly. For example, the deployment name for the `gpt-35-turbo` model must be `gpt-35-turbo`. Otherwise, LobeChat will not be able to match the corresponding model correctly. ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267082091-d89d53d3-1c8c-40ca-ba15-0a9af2a79264.png)
10
+ - LobeChat requires the deployment name to be the same as the model name in order to function properly. For example, the deployment name for the `gpt-35-turbo` model must be `gpt-35-turbo`. Otherwise, LobeChat will not be able to match the corresponding model correctly. <Image alt="Usage Limitations" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267082091-d89d53d3-1c8c-40ca-ba15-0a9af2a79264.png" />
13
11
  - Due to the complexity of integrating with Azure OpenAI's SDK, it is currently not possible to query the list of configured models.
14
12
 
15
13
  ## Configuring in the Interface
16
14
 
17
15
  Click in the bottom left corner "Actions" - "Settings", then switch to the "Language Model" tab and enable the "Azure OpenAI" switch to start using Azure OpenAI.
18
16
 
19
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png)
17
+ <Image alt="Configuring in the Interface" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png" />
20
18
 
21
19
  You can fill in the corresponding configuration items as needed:
22
20
 
@@ -1,5 +1,3 @@
1
- import { Callout } from 'nextra/components';
2
-
3
1
  # 与 Azure OpenAI 集成使用
4
2
 
5
3
  LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型服务商,本文将介绍如何配置 Azure OpenAI。
@@ -9,14 +7,14 @@ LobeChat 支持使用 [Azure OpenAI][azure-openai-url] 作为 OpenAI 的模型
9
7
  从研发成本考虑 ([#178][rfc]),目前阶段的 LobeChat 并没有 100% 完全符合 Azure OpenAI 的实现模型,采用了以 `openai` 为基座,兼容 Azure OpeAI 的解决方案。因此会带来以下局限性:
10
8
 
11
9
  - OpenAI 与 Azure OpenAI 只能二选一,当你开启使用 Azure OpenAI 后,将无法使用 OpenAI 作为模型服务商;
12
- - LobeChat 约定了与模型同名的部署名才能正常使用,比如 `gpt-35-turbo` 模型的部署名,必须为 `gpt-35-turbo`,否则 LobeChat 将无法正常正确匹配到相应模型 ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267082091-d89d53d3-1c8c-40ca-ba15-0a9af2a79264.png)
10
+ - LobeChat 约定了与模型同名的部署名才能正常使用,比如 `gpt-35-turbo` 模型的部署名,必须为 `gpt-35-turbo`,否则 LobeChat 将无法正常正确匹配到相应模型 <Image alt="使用限制" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267082091-d89d53d3-1c8c-40ca-ba15-0a9af2a79264.png" />
13
11
  - 由于 Azure OpenAI 的 SDK 接入复杂度,当前无法查询配置资源的模型列表;
14
12
 
15
13
  ## 在界面中配置
16
14
 
17
15
  点击左下角「操作」 -「设置」,切到 「语言模型」 Tab 后通过开启「Azure OpenAI」开关,即可开启使用 Azure OpenAI。
18
16
 
19
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png)
17
+ <Image alt="在界面中配置" src="https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/267083420-422a3714-627e-4bef-9fbc-141a2a8ca916.png" />
20
18
 
21
19
  你按需填写相应的配置项:
22
20
 
@@ -1,8 +1,12 @@
1
- import { Steps, Tabs } from 'nextra/components';
2
-
3
1
  # Docker Compose Deployment Guide
4
2
 
5
- [![][docker-release-shield]][docker-release-link][![][docker-size-shield]][docker-size-link][![][docker-pulls-shield]][docker-pulls-link]
3
+ <div style={{display:"flex", gap: 4}}>
4
+ [![][docker-release-shield]][docker-release-link]
5
+
6
+ [![][docker-size-shield]][docker-size-link]
7
+
8
+ [![][docker-pulls-shield]][docker-pulls-link]
9
+ </div>
6
10
 
7
11
  We provide a [Docker image][docker-release-link] for deploying the LobeChat service on your private device.
8
12
 
@@ -1,8 +1,12 @@
1
- import { Steps, Tabs } from 'nextra/components';
2
-
3
1
  # Docker Compose 部署指引
4
2
 
5
- [![][docker-release-shield]][docker-release-link][![][docker-size-shield]][docker-size-link][![][docker-pulls-shield]][docker-pulls-link]
3
+ <div style={{display:"flex", gap: 4}}>
4
+ [![][docker-release-shield]][docker-release-link]
5
+
6
+ [![][docker-size-shield]][docker-size-link]
7
+
8
+ [![][docker-pulls-shield]][docker-pulls-link]
9
+ </div>
6
10
 
7
11
  我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。
8
12
 
@@ -1,8 +1,12 @@
1
- import { Callout, Steps, Tabs } from 'nextra/components';
2
-
3
1
  # Docker Deployment Guide
4
2
 
5
- [![][docker-release-shield]][docker-release-link][![][docker-size-shield]][docker-size-link][![][docker-pulls-shield]][docker-pulls-link]
3
+ <div style={{display:"flex", gap: 4}}>
4
+ [![][docker-release-shield]][docker-release-link]
5
+
6
+ [![][docker-size-shield]][docker-size-link]
7
+
8
+ [![][docker-pulls-shield]][docker-pulls-link]
9
+ </div>
6
10
 
7
11
  We provide a [Docker image][docker-release-link] for you to deploy the LobeChat service on your private device.
8
12
 
@@ -45,7 +49,7 @@ We provide a [Docker image][docker-release-link] for you to deploy the LobeChat
45
49
 
46
50
  - For the complete list of environment variables supported by LobeChat, please refer to the [Environment Variables](/zh/self-hosting/environment-ariable) section.
47
51
 
48
- <Callout>
52
+ <Callout type="tip">
49
53
  Since the official Docker image build takes about half an hour, if you see the "update available"
50
54
  prompt after deployment, you can wait for the image to finish building before deploying again.
51
55
  </Callout>
@@ -56,7 +60,7 @@ We provide a [Docker image][docker-release-link] for you to deploy the LobeChat
56
60
  stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123).
57
61
  </Callout>
58
62
 
59
- <Callout type="info">
63
+ <Callout type="important">
60
64
  Note that when the **deployment architecture is inconsistent with the image**, you need to
61
65
  cross-compile **Sharp**, see [Sharp
62
66
  Cross-Compilation](https://sharp.pixelplumbing.com/install#cross-platform) for details.
@@ -1,8 +1,12 @@
1
- import { Callout, Steps, Tabs } from 'nextra/components';
2
-
3
1
  # Docker 部署指引
4
2
 
5
- [![][docker-release-shield]][docker-release-link][![][docker-size-shield]][docker-size-link][![][docker-pulls-shield]][docker-pulls-link]
3
+ <div style={{display:"flex", gap: 4}}>
4
+ [![][docker-release-shield]][docker-release-link]
5
+
6
+ [![][docker-size-shield]][docker-size-link]
7
+
8
+ [![][docker-pulls-shield]][docker-pulls-link]
9
+ </div>
6
10
 
7
11
  我们提供了 [Docker 镜像][docker-release-link],供你在自己的私有设备上部署 LobeChat 服务。
8
12
 
@@ -42,7 +46,7 @@ import { Callout, Steps, Tabs } from 'nextra/components';
42
46
  - 默认映射端口为 `3210`, 请确保未被占用或手动更改端口映射
43
47
  - 使用你的 OpenAI API Key 替换上述命令中的 `sk-xxxx`
44
48
 
45
- <Callout type={'info'}>
49
+ <Callout type={'tip'}>
46
50
  LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
47
51
  </Callout>
48
52
 
@@ -56,7 +60,7 @@ import { Callout, Steps, Tabs } from 'nextra/components';
56
60
  stolen!!!](https://github.com/lobehub/lobe-chat/issues/1123) 这样的情况
57
61
  </Callout>
58
62
 
59
- <Callout type="info">
63
+ <Callout type="important">
60
64
  注意,当**部署架构与镜像的不一致时**,需要对 **Sharp** 进行交叉编译,详见 [Sharp
61
65
  交叉编译](https://sharp.pixelplumbing.com/install#cross-platform)
62
66
  </Callout>
@@ -1,5 +1,3 @@
1
- import { Callout, Steps } from 'nextra/components';
2
-
3
1
  # Deploy LobeChat with Netlify
4
2
 
5
3
  If you want to deploy LobeChat on Netlify, you can follow these steps:
@@ -24,25 +22,25 @@ If you want to deploy LobeChat on Netlify, you can follow these steps:
24
22
 
25
23
  Click "Import from git"
26
24
 
27
- <Image alt={'Click "Import from git" in the Netlify workspace'} bordered height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
25
+ <Image alt={'Click "Import from git" in the Netlify workspace'} height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
28
26
 
29
27
  Then click "Deploy with Github" and authorize Netlify to access your GitHub account.
30
28
 
31
- <Image alt={'Authorize Netlify to access your GitHub account'} bordered height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
29
+ <Image alt={'Authorize Netlify to access your GitHub account'} height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
32
30
 
33
31
  Next, select the LobeChat project:
34
32
 
35
- <Image alt={'Select the LobeChat github project'} bordered height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
33
+ <Image alt={'Select the LobeChat github project'} height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
36
34
 
37
35
  ### Configure Site Name and Environment Variables
38
36
 
39
37
  In this step, you need to configure your site, including the site name, build command, and publish directory. Fill in your site name in the "Site Name" field. If there are no special requirements, you do not need to modify the remaining configurations as we have already set the default configurations.
40
38
 
41
- <Image alt={'Configure LobeChat site name'} bordered height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
39
+ <Image alt={'Configure LobeChat site name'} height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
42
40
 
43
41
  Click the "Add environment variables" button to add site environment variables:
44
42
 
45
- <Image alt={'Add LobeChat site environment variables'} bordered height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
43
+ <Image alt={'Add LobeChat site environment variables'} height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
46
44
 
47
45
  Taking OpenAI as an example, the environment variables you need to add are as follows:
48
46
 
@@ -52,38 +50,38 @@ If you want to deploy LobeChat on Netlify, you can follow these steps:
52
50
  | `ACCESS_CODE` | Required | Add a password to access this service. You can set a long password to prevent brute force attacks. When this value is separated by commas, it becomes an array of passwords | `awCT74` or `e3@09!` or `code1,code2,code3` |
53
51
  | `OPENAI_PROXY_URL` | Optional | If you manually configure the OpenAI interface proxy, you can use this configuration to override the default OpenAI API request base URL | `https://aihubmix.com/v1`, default value: `https://api.openai.com/v1` |
54
52
 
55
- <Callout type={'info'}>
53
+ <Callout type={'tip'}>
56
54
  For a complete list of environment variables supported by LobeChat, please refer to the [📘
57
55
  Environment Variables](/en/self-hosting/environment-variables)
58
56
  </Callout>
59
57
 
60
58
  Afteradding the variables, finally click "Deploy lobe-chat" to enter the deployment phase
61
59
 
62
- <Image alt={'Environment variables added'} bordered height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
60
+ <Image alt={'Environment variables added'} height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
63
61
 
64
62
  ### Wait for Deployment to Complete
65
63
 
66
64
  After clicking deploy, you will enter the site details page, where you can click the "Deploying your site" in blue or the "Building" in yellow to view the deployment progress.
67
65
 
68
- <Image alt={'Netlify site details page'} bordered height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
66
+ <Image alt={'Netlify site details page'} height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
69
67
 
70
68
  Upon entering the deployment details, you will see the following interface, indicating that your LobeChat is currently being deployed. Simply wait for the deployment to complete.
71
69
 
72
- <Image alt={'LobeChat deployment in progress'} bordered height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
70
+ <Image alt={'LobeChat deployment in progress'} height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
73
71
 
74
72
  During the deployment and build process:
75
73
 
76
- <Image alt={'Deployment in progress'} bordered height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
74
+ <Image alt={'Deployment in progress'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
77
75
 
78
76
  ### Deployment Successful, Start Using
79
77
 
80
78
  If your Deploy Log in the interface looks like the following, it means your LobeChat has been successfully deployed.
81
79
 
82
- <Image alt={'Deployment Successful'} bordered height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
80
+ <Image alt={'Deployment Successful'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
83
81
 
84
82
  At this point, you can click on "Open production deploy" to access your LobeChat site.
85
83
 
86
- <Image alt={'Access Your LobeChat Site'} bordered height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
84
+ <Image alt={'Access Your LobeChat Site'} height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
87
85
  </Steps>
88
86
 
89
87
  ## Set up Custom Domain (Optional)
@@ -1,5 +1,3 @@
1
- import { Callout, Steps } from 'nextra/components';
2
-
3
1
  # 使用 Netlify 部署
4
2
 
5
3
  如果想在 Netlify 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -21,25 +19,25 @@ import { Callout, Steps } from 'nextra/components';
21
19
 
22
20
  点击 「Import from git」
23
21
 
24
- <Image alt={'在 Netflix 工作台点击 「Import from git」'} bordered height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
22
+ <Image alt={'在 Netflix 工作台点击 「Import from git」'} height={362} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/31b999e5-2a74-45fc-935b-f036e72a684d'} />
25
23
 
26
24
  然后点击 「Deploy with Github」,并授权 Netlify 访问你的 GitHub 账号
27
25
 
28
- <Image alt={'授权 Netlify 访问你的 GitHub 账号'} bordered height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
26
+ <Image alt={'授权 Netlify 访问你的 GitHub 账号'} height={273} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9c58141-5ec6-43f1-8d97-0a84a04dcdba'} />
29
27
 
30
28
  然后选择 LobeChat 项目:
31
29
 
32
- <Image alt={'选择 LobeChat github 项目'} bordered height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
30
+ <Image alt={'选择 LobeChat github 项目'} height={228} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/6c3968a8-fbbb-4268-a587-edaced2d96af'} />
33
31
 
34
32
  ### 配置站点名称与环境变量
35
33
 
36
34
  在这一步,你需要配置你的站点,包括站点名称、构建命令、发布目录等。在「Site Name」字段填写上你的站点名称。其余配置如果没有特殊要求,无需修改,我们已经设定好了默认配置。
37
35
 
38
- <Image alt={'配置 LobeChat 站点名称'} bordered height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
36
+ <Image alt={'配置 LobeChat 站点名称'} height={712} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/f3885537-6d43-422f-b1b8-e70732401025'} />
39
37
 
40
38
  点击 「Add environment variables」按钮,添加站点环境变量:
41
39
 
42
- <Image alt={'添加 LobeChat 站点环境变量'} bordered height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
40
+ <Image alt={'添加 LobeChat 站点环境变量'} height={537} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/3b607482-4d99-455a-bc10-3090dd4fe3c5'} />
43
41
 
44
42
  以配置 OpenAI 为例,你需要添加的环境变量如下:
45
43
 
@@ -49,37 +47,37 @@ import { Callout, Steps } from 'nextra/components';
49
47
  | `ACCESS_CODE` | 必选 | 添加访问此服务的密码,你可以设置一个长密码以防被爆破,该值用逗号分隔时为密码数组 | `awCT74` 或 `e3@09!` or `code1,code2,code3` |
50
48
  | `OPENAI_PROXY_URL` | 可选 | 如果你手动配置了 OpenAI 接口代理,可以使用此配置项来覆盖默认的 OpenAI API 请求基础 URL | `https://aihubmix.com/v1` ,默认值:`https://api.openai.com/v1` |
51
49
 
52
- <Callout type={'info'}>
50
+ <Callout type={'tip'}>
53
51
  LobeChat 支持的完整环境变量列表请参考 [📘 环境变量](/zh/self-hosting/environment-variables) 部分
54
52
  </Callout>
55
53
 
56
54
  添加完成后,最后点击「Deploy lobe-chat」 进入部署阶段。
57
55
 
58
- <Image alt={'环境变量添加完成'} bordered height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
56
+ <Image alt={'环境变量添加完成'} height={600} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c9f74ec4-ce63-4ce9-b9e2-34bda6fda10b'} />
59
57
 
60
58
  ### 等待部署完成
61
59
 
62
60
  点击部署后,会进入站点详情页面,你可以点击青色字样的「Deploying your site」或者 「Building」 黄色标签查看部署进度。
63
61
 
64
- <Image alt={'Netlify 站点详情页'} bordered height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
62
+ <Image alt={'Netlify 站点详情页'} height={396} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/a7fd85d5-fd32-4756-814e-ff7ab7567fe1'} />
65
63
 
66
64
  进入部署详情,你会看到下述界面,这意味着你的 LobeChat 正在部署中,只需等待部署完成即可。
67
65
 
68
- <Image alt={'LobeChat 部署构建中'} bordered height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
66
+ <Image alt={'LobeChat 部署构建中'} height={325} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1ed8b13d-046e-47c8-bd61-116ffdf5d01b'} />
69
67
 
70
68
  部署构建过程中:
71
69
 
72
- <Image alt={'部署构建中'} bordered height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
70
+ <Image alt={'部署构建中'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/1c82d707-cb6f-4924-b246-a5235a919864'} />
73
71
 
74
72
  ### 部署成功,开始使用
75
73
 
76
74
  如果你的界面中的 Deploy Log 如下所示,意味着你的 LobeChat 部署成功了。
77
75
 
78
- <Image alt={'部署成功'} bordered height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
76
+ <Image alt={'部署成功'} height={558} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/c1f945d1-f3e2-4100-b6bb-24d4cb13c438'} />
79
77
 
80
78
  此时,你可以点击「Open production deploy」,即可访问你的 LobeChat 站点
81
79
 
82
- <Image alt={'访问你的 LobeChat 站点'} bordered height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
80
+ <Image alt={'访问你的 LobeChat 站点'} height={527} inStep src={'https://github.com/lobehub/lobe-chat/assets/28616219/b04723eb-64ad-4028-a901-dc4e4ee2d0c1'} />
83
81
  </Steps>
84
82
 
85
83
  ## 绑定自定义域名(可选)
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # Deploy LobeChat with RepoCloud
4
2
 
5
3
  If you want to deploy LobeChat on RepoCloud, you can follow the steps below:
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # 使用 RepoCloud 部署
4
2
 
5
3
  如果想在 RepoCloud 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # Deploy LobeChat with SealOS
4
2
 
5
3
  If you want to deploy LobeChat on SealOS, you can follow the steps below:
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # 使用 SealOS 部署
4
2
 
5
3
  如果想在 SealOS 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -1,5 +1,3 @@
1
- import { Callout, Steps } from 'nextra/components';
2
-
3
1
  # Deploy LobeChat with Vercel
4
2
 
5
3
  If you want to deploy LobeChat on Vercel, you can follow the steps below:
@@ -1,5 +1,3 @@
1
- import { Callout, Steps } from 'nextra/components';
2
-
3
1
  # Vercel 部署指引
4
2
 
5
3
  如果想在 Vercel 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # Deploy LobeChat with Zeabur
4
2
 
5
3
  If you want to deploy LobeChat on Zeabur, you can follow the steps below:
@@ -1,5 +1,3 @@
1
- import { Steps } from 'nextra/components';
2
-
3
1
  # 使用 Zeabur 部署
4
2
 
5
3
  如果想在 Zeabur 上部署 LobeChat,可以按照以下步骤进行操作:
@@ -4,14 +4,14 @@
4
4
 
5
5
  In the official ChatGPT application, there is only the concept of "topics." As shown in the image, the user's historical conversation topics are listed in the sidebar.
6
6
 
7
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png)
7
+ <Image alt={'ChatGPT and Topics'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png'} />
8
8
 
9
9
  However, in our usage, we have found that this model has many issues. For example, the information indexing of historical conversations is too scattered. Additionally, when dealing with repetitive tasks, it is difficult to have a stable entry point. For instance, if I want ChatGPT to help me translate a document, in this model, I would need to constantly create new topics and then set up the translation prompt I had previously created. When there are high-frequency tasks, this will result in a very inefficient interaction format.
10
10
 
11
- ## "Topics" and "Assistants"
11
+ ## Topics and "Agent"
12
12
 
13
- Therefore, in LobeChat, we have introduced the concept of **assistants**. An assistant is a complete functional module, each with its own responsibilities and tasks. Assistants can help you handle various tasks and provide professional advice and guidance.
13
+ Therefore, in LobeChat, we have introduced the concept of **Agents**. An agent is a complete functional module, each with its own responsibilities and tasks. Assistants can help you handle various tasks and provide professional advice and guidance.
14
14
 
15
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png)
15
+ <Image alt={'Topics and Agent'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png'} />
16
16
 
17
- At the same time, we have integrated topics into each assistant. The benefit of this approach is that each assistant has an independent topic list. You can choose the corresponding assistant based on the current task and quickly switch between historical conversation records. This method is more in line with users' habits in common chat software, improving interaction efficiency.
17
+ At the same time, we have integrated topics into each agent. The benefit of this approach is that each agent has an independent topic list. You can choose the corresponding agent based on the current task and quickly switch between historical conversation records. This method is more in line with users' habits in common chat software, improving interaction efficiency.
@@ -4,7 +4,7 @@
4
4
 
5
5
  在 ChatGPT 官方应用中,只存在话题的概念,如图所示,在侧边栏中是用户的历史对话话题列表。
6
6
 
7
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png)
7
+ <Image alt={'ChatGPT 与「话题」'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602474-fe7cb3f3-8eb7-40d3-a69f-6615393bbd4e.png'} />
8
8
 
9
9
  但在我们的使用过程中其实会发现这种模式存在很多问题,比如历史对话的信息索引过于分散问题,同时当处理一些重复任务时很难有一个稳定的入口,比如我希望有一个稳定的入口可以让 ChatGPT 帮助我翻译文档,在这个模式下,我需要不断新建新的话题同时再设置我之前创建好的翻译 Prompt 设定,当有高频任务存在时,这将是一个效率很低的交互形式。
10
10
 
@@ -12,6 +12,6 @@
12
12
 
13
13
  因此在 LobeChat 中,我们引入了 **助手** 的概念。助手是一个完整的功能模块,每个助手都有自己的职责和任务。助手可以帮助你处理各种任务,并提供专业的建议和指导。
14
14
 
15
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png)
15
+ <Image alt={'「话题」与「助手」'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279602489-89893e61-2791-4083-9b57-ed80884ad58b.png'} />
16
16
 
17
17
  与此同时,我们将话题索引到每个助手内部。这样做的好处是,每个助手都有一个独立的话题列表,你可以根据当前任务选择对应的助手,并快速切换历史对话记录。这种方式更符合用户对常见聊天软件的使用习惯,提高了交互的效率。
@@ -1,5 +1,3 @@
1
- import { Callout, Cards } from 'nextra/components';
2
-
3
1
  # Custom Assistant Guide
4
2
 
5
3
  As the basic functional unit of LobeChat, adding and iterating assistants is very important. Now you can add assistants to your favorites list in two ways.
@@ -8,20 +6,27 @@ As the basic functional unit of LobeChat, adding and iterating assistants is ver
8
6
 
9
7
  If you are a beginner in Prompt writing, you might want to browse the assistant market of LobeChat first. Here, you can find commonly used assistants submitted by others and easily add them to your list with just one click, which is very convenient.
10
8
 
11
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279588466-4c32041b-a8e6-4703-ba4a-f91b7800e359.png)
9
+ <Image alt={'Add through the role market'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279588466-4c32041b-a8e6-4703-ba4a-f91b7800e359.png'} />
12
10
 
13
11
  ## `B` Create a custom assistant
14
12
 
15
13
  When you need to handle specific tasks, you need to consider creating a custom assistant to help you solve the problem. You can add and configure the assistant in detail in the following ways.
16
14
 
17
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587283-a3ea8dfd-70fb-47ee-ab00-e3911ac6a939.png) ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587292-a3d102c6-f61e-4578-91f1-c0a4c97588e1.png)
15
+ <Cards rows={2}>
16
+ <Image alt={'Create a custom assistant S1'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587283-a3ea8dfd-70fb-47ee-ab00-e3911ac6a939.png'} />
17
+
18
+ <Image alt={'Create a custom assistant S2'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587292-a3d102c6-f61e-4578-91f1-c0a4c97588e1.png'} />
19
+ </Cards>
18
20
 
19
- <Callout type={'info'}>
20
- **Quick Setup Tip**: You can conveniently modify the Prompt through the quick edit button in the
21
- sidebar.
21
+ <Callout type={'tip'}>
22
+ **Quick Setup Tip**: You can conveniently modify the Prompt through the quick edit button in the sidebar.
22
23
  </Callout>
23
24
 
24
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587294-388d1877-193e-4a50-9fe8-8fbcc3ccefa0.png) ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587298-333da153-13b8-4557-a0a2-cff55e7bc1c0.png)
25
+ <Cards rows={2}>
26
+ <Image alt={'Create a custom assistant S3'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587294-388d1877-193e-4a50-9fe8-8fbcc3ccefa0.png'} />
27
+
28
+ <Image alt={'Create a custom assistant S4'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587298-333da153-13b8-4557-a0a2-cff55e7bc1c0.png'} />
29
+ </Cards>
25
30
 
26
31
  If you want to understand Prompt writing tips and common model parameter settings, you can continue to view:
27
32
 
@@ -1,5 +1,3 @@
1
- import { Callout, Cards } from 'nextra/components';
2
-
3
1
  # 自定义助手指南
4
2
 
5
3
  作为 LobeChat 的基础职能单位,助手的添加和迭代是非常重要的。现在你可以通过两种方式将助手添加到你的常用列表中
@@ -8,19 +6,27 @@ import { Callout, Cards } from 'nextra/components';
8
6
 
9
7
  如果你是一个 Prompt 编写的新手,不妨先浏览一下 LobeChat 的助手市场。在这里,你可以找到其他人提交的常用助手,并且只需一键添加到你的列表中,非常方便。
10
8
 
11
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279588466-4c32041b-a8e6-4703-ba4a-f91b7800e359.png)
9
+ <Image alt={'通过角色市场添加'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279588466-4c32041b-a8e6-4703-ba4a-f91b7800e359.png'} />
12
10
 
13
11
  ## `B` 通过新建自定义助手
14
12
 
15
13
  当你需要处理一些特定的任务时,你就需要考虑创建一个自定义助手来帮助你解决问题。可以通过以下方式添加并进行助手的详细配置
16
14
 
17
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587283-a3ea8dfd-70fb-47ee-ab00-e3911ac6a939.png) ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587292-a3d102c6-f61e-4578-91f1-c0a4c97588e1.png)
15
+ <Cards rows={2}>
16
+ <Image alt={'通过新建自定义助手 S1'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587283-a3ea8dfd-70fb-47ee-ab00-e3911ac6a939.png'} />
17
+
18
+ <Image alt={'通过新建自定义助手 S2'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587292-a3d102c6-f61e-4578-91f1-c0a4c97588e1.png'} />
19
+ </Cards>
18
20
 
19
- <Callout type={'info'}>
21
+ <Callout type={'tip'}>
20
22
  **快捷设置技巧**: 可以通过侧边栏的快捷编辑按钮进行 Prompt 的便捷修改
21
23
  </Callout>
22
24
 
23
- ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587294-388d1877-193e-4a50-9fe8-8fbcc3ccefa0.png) ![](https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587298-333da153-13b8-4557-a0a2-cff55e7bc1c0.png)
25
+ <Cards rows={2}>
26
+ <Image alt={'通过新建自定义助手 S3'} src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587294-388d1877-193e-4a50-9fe8-8fbcc3ccefa0.png'} />
27
+
28
+ <Image alt={'通过新建自定义助手 S4'} inStep src={'https://github-production-user-asset-6210df.s3.amazonaws.com/17870709/279587298-333da153-13b8-4557-a0a2-cff55e7bc1c0.png'} />
29
+ </Cards>
24
30
 
25
31
  如果你希望理解 Prompt 编写技巧和常见的模型参数设置,可以继续查看:
26
32
 
@@ -3,8 +3,6 @@ title: LLM Guide
3
3
  description: Explore the capabilities of ChatGPT models from gpt-3.5-turbo to gpt-4-32k, understanding their speed, context limits, and cost. Learn about model parameters like temperature and top-p for better output.
4
4
  ---
5
5
 
6
- import { Callout } from 'nextra/components';
7
-
8
6
  # Model Guide
9
7
 
10
8
  ## ChatGPT
@@ -37,10 +35,10 @@ This parameter controls the randomness of the model's output. The higher the val
37
35
 
38
36
  ### `top_p`
39
37
 
40
- Top_p is also a sampling parameter, but it differs from temperature in its sampling method. Before outputting, the model generates a bunch of tokens, and these tokens are ranked based on their quality. In the top-p sampling mode, the candidate word list is dynamic, and tokens are selected from the tokens based on a percentage. Top_p introduces randomness in token selection, allowing other high-scoring tokens to have a chance of being selected, rather than always choosing the highest-scoring one.
38
+ Top\_p is also a sampling parameter, but it differs from temperature in its sampling method. Before outputting, the model generates a bunch of tokens, and these tokens are ranked based on their quality. In the top-p sampling mode, the candidate word list is dynamic, and tokens are selected from the tokens based on a percentage. Top\_p introduces randomness in token selection, allowing other high-scoring tokens to have a chance of being selected, rather than always choosing the highest-scoring one.
41
39
 
42
40
  <Callout>
43
- Top_p is similar to randomness, and it is generally not recommended to change it together with the
41
+ Top\_p is similar to randomness, and it is generally not recommended to change it together with the
44
42
  randomness of temperature.
45
43
  </Callout>
46
44
 
@@ -1,5 +1,3 @@
1
- import { Callout } from 'nextra/components';
2
-
3
1
  # 模型指南
4
2
 
5
3
  ## ChatGPT
@@ -31,9 +29,9 @@ LLM 看似很神奇,但本质还是一个概率问题,神经网络根据输
31
29
 
32
30
  ### `top_p`
33
31
 
34
- 核采样 top_p 也是采样参数,跟 temperature 不一样的采样方式。模型在输出之前,会生成一堆 token,这些 token 根据质量高低排名,核采样模式中候选词列表是动态的,从 tokens 里按百分比选择候选词。 top_p 为选择 token 引入了随机性,让其他高分的 token 有被选择的机会,不会总是选最高分的。
32
+ 核采样 top\_p 也是采样参数,跟 temperature 不一样的采样方式。模型在输出之前,会生成一堆 token,这些 token 根据质量高低排名,核采样模式中候选词列表是动态的,从 tokens 里按百分比选择候选词。 top\_p 为选择 token 引入了随机性,让其他高分的 token 有被选择的机会,不会总是选最高分的。
35
33
 
36
- <Callout>top_p 与随机性类似,一般来说不建议和随机性 temperature 一起更改</Callout>
34
+ <Callout>top\_p 与随机性类似,一般来说不建议和随机性 temperature 一起更改</Callout>
37
35
 
38
36
  <br />
39
37