@lobehub/chat 1.0.13 → 1.0.14
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.
- package/CHANGELOG.md +25 -0
- package/README.md +16 -14
- package/README.zh-CN.md +16 -14
- package/docs/self-hosting/advanced/feature-flags.zh-CN.mdx +2 -1
- package/docs/self-hosting/advanced/model-list.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/server-database.mdx +4 -3
- package/docs/self-hosting/advanced/server-database.zh-CN.mdx +1 -0
- package/docs/self-hosting/advanced/settings-url-share.mdx +5 -4
- package/docs/self-hosting/advanced/settings-url-share.zh-CN.mdx +5 -4
- package/docs/self-hosting/advanced/sso-providers/zitadel.mdx +3 -3
- package/docs/self-hosting/advanced/sso-providers/zitadel.zh-CN.mdx +2 -1
- package/docs/self-hosting/advanced/upstream-sync.zh-CN.mdx +10 -10
- package/docs/self-hosting/examples/ollama.mdx +23 -23
- package/docs/self-hosting/examples/ollama.zh-CN.mdx +23 -24
- package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +2 -3
- package/docs/self-hosting/platform/vercel.mdx +2 -2
- package/docs/self-hosting/platform/vercel.zh-CN.mdx +2 -1
- package/docs/self-hosting/platform/zeabur.mdx +6 -7
- package/docs/self-hosting/platform/zeabur.zh-CN.mdx +6 -7
- package/docs/usage/agents/prompt.mdx +1 -1
- package/docs/usage/agents/prompt.zh-CN.mdx +1 -1
- package/docs/usage/features/auth.mdx +13 -8
- package/docs/usage/features/auth.zh-CN.mdx +5 -3
- package/docs/usage/features/database.mdx +20 -14
- package/docs/usage/features/database.zh-CN.mdx +1 -1
- package/docs/usage/features/local-llm.mdx +5 -0
- package/docs/usage/features/local-llm.zh-CN.mdx +5 -0
- package/docs/usage/features/multi-ai-providers.mdx +5 -0
- package/docs/usage/features/multi-ai-providers.zh-CN.mdx +5 -0
- package/docs/usage/features/plugin-system.zh-CN.mdx +2 -1
- package/docs/usage/features/pwa.mdx +3 -2
- package/docs/usage/features/pwa.zh-CN.mdx +3 -2
- package/docs/usage/providers/01ai.mdx +86 -0
- package/docs/usage/providers/01ai.zh-CN.mdx +85 -0
- package/docs/usage/providers/anthropic.mdx +79 -0
- package/docs/usage/providers/anthropic.zh-CN.mdx +74 -0
- package/docs/usage/providers/azure.mdx +89 -0
- package/docs/usage/providers/azure.zh-CN.mdx +82 -0
- package/docs/usage/providers/bedrock.mdx +140 -0
- package/docs/usage/providers/bedrock.zh-CN.mdx +135 -0
- package/docs/usage/providers/deepseek.mdx +91 -0
- package/docs/usage/providers/deepseek.zh-CN.mdx +86 -0
- package/docs/usage/providers/gemini.mdx +83 -0
- package/docs/usage/providers/gemini.zh-CN.mdx +80 -0
- package/docs/usage/providers/groq.mdx +1 -3
- package/docs/usage/providers/groq.zh-CN.mdx +1 -1
- package/docs/usage/providers/minimax.mdx +89 -0
- package/docs/usage/providers/minimax.zh-CN.mdx +85 -0
- package/docs/usage/providers/mistral.mdx +71 -0
- package/docs/usage/providers/mistral.zh-CN.mdx +66 -0
- package/docs/usage/providers/moonshot.mdx +70 -0
- package/docs/usage/providers/moonshot.zh-CN.mdx +66 -0
- package/docs/usage/providers/ollama/gemma.mdx +1 -1
- package/docs/usage/providers/ollama/gemma.zh-CN.mdx +1 -1
- package/docs/usage/providers/ollama/qwen.mdx +1 -1
- package/docs/usage/providers/ollama/qwen.zh-CN.mdx +1 -1
- package/docs/usage/providers/ollama.mdx +1 -1
- package/docs/usage/providers/ollama.zh-CN.mdx +1 -1
- package/docs/usage/providers/openai.mdx +95 -0
- package/docs/usage/providers/openai.zh-CN.mdx +87 -0
- package/docs/usage/providers/openrouter.mdx +111 -0
- package/docs/usage/providers/openrouter.zh-CN.mdx +109 -0
- package/docs/usage/providers/perplexity.mdx +64 -0
- package/docs/usage/providers/perplexity.zh-CN.mdx +61 -0
- package/docs/usage/providers/qwen.mdx +93 -0
- package/docs/usage/providers/qwen.zh-CN.mdx +86 -0
- package/docs/usage/providers/stepfun.mdx +69 -0
- package/docs/usage/providers/stepfun.zh-CN.mdx +64 -0
- package/docs/usage/providers/togetherai.mdx +74 -0
- package/docs/usage/providers/togetherai.zh-CN.mdx +71 -0
- package/docs/usage/providers/zhipu.mdx +69 -0
- package/docs/usage/providers/zhipu.zh-CN.mdx +64 -0
- package/docs/usage/providers.mdx +36 -0
- package/docs/usage/providers.zh-CN.mdx +34 -0
- package/docs/usage/start.mdx +2 -0
- package/docs/usage/start.zh-CN.mdx +2 -0
- package/locales/ar/setting.json +1 -0
- package/locales/bg-BG/setting.json +1 -0
- package/locales/de-DE/setting.json +1 -0
- package/locales/en-US/setting.json +1 -0
- package/locales/es-ES/setting.json +1 -0
- package/locales/fr-FR/setting.json +1 -0
- package/locales/it-IT/setting.json +1 -0
- package/locales/ja-JP/setting.json +1 -0
- package/locales/ko-KR/setting.json +1 -0
- package/locales/nl-NL/setting.json +1 -0
- package/locales/pl-PL/setting.json +1 -0
- package/locales/pt-BR/setting.json +1 -0
- package/locales/ru-RU/setting.json +1 -0
- package/locales/tr-TR/setting.json +1 -0
- package/locales/vi-VN/setting.json +1 -0
- package/locales/zh-CN/setting.json +1 -0
- package/locales/zh-TW/setting.json +1 -0
- package/package.json +6 -5
- package/src/app/(main)/settings/llm/ProviderList/providers.tsx +33 -4
- package/src/app/(main)/settings/llm/components/ProviderConfig/index.tsx +41 -11
- package/src/app/(main)/settings/llm/index.tsx +1 -2
- package/src/features/ChatInput/useSend.ts +2 -1
- package/src/features/Conversation/Messages/Assistant/ToolCalls/index.tsx +1 -1
- package/src/features/Conversation/Messages/components/Arguments.tsx +5 -3
- package/src/features/Conversation/Messages/hooks/useYamlArguments.ts +5 -2
- package/src/locales/default/setting.ts +1 -0
- package/src/store/chat/slices/plugin/action.test.ts +5 -5
- package/src/store/chat/slices/plugin/action.ts +6 -2
- package/src/store/tool/slices/builtin/action.test.ts +8 -11
- package/src/store/tool/slices/builtin/action.ts +9 -9
|
@@ -16,7 +16,7 @@ tags:
|
|
|
16
16
|
alt={'Using Ollama in LobeChat'}
|
|
17
17
|
borderless
|
|
18
18
|
cover
|
|
19
|
-
src={'https://github.com/lobehub/lobe-chat/assets/
|
|
19
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/f579b39b-e771-402c-a1d1-620e57a10c75'}
|
|
20
20
|
/>
|
|
21
21
|
|
|
22
22
|
Ollama is a powerful framework for running large language models (LLMs) locally, supporting various language models including Llama 2, Mistral, and more. Now, LobeChat supports integration with Ollama, meaning you can easily enhance your application by using the language models provided by Ollama in LobeChat.
|
|
@@ -14,7 +14,7 @@ tags:
|
|
|
14
14
|
alt={'在 LobeChat 中使用 Ollama'}
|
|
15
15
|
borderless
|
|
16
16
|
cover
|
|
17
|
-
src={'https://github.com/lobehub/lobe-chat/assets/
|
|
17
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/f579b39b-e771-402c-a1d1-620e57a10c75'}
|
|
18
18
|
/>
|
|
19
19
|
|
|
20
20
|
Ollama 是一款强大的本地运行大型语言模型(LLM)的框架,支持多种语言模型,包括 Llama 2, Mistral 等。现在,LobeChat 已经支持与 Ollama 的集成,这意味着你可以在 LobeChat 中轻松使用 Ollama 提供的语言模型来增强你的应用。
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Using OpenAI in LobeChat - A Step-by-Step Guide
|
|
3
|
+
description: >-
|
|
4
|
+
Learn how to integrate and configure OpenAI in LobeChat to enhance your
|
|
5
|
+
conversational experience. Obtain an API Key, configure settings, and select
|
|
6
|
+
an OpenAI model for your AI assistant.
|
|
7
|
+
tags:
|
|
8
|
+
- OpenAI
|
|
9
|
+
- LobeChat
|
|
10
|
+
- API Key
|
|
11
|
+
- Configure OpenAI
|
|
12
|
+
- AI Assistant
|
|
13
|
+
- Conversational AI
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Using OpenAI in LobeChat
|
|
17
|
+
|
|
18
|
+
<Image
|
|
19
|
+
alt={'Using OpenAI in LobeChat'}
|
|
20
|
+
cover
|
|
21
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/c9e5eafc-ca22-496b-a88d-cc0ae53bf720'}
|
|
22
|
+
/>
|
|
23
|
+
|
|
24
|
+
This document will guide you on how to use [OpenAI](https://openai.com/) in LobeChat:
|
|
25
|
+
|
|
26
|
+
<Steps>
|
|
27
|
+
|
|
28
|
+
### Step 1: Obtain OpenAI API Key
|
|
29
|
+
|
|
30
|
+
- Register for an [OpenAI account](https://platform.openai.com/signup). You will need to register using an international phone number and a non-mainland email address.
|
|
31
|
+
|
|
32
|
+
- After registration, go to the [API Keys](https://platform.openai.com/api-keys) page and click on `Create new secret key` to generate a new API Key.
|
|
33
|
+
|
|
34
|
+
- Open the creation window
|
|
35
|
+
|
|
36
|
+
<Image
|
|
37
|
+
alt={'Open the creation window'}
|
|
38
|
+
inStep
|
|
39
|
+
src={
|
|
40
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296253192-ff2193dd-f125-4e58-82e8-91bc376c0d68.png'
|
|
41
|
+
}
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
- Create API Key
|
|
45
|
+
|
|
46
|
+
<Image
|
|
47
|
+
alt={'Create API Key'}
|
|
48
|
+
inStep
|
|
49
|
+
src={
|
|
50
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296254170-803bacf0-4471-4171-ae79-0eab08d621d1.png'
|
|
51
|
+
}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
- Retrieve API Key
|
|
55
|
+
|
|
56
|
+
<Image
|
|
57
|
+
alt={'Retrieve API Key'}
|
|
58
|
+
inStep
|
|
59
|
+
src={
|
|
60
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296255167-f2745f2b-f083-4ba8-bc78-9b558e0002de.png'
|
|
61
|
+
}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<Callout type={'warning'}>
|
|
65
|
+
After registering, you generally have a free credit of $5, but it is only valid for three months.
|
|
66
|
+
</Callout>
|
|
67
|
+
|
|
68
|
+
### Step 2: Configure OpenAI in LobeChat
|
|
69
|
+
|
|
70
|
+
- Visit the `Settings` page in LobeChat
|
|
71
|
+
- Find the setting for `OpenAI` under `Language Model`
|
|
72
|
+
|
|
73
|
+
<Image
|
|
74
|
+
alt={'Enter API Key'}
|
|
75
|
+
inStep
|
|
76
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/3f31bc33-509f-4ad2-ba81-280c2a6ec5fa'}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
- Enter the obtained API Key
|
|
80
|
+
- Choose an OpenAI model for your AI assistant to start the conversation
|
|
81
|
+
|
|
82
|
+
<Image
|
|
83
|
+
alt={'Select OpenAI model and start conversation'}
|
|
84
|
+
inStep
|
|
85
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/ff7ebacf-27f0-42d7-810b-00314499a084'}
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<Callout type={'warning'}>
|
|
89
|
+
During usage, you may need to pay the API service provider. Please refer to OpenAI's relevant
|
|
90
|
+
pricing policies.
|
|
91
|
+
</Callout>
|
|
92
|
+
|
|
93
|
+
</Steps>
|
|
94
|
+
|
|
95
|
+
You can now engage in conversations using the models provided by OpenAI in LobeChat.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 在 LobeChat 中使用 OpenAI
|
|
3
|
+
description: 学习如何在 LobeChat 中配置和使用 OpenAI 模型进行对话,包括获取 OpenAI API 密钥和设置步骤。
|
|
4
|
+
tags:
|
|
5
|
+
- LobeChat
|
|
6
|
+
- OpenAI
|
|
7
|
+
- API 密钥
|
|
8
|
+
- 配置
|
|
9
|
+
- 对话模型
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 在 LobeChat 中使用 OpenAI
|
|
13
|
+
|
|
14
|
+
<Image
|
|
15
|
+
alt={'在 LobeChat 中使用 OpenAI'}
|
|
16
|
+
cover
|
|
17
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/c9e5eafc-ca22-496b-a88d-cc0ae53bf720'}
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
本文档将指导你如何在 LobeChat 中使用 [OpenAI](https://openai.com/):
|
|
21
|
+
|
|
22
|
+
<Steps>
|
|
23
|
+
|
|
24
|
+
### 步骤一:获取 OpenAI API 密钥
|
|
25
|
+
|
|
26
|
+
- 注册一个 [OpenAI 账户](https://platform.openai.com/signup),你需要使用国际手机号、非大陆邮箱进行注册;
|
|
27
|
+
- 注册完毕后,前往 [API Keys](https://platform.openai.com/api-keys) 页面,点击 `Create new secret key` 创建新的 API Key:
|
|
28
|
+
|
|
29
|
+
- 打开创建窗口
|
|
30
|
+
|
|
31
|
+
<Image
|
|
32
|
+
alt={'打开创建窗口'}
|
|
33
|
+
inStep
|
|
34
|
+
src={
|
|
35
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296253192-ff2193dd-f125-4e58-82e8-91bc376c0d68.png'
|
|
36
|
+
}
|
|
37
|
+
/>
|
|
38
|
+
|
|
39
|
+
- 创建 API Key
|
|
40
|
+
|
|
41
|
+
<Image
|
|
42
|
+
alt={'创建 API Key'}
|
|
43
|
+
inStep
|
|
44
|
+
src={
|
|
45
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296254170-803bacf0-4471-4171-ae79-0eab08d621d1.png'
|
|
46
|
+
}
|
|
47
|
+
/>
|
|
48
|
+
|
|
49
|
+
- 获取 API Key
|
|
50
|
+
|
|
51
|
+
<Image
|
|
52
|
+
alt={'获取 API Key'}
|
|
53
|
+
inStep
|
|
54
|
+
src={
|
|
55
|
+
'https://github-production-user-asset-6210df.s3.amazonaws.com/28616219/296255167-f2745f2b-f083-4ba8-bc78-9b558e0002de.png'
|
|
56
|
+
}
|
|
57
|
+
/>
|
|
58
|
+
|
|
59
|
+
<Callout type={'warning'}>账户注册后,一般有 5 美元的免费额度,但有效期只有三个月。</Callout>
|
|
60
|
+
|
|
61
|
+
### 步骤二:在 LobeChat 中配置 OpenAI
|
|
62
|
+
|
|
63
|
+
- 访问 LobeChat 的`设置`界面
|
|
64
|
+
- 在`语言模型`下找到`OpenAI`的设置项
|
|
65
|
+
|
|
66
|
+
<Image
|
|
67
|
+
alt={'填入 API 密钥'}
|
|
68
|
+
inStep
|
|
69
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/3f31bc33-509f-4ad2-ba81-280c2a6ec5fa'}
|
|
70
|
+
/>
|
|
71
|
+
|
|
72
|
+
- 填入获得的 API 密钥
|
|
73
|
+
- 为你的 AI 助手选择一个 OpenAI 的模型即可开始对话
|
|
74
|
+
|
|
75
|
+
<Image
|
|
76
|
+
alt={'选择 OpenAI 模型并开始对话'}
|
|
77
|
+
inStep
|
|
78
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/ff7ebacf-27f0-42d7-810b-00314499a084'}
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
<Callout type={'warning'}>
|
|
82
|
+
在使用过程中你可能需要向 API 服务提供商付费,请参考 OpenAI 的相关费用政策。
|
|
83
|
+
</Callout>
|
|
84
|
+
|
|
85
|
+
</Steps>
|
|
86
|
+
|
|
87
|
+
至此你已经可以在 LobeChat 中使用 OpenAI 提供的模型进行对话了。
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Using OpenRouter in LobeChat
|
|
3
|
+
description: >-
|
|
4
|
+
Learn how to integrate and utilize OpenRouter's language model APIs in
|
|
5
|
+
LobeChat. Follow these steps to register, create an API key, recharge credit,
|
|
6
|
+
and configure OpenRouter for seamless conversations.
|
|
7
|
+
tags:
|
|
8
|
+
- OpenRouter
|
|
9
|
+
- LobeChat
|
|
10
|
+
- API Key
|
|
11
|
+
- Language Models
|
|
12
|
+
- Conversation Integration
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Using OpenRouter in LobeChat
|
|
16
|
+
|
|
17
|
+
<Image
|
|
18
|
+
alt={'Using OpenRouter in LobeChat'}
|
|
19
|
+
cover
|
|
20
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/40520a43-ac03-4954-8a4d-282fbb946066'}
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
[OpenRouter](https://openrouter.ai/) is a service that provides a variety of excellent large language model APIs, supporting models such as OpenAI (including GPT-3.5/4), Anthropic (Claude2, Instant), LLaMA 2, and PaLM Bison.
|
|
24
|
+
|
|
25
|
+
This document will guide you on how to use OpenRouter in LobeChat:
|
|
26
|
+
|
|
27
|
+
<Steps>
|
|
28
|
+
|
|
29
|
+
### Step 1: Register and Log in to OpenRouter
|
|
30
|
+
|
|
31
|
+
- Visit [OpenRouter.ai](https://openrouter.ai/) and create an account
|
|
32
|
+
- You can log in using your Google account or MetaMask wallet
|
|
33
|
+
|
|
34
|
+
<Image
|
|
35
|
+
alt={'Register OpenRouter'}
|
|
36
|
+
height={457}
|
|
37
|
+
inStep
|
|
38
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/a024af40-e1d9-4df0-b998-0e6e87cebe5b'}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
### Step 2: Create an API Key
|
|
42
|
+
|
|
43
|
+
- Go to the `Keys` menu or visit [OpenRouter Keys](https://openrouter.ai/keys) directly
|
|
44
|
+
- Click on `Create Key` to start the creation process
|
|
45
|
+
- Name your API key in the pop-up dialog, for example, "LobeChat Key"
|
|
46
|
+
- Leave the `Credit limit` blank to indicate no amount limit
|
|
47
|
+
|
|
48
|
+
<Image
|
|
49
|
+
alt={'Create OpenRouter Key'}
|
|
50
|
+
height={460}
|
|
51
|
+
inStep
|
|
52
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/094d701f-ce80-464a-bbbc-0a5ecc8d08e3'}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
- Copy the API key from the pop-up dialog and save it securely
|
|
56
|
+
|
|
57
|
+
<Image
|
|
58
|
+
alt={'Get OpenRouter Key'}
|
|
59
|
+
height={519}
|
|
60
|
+
inStep
|
|
61
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/7a012a11-87bd-4366-a567-0ebf6d12ae10'}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<Callout type={'warning'}>
|
|
65
|
+
Please store the key securely as it will only appear once. If you lose it accidentally, you will
|
|
66
|
+
need to create a new key.
|
|
67
|
+
</Callout>
|
|
68
|
+
|
|
69
|
+
### Step 3: Recharge Credit
|
|
70
|
+
|
|
71
|
+
- Go to the `Credit` menu or visit [OpenRouter Credit](https://openrouter.ai/credits) directly
|
|
72
|
+
- Click on `Manage Credits` to recharge your credit, you can check model prices at [https://openrouter.ai/models](https://openrouter.ai/models)
|
|
73
|
+
- OpenRouter provides some free models that can be used without recharging
|
|
74
|
+
|
|
75
|
+
<Image
|
|
76
|
+
alt={'Recharge OpenRouter Credit'}
|
|
77
|
+
height={385}
|
|
78
|
+
inStep
|
|
79
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/50b73232-01fc-4ef0-939a-3e06354d1b5a'}
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
### Step 4: Configure OpenRouter in LobeChat
|
|
83
|
+
|
|
84
|
+
- Visit the `Settings` interface in LobeChat
|
|
85
|
+
- Find the setting for `OpenRouter` under `Language Models`
|
|
86
|
+
- Enable OpenRouter and enter the API key you obtained
|
|
87
|
+
|
|
88
|
+
<Image
|
|
89
|
+
alt={'Configure OpenRouter in LobeChat'}
|
|
90
|
+
height={518}
|
|
91
|
+
inStep
|
|
92
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/5c3898ab-23d7-44c2-bbd9-b255e25e400c'}
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
- Choose an OpenRouter model for your assistant to start the conversation
|
|
96
|
+
|
|
97
|
+
<Image
|
|
98
|
+
alt={'Use OpenRouter model'}
|
|
99
|
+
height={518}
|
|
100
|
+
inStep
|
|
101
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/77b5feee-3f46-486d-9a36-31ff60efa5e9'}
|
|
102
|
+
/>
|
|
103
|
+
|
|
104
|
+
<Callout type={'warning'}>
|
|
105
|
+
You may need to pay the API service provider during usage, please refer to OpenRouter's relevant
|
|
106
|
+
fee policies.
|
|
107
|
+
</Callout>
|
|
108
|
+
|
|
109
|
+
</Steps>
|
|
110
|
+
|
|
111
|
+
You can now engage in conversations using the models provided by OpenRouter in LobeChat.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 在 LobeChat 中使用 OpenRouter
|
|
3
|
+
description: 学习如何在 LobeChat 中注册、创建 API 密钥、充值信用额度并配置 OpenRouter,以便开始使用多种优秀大语言模型 API。
|
|
4
|
+
tags:
|
|
5
|
+
- LobeChat
|
|
6
|
+
- OpenRouter
|
|
7
|
+
- API
|
|
8
|
+
- 语言模型
|
|
9
|
+
- 注册
|
|
10
|
+
- API密钥
|
|
11
|
+
- 信用额度
|
|
12
|
+
- 配置
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# 在 LobeChat 中使用 OpenRouter
|
|
16
|
+
|
|
17
|
+
<Image
|
|
18
|
+
alt={'在 LobeChat 中使用 OpenRouter'}
|
|
19
|
+
cover
|
|
20
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/40520a43-ac03-4954-8a4d-282fbb946066'}
|
|
21
|
+
/>
|
|
22
|
+
|
|
23
|
+
[OpenRouter](https://openrouter.ai/) 是一个提供多种优秀大语言模型 API 的服务,它支持 OpenAI (包括 GPT-3.5/4)、Anthropic (Claude2、Instant)、LLaMA 2 和 PaLM Bison 等众多模型。
|
|
24
|
+
|
|
25
|
+
本文档将指导你如何在 LobeChat 中使用 OpenRouter:
|
|
26
|
+
|
|
27
|
+
<Steps>
|
|
28
|
+
|
|
29
|
+
### 步骤一:注册 OpenRouter 账号并登录
|
|
30
|
+
|
|
31
|
+
- 访问 [OpenRouter.ai](https://openrouter.ai/) 并创建一个账号
|
|
32
|
+
- 你可以用 Google 账号或 MetaMask 钱包登录
|
|
33
|
+
|
|
34
|
+
<Image
|
|
35
|
+
alt={'注册 OpenRouter'}
|
|
36
|
+
height={457}
|
|
37
|
+
inStep
|
|
38
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/a024af40-e1d9-4df0-b998-0e6e87cebe5b'}
|
|
39
|
+
/>
|
|
40
|
+
|
|
41
|
+
### 步骤二:创建 API 密钥
|
|
42
|
+
|
|
43
|
+
- 进入 `Keys` 菜单或直接访问 [OpenRouter Keys](https://openrouter.ai/keys)
|
|
44
|
+
- 点击 `Create Key` 开始创建
|
|
45
|
+
- 在弹出对话框中为 API 密钥取一个名字,例如 "LobeChat Key"
|
|
46
|
+
- 留空 `Credit limit` 表示不设置金额限制
|
|
47
|
+
|
|
48
|
+
<Image
|
|
49
|
+
alt={'创建 OpenRouter Key'}
|
|
50
|
+
height={460}
|
|
51
|
+
inStep
|
|
52
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/094d701f-ce80-464a-bbbc-0a5ecc8d08e3'}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
- 在弹出的对话框中复制 API 密钥,并妥善保存
|
|
56
|
+
|
|
57
|
+
<Image
|
|
58
|
+
alt={'获取 OpenRouter Key'}
|
|
59
|
+
height={519}
|
|
60
|
+
inStep
|
|
61
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/7a012a11-87bd-4366-a567-0ebf6d12ae10'}
|
|
62
|
+
/>
|
|
63
|
+
|
|
64
|
+
<Callout type={'warning'}>
|
|
65
|
+
请安全地存储密钥,因为它只会出现一次。如果您意外丢失它,您将需要创建一个新密钥。
|
|
66
|
+
</Callout>
|
|
67
|
+
|
|
68
|
+
### 步骤三:充值信用额度
|
|
69
|
+
|
|
70
|
+
- 进入 `Credit` 菜单,或直接访问 [OpenRouter Credit](https://openrouter.ai/credits)
|
|
71
|
+
- 点击 `Manage Credits` 充值信用额度,在 [https://openrouter.ai/models](https://openrouter.ai/models) 中可以查看模型价格
|
|
72
|
+
- OpenRouter 提供了一些免费模型,未充值的情况下可以使用
|
|
73
|
+
|
|
74
|
+
<Image
|
|
75
|
+
alt={'充值 OpenRouter 信用额度'}
|
|
76
|
+
height={385}
|
|
77
|
+
inStep
|
|
78
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/50b73232-01fc-4ef0-939a-3e06354d1b5a'}
|
|
79
|
+
/>
|
|
80
|
+
|
|
81
|
+
### 步骤四:在 LobeChat 中配置 OpenRouter
|
|
82
|
+
|
|
83
|
+
- 访问 LobeChat 的 `设置` 界面
|
|
84
|
+
- 在 `语言模型` 下找到 `OpenRouter` 的设置项
|
|
85
|
+
- 打开 OpenRouter 并填入获得的 API 密钥
|
|
86
|
+
|
|
87
|
+
<Image
|
|
88
|
+
alt={'在 LobeChat 中配置 OpenRouter'}
|
|
89
|
+
height={518}
|
|
90
|
+
inStep
|
|
91
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/5c3898ab-23d7-44c2-bbd9-b255e25e400c'}
|
|
92
|
+
/>
|
|
93
|
+
|
|
94
|
+
- 为你的助手选择一个 OpenRouter 模型即可开始对话
|
|
95
|
+
|
|
96
|
+
<Image
|
|
97
|
+
alt={'使用 OpenRouter 模型'}
|
|
98
|
+
height={518}
|
|
99
|
+
inStep
|
|
100
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/77b5feee-3f46-486d-9a36-31ff60efa5e9'}
|
|
101
|
+
/>
|
|
102
|
+
|
|
103
|
+
<Callout type={'warning'}>
|
|
104
|
+
在使用过程中你可能需要向 API 服务提供商付费,请参考 OpenRouter 的相关费用政策。
|
|
105
|
+
</Callout>
|
|
106
|
+
|
|
107
|
+
</Steps>
|
|
108
|
+
|
|
109
|
+
至此你已经可以在 LobeChat 中使用 OpenRouter 提供的模型进行对话了。
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Using Perplexity AI in LobeChat
|
|
3
|
+
description: >-
|
|
4
|
+
Learn how to integrate and use Perplexity AI in LobeChat to enhance your AI
|
|
5
|
+
assistant's capabilities.
|
|
6
|
+
tags:
|
|
7
|
+
- Perplexity AI
|
|
8
|
+
- LobeChat
|
|
9
|
+
- AI integration
|
|
10
|
+
- API key
|
|
11
|
+
- Language Model
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Using Perplexity AI in LobeChat
|
|
15
|
+
|
|
16
|
+
<Image
|
|
17
|
+
alt={'Using Perplexity AI in LobeChat'}
|
|
18
|
+
cover
|
|
19
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/0c2c399f-2ed3-44b5-97c8-53e007e8c095'}
|
|
20
|
+
/>
|
|
21
|
+
|
|
22
|
+
The Perplexity AI API is now available for everyone to use. This document will guide you on how to use [Perplexity AI](https://www.perplexity.ai/) in LobeChat:
|
|
23
|
+
|
|
24
|
+
<Steps>
|
|
25
|
+
|
|
26
|
+
### Step 1: Obtain Perplexity AI API Key
|
|
27
|
+
|
|
28
|
+
- Create a [Perplexity AI](https://www.perplexity.ai/) account
|
|
29
|
+
- Obtain your [API key](https://www.perplexity.ai/settings/api)
|
|
30
|
+
|
|
31
|
+
<Image
|
|
32
|
+
alt={'Create API Key'}
|
|
33
|
+
inStep
|
|
34
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/80e22593-dc0f-482c-99bf-69acdb62d952'}
|
|
35
|
+
/>
|
|
36
|
+
|
|
37
|
+
### Step 2: Configure Perplexity AI in LobeChat
|
|
38
|
+
|
|
39
|
+
- Go to the `Settings` interface in LobeChat
|
|
40
|
+
- Find the setting for `Perplexity AI` under `Language Model`
|
|
41
|
+
|
|
42
|
+
<Image
|
|
43
|
+
alt={'Enter API Key'}
|
|
44
|
+
inStep
|
|
45
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/51f8f8f6-5d8a-4cf0-a2e5-d96c69fe05b8'}
|
|
46
|
+
/>
|
|
47
|
+
|
|
48
|
+
- Enter the API key you obtained
|
|
49
|
+
- Choose a Perplexity AI model for your AI assistant to start the conversation
|
|
50
|
+
|
|
51
|
+
<Image
|
|
52
|
+
alt={'Select Perplexity AI model and start conversation'}
|
|
53
|
+
inStep
|
|
54
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/e6a429cb-96e1-4e85-9aa3-1334ffcad8c0'}
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<Callout type={'warning'}>
|
|
58
|
+
During usage, you may need to pay the API service provider. Please refer to Perplexity AI's
|
|
59
|
+
relevant pricing policies.
|
|
60
|
+
</Callout>
|
|
61
|
+
|
|
62
|
+
</Steps>
|
|
63
|
+
|
|
64
|
+
You can now engage in conversations using the models provided by Perplexity AI in LobeChat.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: 在 LobeChat 中使用 Perplexity AI
|
|
3
|
+
description: 学习如何在 LobeChat 中配置和使用 Perplexity AI,获取 API 密钥并选择适合的语言模型开始对话。
|
|
4
|
+
tags:
|
|
5
|
+
- Perplexity AI
|
|
6
|
+
- LobeChat
|
|
7
|
+
- API 密钥
|
|
8
|
+
- 语言模型
|
|
9
|
+
- AI 助手
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# 在 LobeChat 中使用 Perplexity AI
|
|
13
|
+
|
|
14
|
+
<Image
|
|
15
|
+
alt={'在 LobeChat 中使用 Perplexity AI'}
|
|
16
|
+
cover
|
|
17
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/0c2c399f-2ed3-44b5-97c8-53e007e8c095'}
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
Perplexity AI API 现在可供所有人使用, 本文档将指导你如何在 LobeChat 中使用 [Perplexity AI](https://www.perplexity.ai/):
|
|
21
|
+
|
|
22
|
+
<Steps>
|
|
23
|
+
|
|
24
|
+
### 步骤一:获取 Perplexity AI API 密钥
|
|
25
|
+
|
|
26
|
+
- 创建一个 [Perplexity AI](https://www.perplexity.ai/) 帐户
|
|
27
|
+
- 获取您的 [API 密钥](https://www.perplexity.ai/settings/api)
|
|
28
|
+
|
|
29
|
+
<Image
|
|
30
|
+
alt={'创建 API Key'}
|
|
31
|
+
inStep
|
|
32
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/80e22593-dc0f-482c-99bf-69acdb62d952'}
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
### 步骤二:在 LobeChat 中配置 Perplexity AI
|
|
36
|
+
|
|
37
|
+
- 访问 LobeChat 的`设置`界面
|
|
38
|
+
- 在`语言模型`下找到`Perplexity AI`的设置项
|
|
39
|
+
|
|
40
|
+
<Image
|
|
41
|
+
alt={'填入 API 密钥'}
|
|
42
|
+
inStep
|
|
43
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/51f8f8f6-5d8a-4cf0-a2e5-d96c69fe05b8'}
|
|
44
|
+
/>
|
|
45
|
+
|
|
46
|
+
- 填入获得的 API 密钥
|
|
47
|
+
- 为你的 AI 助手选择一个 Perplexity AI 的模型即可开始对话
|
|
48
|
+
|
|
49
|
+
<Image
|
|
50
|
+
alt={'选择 Perplexity AI 模型并开始对话'}
|
|
51
|
+
inStep
|
|
52
|
+
src={'https://github.com/lobehub/lobe-chat/assets/17870709/e6a429cb-96e1-4e85-9aa3-1334ffcad8c0'}
|
|
53
|
+
/>
|
|
54
|
+
|
|
55
|
+
<Callout type={'warning'}>
|
|
56
|
+
在使用过程中你可能需要向 API 服务提供商付费,请参考 Perplexity AI 的相关费用政策。
|
|
57
|
+
</Callout>
|
|
58
|
+
|
|
59
|
+
</Steps>
|
|
60
|
+
|
|
61
|
+
至此你已经可以在 LobeChat 中使用 Perplexity AI 提供的模型进行对话了。
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Using Tongyi Qianwen in LobeChat
|
|
3
|
+
description: >-
|
|
4
|
+
Learn how to integrate and utilize Tongyi Qianwen, a powerful language model
|
|
5
|
+
by Alibaba Cloud, in LobeChat for various tasks. Follow the steps to activate
|
|
6
|
+
the service, obtain the API key, and configure Tongyi Qianwen for seamless
|
|
7
|
+
interaction.
|
|
8
|
+
tags:
|
|
9
|
+
- Tongyi Qianwen
|
|
10
|
+
- Alibaba Cloud
|
|
11
|
+
- LobeChat
|
|
12
|
+
- DashScope
|
|
13
|
+
- API Key
|
|
14
|
+
- Language Model
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# Using Tongyi Qianwen in LobeChat
|
|
18
|
+
|
|
19
|
+
<Image
|
|
20
|
+
alt={'Using Tongyi Qianwen in LobeChat'}
|
|
21
|
+
cover
|
|
22
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/4e057b43-1e3e-4e96-a948-7cdbff303dcb'}
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
[Tongyi Qianwen](https://tongyi.aliyun.com/) is a large-scale language model independently developed by Alibaba Cloud, with powerful natural language understanding and generation capabilities. It can answer various questions, create text content, express opinions, write code, and play a role in multiple fields.
|
|
26
|
+
|
|
27
|
+
This document will guide you on how to use Tongyi Qianwen in LobeChat:
|
|
28
|
+
|
|
29
|
+
<Steps>
|
|
30
|
+
|
|
31
|
+
### Step 1: Activate DashScope Model Service
|
|
32
|
+
|
|
33
|
+
- Visit and log in to Alibaba Cloud's [DashScope](https://dashscope.console.aliyun.com/) platform.
|
|
34
|
+
- If it is your first time, you need to activate the DashScope service.
|
|
35
|
+
- If you have already activated it, you can skip this step.
|
|
36
|
+
|
|
37
|
+
<Image
|
|
38
|
+
alt={'Activate DashScope service'}
|
|
39
|
+
inStep
|
|
40
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/4f8d0102-7ca7-4f23-b96f-3fc5cf2cd66e'}
|
|
41
|
+
/>
|
|
42
|
+
|
|
43
|
+
### Step 2: Obtain DashScope API Key
|
|
44
|
+
|
|
45
|
+
- Go to the `API-KEY` interface and create an API key.
|
|
46
|
+
|
|
47
|
+
<Image
|
|
48
|
+
alt={'Create Tongyi Qianwen API key'}
|
|
49
|
+
inStep
|
|
50
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/eee046cb-189b-4635-ac94-19d50b17a18a'}
|
|
51
|
+
/>
|
|
52
|
+
|
|
53
|
+
- Copy the API key from the pop-up dialog box and save it securely.
|
|
54
|
+
|
|
55
|
+
<Image
|
|
56
|
+
alt={'Copy Tongyi Qianwen API key'}
|
|
57
|
+
inStep
|
|
58
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/cec2e032-54e1-49b1-a212-4d9736927156'}
|
|
59
|
+
/>
|
|
60
|
+
|
|
61
|
+
<Callout type={'warning'}>
|
|
62
|
+
Please store the key securely as it will only appear once. If you accidentally lose it, you will
|
|
63
|
+
need to create a new key.
|
|
64
|
+
</Callout>
|
|
65
|
+
|
|
66
|
+
### Step 3: Configure Tongyi Qianwen in LobeChat
|
|
67
|
+
|
|
68
|
+
- Visit the `Settings` interface in LobeChat.
|
|
69
|
+
- Find the setting for `Tongyi Qianwen` under `Language Model`.
|
|
70
|
+
|
|
71
|
+
<Image
|
|
72
|
+
alt={'Enter API key'}
|
|
73
|
+
inStep
|
|
74
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/c2e6a58b-95eb-4f40-8add-83f4316a719b'}
|
|
75
|
+
/>
|
|
76
|
+
|
|
77
|
+
- Open Tongyi Qianwen and enter the obtained API key.
|
|
78
|
+
- Choose a Qwen model for your AI assistant to start the conversation.
|
|
79
|
+
|
|
80
|
+
<Image
|
|
81
|
+
alt={'Select Qwen model and start conversation'}
|
|
82
|
+
inStep
|
|
83
|
+
src={'https://github.com/lobehub/lobe-chat/assets/34400653/f4a23c2a-503e-4731-bc4d-922bce0b6039'}
|
|
84
|
+
/>
|
|
85
|
+
|
|
86
|
+
<Callout type={'warning'}>
|
|
87
|
+
During usage, you may need to pay the API service provider. Please refer to Tongyi Qianwen's
|
|
88
|
+
relevant pricing policies.
|
|
89
|
+
</Callout>
|
|
90
|
+
|
|
91
|
+
</Steps>
|
|
92
|
+
|
|
93
|
+
You can now engage in conversations using the models provided by Tongyi Qianwen in LobeChat.
|