writinwaters
commited on
Commit
·
9cbbfbf
1
Parent(s):
d1efcef
Updated the doc for configuring api key (#1112)
Browse files### What problem does this PR solve?
#720
### Type of change
- [x] Documentation Update
- README.md +1 -1
- docs/guides/configure_knowledge_base.md +1 -1
- docs/guides/llm_api_key_setup.md +48 -16
- docs/guides/manage_files.md +1 -1
- docs/guides/start_chat.md +1 -1
- docs/quickstart.mdx +5 -5
README.md
CHANGED
@@ -182,7 +182,7 @@ Try our demo at [https://demo.ragflow.io](https://demo.ragflow.io).
|
|
182 |
> If you skip this confirmation step and directly log in to RAGFlow, your browser may prompt a `network anomaly` error because, at that moment, your RAGFlow may not be fully initialized.
|
183 |
|
184 |
5. In your web browser, enter the IP address of your server and log in to RAGFlow.
|
185 |
-
> With default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
|
186 |
6. In [service_conf.yaml](./docker/service_conf.yaml), select the desired LLM factory in `user_default_llm` and update the `API_KEY` field with the corresponding API key.
|
187 |
|
188 |
> See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
|
|
|
182 |
> If you skip this confirmation step and directly log in to RAGFlow, your browser may prompt a `network anomaly` error because, at that moment, your RAGFlow may not be fully initialized.
|
183 |
|
184 |
5. In your web browser, enter the IP address of your server and log in to RAGFlow.
|
185 |
+
> With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
|
186 |
6. In [service_conf.yaml](./docker/service_conf.yaml), select the desired LLM factory in `user_default_llm` and update the `API_KEY` field with the corresponding API key.
|
187 |
|
188 |
> See [llm_api_key_setup](https://ragflow.io/docs/dev/llm_api_key_setup) for more information.
|
docs/guides/configure_knowledge_base.md
CHANGED
@@ -5,7 +5,7 @@ slug: /configure_knowledge_base
|
|
5 |
|
6 |
# Configure a knowledge base
|
7 |
|
8 |
-
Knowledge base, hallucination-free chat, and file management are three pillars of RAGFlow. RAGFlow's AI chats are based on knowledge bases. Each of RAGFlow's knowledge bases serves as a knowledge source, *parsing* files uploaded from your local machine and file references generated in **File Management** into the real 'knowledge' for future AI chats. This guide demonstrates some basic usages of the knowledge base feature, covering the following topics:
|
9 |
|
10 |
- Create a knowledge base
|
11 |
- Configure a knowledge base
|
|
|
5 |
|
6 |
# Configure a knowledge base
|
7 |
|
8 |
+
Knowledge base, hallucination-free chat, and file management are the three pillars of RAGFlow. RAGFlow's AI chats are based on knowledge bases. Each of RAGFlow's knowledge bases serves as a knowledge source, *parsing* files uploaded from your local machine and file references generated in **File Management** into the real 'knowledge' for future AI chats. This guide demonstrates some basic usages of the knowledge base feature, covering the following topics:
|
9 |
|
10 |
- Create a knowledge base
|
11 |
- Configure a knowledge base
|
docs/guides/llm_api_key_setup.md
CHANGED
@@ -3,28 +3,60 @@ sidebar_position: 4
|
|
3 |
slug: /llm_api_key_setup
|
4 |
---
|
5 |
|
6 |
-
#
|
7 |
|
8 |
-
|
9 |
|
10 |
-
##
|
11 |
|
12 |
-
|
13 |
-
RAGFlow supports the flowing LLMs, with more coming in the pipeline:
|
14 |
|
15 |
-
- [OpenAI](https://platform.openai.com/login?launch)
|
16 |
-
- [Tongyi-Qianwen](https://dashscope.console.aliyun.com/model),
|
17 |
-
- [ZHIPU-AI](https://open.bigmodel.cn/),
|
18 |
-
- [Moonshot](https://platform.moonshot.cn/docs)
|
19 |
-
- [DeepSeek](https://platform.deepseek.com/api-docs/)
|
20 |
-
- [Baichuan](https://www.baichuan-ai.com/home)
|
21 |
-
- [VolcEngine](https://www.volcengine.com/docs/82379)
|
22 |
|
23 |
-
|
|
|
|
|
24 |
|
25 |
-
##
|
26 |
|
27 |
-
You
|
28 |
|
29 |
-
|
|
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
slug: /llm_api_key_setup
|
4 |
---
|
5 |
|
6 |
+
# Configure your API key
|
7 |
|
8 |
+
An API key is required for RAGFlow to interact with an online AI model. This guide provides information about setting your API key in RAGFlow.
|
9 |
|
10 |
+
## Get your API key
|
11 |
|
12 |
+
For now, RAGFlow supports the following online LLMs. Clik the corresponding link to apply for your API key. Most LLM providers grant newly-created accounts trial credit, which will expire in a couple of months, or a promotional amount of free quota.
|
|
|
13 |
|
14 |
+
- [OpenAI](https://platform.openai.com/login?launch),
|
15 |
+
- [Tongyi-Qianwen](https://dashscope.console.aliyun.com/model),
|
16 |
+
- [ZHIPU-AI](https://open.bigmodel.cn/),
|
17 |
+
- [Moonshot](https://platform.moonshot.cn/docs),
|
18 |
+
- [DeepSeek](https://platform.deepseek.com/api-docs/),
|
19 |
+
- [Baichuan](https://www.baichuan-ai.com/home),
|
20 |
+
- [VolcEngine](https://www.volcengine.com/docs/82379).
|
21 |
|
22 |
+
:::note
|
23 |
+
If you find your online LLM is not on the list, don't feel disheartened. The list is expanding, and you can [file a feature request](https://github.com/infiniflow/ragflow/issues/new?assignees=&labels=feature+request&projects=&template=feature_request.yml&title=%5BFeature+Request%5D%3A+) with us! Alternatively, if you have customized models or have locally-deployed models, you can [bind them to RAGFlow using Ollama or Xinference](./deploy_local_llm.md).
|
24 |
+
:::
|
25 |
|
26 |
+
## Configure your API key
|
27 |
|
28 |
+
You have two options for configuring your API key:
|
29 |
|
30 |
+
- Configure it in **service_conf.yaml** before starting RAGFlow.
|
31 |
+
- Configure it on the **Model Providers** page after logging into RAGFlow.
|
32 |
|
33 |
+
### Configure API key before starting up RAGFlow
|
34 |
+
|
35 |
+
1. Navigate to **./docker/ragflow**.
|
36 |
+
2. Find entry **user_default_llm**:
|
37 |
+
- Update `factory` with your chosen LLM.
|
38 |
+
- Update `api_key` with yours.
|
39 |
+
- Update `base_url` if you use a proxy to connect to the remote service.
|
40 |
+
3. Reboot your system for your changes to take effect.
|
41 |
+
4. Log into RAGFlow.
|
42 |
+
_After logging into RAGFlow, you will find your chosen model appears under **Added models** on the **Model Providers** page._
|
43 |
+
|
44 |
+
### Configure API key after logging into RAGFlow
|
45 |
+
|
46 |
+
:::caution WARNING
|
47 |
+
After logging into RAGFlow, configuring API key through the **service_conf.yaml** file will no longer take effect.
|
48 |
+
:::
|
49 |
+
|
50 |
+
After logging into RAGFlow, you You can *only* configure API Key on the **Model Providers** page:
|
51 |
+
|
52 |
+
1. Click on your logo on the top right of the page **>** **Model Providers**.
|
53 |
+
2. Find your model card under **Models to be added** and click **Add the model**:
|
54 |
+

|
55 |
+
3. Paste your API key.
|
56 |
+
4. Fill in your base URL if you use a proxy to connect to the remote service.
|
57 |
+
5. Click OK to confirm your changes.
|
58 |
+
|
59 |
+
:::note
|
60 |
+
If you wish to update an existing API key at a later point:
|
61 |
+

|
62 |
+
:::
|
docs/guides/manage_files.md
CHANGED
@@ -5,7 +5,7 @@ slug: /manage_files
|
|
5 |
|
6 |
# Manage files
|
7 |
|
8 |
-
Knowledge base, hallucination-free chat, and file management are three pillars of RAGFlow. RAGFlow's file management allows you to upload files individually or in bulk. You can then link an uploaded file to multiple target knowledge bases. This guide showcases some basic usages of the file management feature.
|
9 |
|
10 |
## Create folder
|
11 |
|
|
|
5 |
|
6 |
# Manage files
|
7 |
|
8 |
+
Knowledge base, hallucination-free chat, and file management are the three pillars of RAGFlow. RAGFlow's file management allows you to upload files individually or in bulk. You can then link an uploaded file to multiple target knowledge bases. This guide showcases some basic usages of the file management feature.
|
9 |
|
10 |
## Create folder
|
11 |
|
docs/guides/start_chat.md
CHANGED
@@ -5,7 +5,7 @@ slug: /start_chat
|
|
5 |
|
6 |
# Start an AI chat
|
7 |
|
8 |
-
Knowledge base, hallucination-free chat, and file management are three pillars of RAGFlow. Chats in RAGFlow are based on a particular knowledge base or multiple knowledge bases. Once you have created your knowledge base and finished file parsing, you can go ahead and start an AI conversation.
|
9 |
|
10 |
## Start an AI chat
|
11 |
|
|
|
5 |
|
6 |
# Start an AI chat
|
7 |
|
8 |
+
Knowledge base, hallucination-free chat, and file management are the three pillars of RAGFlow. Chats in RAGFlow are based on a particular knowledge base or multiple knowledge bases. Once you have created your knowledge base and finished file parsing, you can go ahead and start an AI conversation.
|
9 |
|
10 |
## Start an AI chat
|
11 |
|
docs/quickstart.mdx
CHANGED
@@ -18,10 +18,10 @@ This quick start guide describes a general process from:
|
|
18 |
|
19 |
## Prerequisites
|
20 |
|
21 |
-
- CPU ≥ 4 cores
|
22 |
-
- RAM ≥ 16 GB
|
23 |
-
- Disk ≥ 50 GB
|
24 |
-
- Docker ≥ 24.0.0 & Docker Compose ≥ v2.26.1
|
25 |
|
26 |
> If you have not installed Docker on your local machine (Windows, Mac, or Linux), see [Install Docker Engine](https://docs.docker.com/engine/install/).
|
27 |
|
@@ -169,7 +169,7 @@ This section provides instructions on setting up the RAGFlow server on Linux. If
|
|
169 |
5. In your web browser, enter the IP address of your server and log in to RAGFlow.
|
170 |
|
171 |
:::caution WARNING
|
172 |
-
With default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
|
173 |
:::
|
174 |
|
175 |
## Configure LLMs
|
|
|
18 |
|
19 |
## Prerequisites
|
20 |
|
21 |
+
- CPU ≥ 4 cores;
|
22 |
+
- RAM ≥ 16 GB;
|
23 |
+
- Disk ≥ 50 GB;
|
24 |
+
- Docker ≥ 24.0.0 & Docker Compose ≥ v2.26.1.
|
25 |
|
26 |
> If you have not installed Docker on your local machine (Windows, Mac, or Linux), see [Install Docker Engine](https://docs.docker.com/engine/install/).
|
27 |
|
|
|
169 |
5. In your web browser, enter the IP address of your server and log in to RAGFlow.
|
170 |
|
171 |
:::caution WARNING
|
172 |
+
With the default settings, you only need to enter `http://IP_OF_YOUR_MACHINE` (**sans** port number) as the default HTTP serving port `80` can be omitted when using the default configurations.
|
173 |
:::
|
174 |
|
175 |
## Configure LLMs
|