You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+40
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Quickly launch an intelligent customer service system with Flask, LLM, RAG, incl
18
18
-[Using OpenAI as the LLM base](#using-openai-as-the-llm-base)
19
19
-[Using ZhipuAI as the LLM base](#using-zhipuai-as-the-llm-base)
20
20
-[Using DeepSeek as the LLM base](#using-deepseek-as-the-llm-base)
21
+
-[Using Moonshot as the LLM base](#using-moonshot-as-the-llm-base)
21
22
-[Using local LLMs](#using-local-llms)
22
23
-[Step 3: Deploy RAG-GPT](#step-3-deploy-rag-gpt)
23
24
-[Deploy RAG-GPT using Docker](#deploy-rag-gpt-using-docker)
@@ -168,6 +169,45 @@ LLAMA_CLOUD_API_KEY="xxxx"
168
169
- Adjust **`URL_PREFIX`** to match your website's domain. This is mainly for generating accessible URL links for uploaded local files. Such as `http://127.0.0.1:7000/web/download_dir/2024_05_20/d3a01d6a-90cd-4c2a-b926-9cda12466caf/openssl-cookbook.pdf`.
169
170
- For more information about the meanings and usages of constants, you can check under the `server/constant` directory.
170
171
172
+
173
+
#### Using Moonshot as the LLM base
174
+
175
+
If you cannot use OpenAI's API services, consider using Moonshot as an alternative.
176
+
177
+
> [!NOTE]
178
+
> Moonshot does not provide an `Embedding API`, so here we use ZhipuAI's `Embedding API`.
179
+
180
+
181
+
```shell
182
+
cp env_of_moonshot .env
183
+
```
184
+
185
+
The variables in .env
186
+
187
+
```shell
188
+
LLM_NAME="Moonshot"
189
+
ZHIPUAI_API_KEY="xxxx"
190
+
MOONSHOT_API_KEY="xxxx"
191
+
MOONSHOT_MODEL_NAME="moonshot-v1-8k"
192
+
MIN_RELEVANCE_SCORE=0.4
193
+
BOT_TOPIC="xxxx"
194
+
URL_PREFIX="http://127.0.0.1:7000/"
195
+
USE_PREPROCESS_QUERY=1
196
+
USE_RERANKING=1
197
+
USE_DEBUG=0
198
+
USE_LLAMA_PARSE=0
199
+
LLAMA_CLOUD_API_KEY="xxxx"
200
+
```
201
+
202
+
- Don't modify **`LLM_NAME`**
203
+
- Modify the **`ZHIPUAI_API_KEY`** with your own key. Please log in to the [ZhipuAI website](https://open.bigmodel.cn/usercenter/apikeys) to view your API Key.
204
+
- Modify the **`MOONSHOT_API_KEY`** with your own key. Please log in to the [Moonshot website](https://platform.moonshot.cn/console/api-keys) to view your API Key.
205
+
- Update the **`MOONSHOT_MODEL_NAME `** setting if you want to use other models of Moonshot.
206
+
- Change **`BOT_TOPIC`** to reflect your Bot's name. This is very important, as it will be used in `Prompt Construction`. Please try to use a concise and clear word, such as `OpenIM`, `LangChain`.
207
+
- Adjust **`URL_PREFIX`** to match your website's domain. This is mainly for generating accessible URL links for uploaded local files. Such as `http://127.0.0.1:7000/web/download_dir/2024_05_20/d3a01d6a-90cd-4c2a-b926-9cda12466caf/openssl-cookbook.pdf`.
208
+
- For more information about the meanings and usages of constants, you can check under the `server/constant` directory.
209
+
210
+
171
211
#### Using local LLMs
172
212
173
213
If your knowledge base involves **sensitive information** and you prefer not to use cloud-based LLMs, consider using `Ollama` to deploy large models locally.
0 commit comments