forked from milvus-io/bootcamp
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ChengZi <[email protected]>
- Loading branch information
1 parent
d55f6c1
commit e1e45c7
Showing
1 changed file
with
27 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,47 @@ | ||
# 使用Milvus部署FastGPT | ||
# Deploying FastGPT with Milvus | ||
[FastGPT](https://fastgpt.in/) is a knowledge-based question and answer system built on the LLM large language model, offering ready-to-use capabilities for data processing and model invocation. Furthermore, it enables workflow orchestration through Flow visualization, thus facilitating complex question and answer scenarios. This tutorial will guide you on how to swiftly deploy your own exclusive FastGPT application using [Milvus](https://milvus.io/). | ||
|
||
[FastGPT](https://fastgpt.in/) 是一个基于 LLM 大语言模型的知识库问答系统,提供开箱即用的数据处理、模型调用等能力。同时可以通过 Flow 可视化进行工作流编排,从而实现复杂的问答场景。本教程将介绍如何使用 [Milvus](https://milvus.io/) 快速部署一个你自己的专属 FastGPT 应用。 | ||
|
||
|
||
## 下载 docker-compose.yml | ||
|
||
请保证你的已经安装[Docker Compose](https://docs.docker.com/compose/). | ||
|
||
运行下面命令下载 docker-compose.yml 文件。 | ||
## Download docker-compose.yml | ||
Ensure that you have already installed [Docker Compose](https://docs.docker.com/compose/). | ||
Execute the command below to download the docker-compose.yml file. | ||
```shell | ||
mkdir fastgpt | ||
cd fastgpt | ||
curl -O https://raw.githubusercontent.com/labring/FastGPT/main/projects/app/data/config.json | ||
|
||
# milvus 版本 | ||
# milvus version | ||
curl -o docker-compose.yml https://raw.githubusercontent.com/labring/FastGPT/main/files/docker/docker-compose-milvus.yml | ||
# zilliz 版本 | ||
# zilliz version | ||
# curl -o docker-compose.yml https://raw.githubusercontent.com/labring/FastGPT/main/files/docker/docker-compose-zilliz.yml | ||
``` | ||
|
||
> 如果是Zilliz版本,修改docker-compose.yml文件中的`MILVUS_ADDRESS`和`MILVUS_TOKEN`链接参数,分别对应 [Zilliz Cloud](https://zilliz.com/cloud) 中的 [Public Endpoint 和 Api key](https://cdn.jsdelivr.net/gh/yangchuansheng/fastgpt-imgs@main/imgs/zilliz_key.png). | ||
``` | ||
> If you're using the Zilliz version, adjust the `MILVUS_ADDRESS` and `MILVUS_TOKEN` link parameters in the docker-compose.yml file, which corresponds to the [Public Endpoint and Api key](https://docs.zilliz.com/docs/on-zilliz-cloud-console#free-cluster-details) in [Zilliz Cloud](https://zilliz.com/cloud). | ||
## 启动容器 | ||
在 docker-compose.yml 同级目录下执行。请确保docker-compose版本最好在2.17以上,否则可能无法执行自动化命令。 | ||
## Launch the Container | ||
Execute in the same directory as docker-compose.yml. Ensure that the docker-compose version is ideally above 2.17, as some automation commands may not function otherwise. | ||
```shell | ||
# 启动容器 | ||
# Launch the container | ||
docker-compose up -d | ||
# 等待10s,OneAPI第一次总是要重启几次才能连上Mysql | ||
# Wait for 10s, OneAPI typically needs to restart a few times to initially connect to Mysql | ||
sleep 10 | ||
# 重启一次oneapi(由于OneAPI的默认Key有点问题,不重启的话会提示找不到渠道,临时手动重启一次解决,等待作者修复) | ||
# Restart oneapi (Due to certain issues with the default Key of OneAPI, it will display 'channel not found' if not restarted, this can be temporarily resolved by manually restarting once, while waiting for the author's fix) | ||
docker restart oneapi | ||
``` | ||
|
||
## 打开 OneAPI 添加模型 | ||
|
||
可以通过`ip:3001`访问OneAPI,默认账号为root密码为123456。登陆后可修改密码。 | ||
|
||
以OpenAI的模型为例,点击"渠道"选项卡,在"模型"中选择你的chat模型和embedding模型。 | ||
## Access OneAPI to Add Models | ||
OneAPI can be accessed at `ip:3001`. The default username is root, and the password is 123456. You can alter the password after logging in. | ||
Using OpenAI's model as an example, click on the "Channel" tab, and select your chat model and embedding model under "Models". | ||
Input your [OpenAI API Key](https://platform.openai.com/docs/quickstart) in the "Secrets" section. | ||
For the use of models beyond OpenAI, and further information, please consult [One API](https://doc.fastgpt.in/docs/development/one-api/). | ||
|
||
在"密钥"中填入你的[OpenAI API Key](https://platform.openai.com/docs/quickstart). | ||
## Setting Tokens | ||
Click on the "Tokens" tab. By default, there is a token `Initial Root Token`. You can also create a new token and set a quota on your own. | ||
Click "Copy" on your token, ensuring that the value of this token matches the `CHAT_API_KEY` value set in the docker-compose.yml file. | ||
|
||
如果你想用除OpenAI之外的其它模型,以及更多信息,请参考[One API](https://doc.fastgpt.in/docs/development/one-api/). | ||
## Accessing FastGPT | ||
At present, FastGPT can be directly accessed at `ip:3000` (please mind the firewall). The login username is root, with the password set to `DEFAULT_ROOT_PSW` within the docker-compose.yml environment variable. Should you require domain name access, you would need to install and configure [Nginx](https://nginx.org/en/) on your own. | ||
|
||
## 设置令牌 | ||
|
||
点击"令牌"选项卡,默认存在一个令牌`Initial Root Token`,你也可以自行添加一个新的令牌并设置额度。 | ||
|
||
在你的令牌点击"复制",确保这个令牌的值就是在docker-compose.yml文件里设置的`CHAT_API_KEY`的值。 | ||
|
||
## 访问 FastGPT | ||
|
||
目前可以通过 `ip:3000` 直接访问(注意防火墙)。登录用户名为 root,密码为docker-compose.yml环境变量里设置的 `DEFAULT_ROOT_PSW`。如果需要域名访问,请自行安装并配置 [Nginx](https://nginx.org/en/). | ||
|
||
## 停止容器 | ||
执行以下命令停止容器。 | ||
## Stop the Container | ||
Run the following command to stop the container. | ||
```shell | ||
docker-compose down | ||
``` | ||
|
||
|
||
``` |